Form page for development work

A wiki page associated with a give action should be created in wiki/${YEAR}WP/${WORKING_GROUP|INSTITUTE}-${ACTION_NUMBER}_${PI} using this template.
From that, you can customize it while editing within the TracForm container {{{#!TracForm ... }}}. If necessary, you can copy the entire form (add a number _[0-9] to wiki page name) or the respective area in order to match the number of the (P)Reviewer(s). The best solution is not to extend significantly the length of the page.

This is the color code for the fulfilment of this form:

PI(S)

Previewer(s)

Reviewer(s)


The PI is responsible to closely follow the progress of the action, and especially to contact NEMO project manager if the delay on preview (or review) are longer than the 2 weeks expected.

Abstract

This section should be completed before starting to develop the code, in order to find agreement on the method beforehand.
To enabling the !ticket and the source links in the Trac environment, those have to be hardcoded in the form

Action

PI(S)

Ticket

#1692

Branch

branches/$YEAR/dev_r${FORK_REVISION}_${WORKING_GROUP|INSTITUTE}${ACTION_NUMBER}_${PURPOSE}

Previewer(s)

Reviewer(s)

Part 1: Description

Part 2: Implementation

Part 3: Reference manual updates

Updated on 03/31/2016 11:49:18 by flavoni

Once the PI has completed this section, he should send a mail to the previewer(s) asking them to preview the work within two weeks.


Jointly Agreed Plan (in discussion with previewer)

The goal of this action is to continue Simplification started with ticket 1608, and https://forge.ipsl.jussieu.fr/nemo/wiki/ticket/1593_CNRS9_NOC3_LDF. For this action we will re-define interface between NEMO core and configurations and update all reference documentation to reflect the changes made.

Configuration dependent code can be considered in four functional groups:

  1. Domain setting
  2. Initial state
  3. Forcing
  4. Physics

Phase 1:

The first phase is to create a GYRE configuration which has no configuration dependent code in the standard modules. This will be achieved by moving code in each of the functional groups (where appropriate) into 'user defined' modules which can be dropped into a MY_SRC directory and which are called by generic function names. Calls to these generic routines should be placed at appropriate points to be activated by suitable namelist switches. In the GYRE case this will involve relocating the following code segments:

(Domain) : CASE 5 for jphgr_msh in dom_hgr (two segments: grid and corolis);
           single tanh function from zgr_z.
(Initial): istate_gyre in istate.F90
(Forcing): sbc_gyre in sbcana.F90
(Physics): None

Remove specific calls to *_gyre routines and verify results using the 'user defined' routines

Phase 2:

The second phase of this task is to introduce a method of reading all domain settings from external files. Currently this is done for horizontal grid information if jphgr_msh=0 but there is no similar mechanism for the vertical grid. For a complete domain description (ignoring the possibility of iceshelves, for now) the following data are required:

gphi[t,u,v,f], glam[t,u,v,f], e[1,2][t,u,v,f] ( and optionally e1e2[u,v] ) 
gdep[t,w]_0 gdep[t,w]_1d
e3[t,w,u,v,f]_0 e3[t,w,u,v,f]_1d
tmask
jperio, ln_zps, ln_zco, ln_sco, ln_isfcav

Note [u,v,f]masks can be derived from tmask. A configuration-dependent fmask, in particular, should be considered as a physics choice since it can be used to increase lateral friction.

The phase 2 task is therefore to introduce code to produce a mesh and mask file with all the required content (by changing/adding to nn_msh options). A new namelist parameter can then be added (jpzgr_msh) such that when jpzgr_msh = 0, a new routine, zgr_read, called in domzgr will read the vertical grid information from the mesh and mask file:

SELECT CASE( jpzgr_msh )   !  type of vertical grid
!
CASE ( 0 )                     !==  read in domain.nc file  ==!
   !
   IF(lwp) WRITE(numout,*)
   IF(lwp) WRITE(numout,*) '          vertical grid read in "domain"
file'
   !
   CALL zgr_read()
   ! add code to build mbathy from tmask: needed in zgr_bot_level
   ! possibly build bathy too from gdepw_0 ; after zgr_bot_level? is it
needed?
   !
CASE DEFAULT
   !
   ! Build the vertical coordinate system
   ! ------------------------------------
   CALL zgr_z            ! Reference z-coordinate system (always called)
   CALL zgr_bat          ! Bathymetry fields (levels and meters)
   IF( lk_c1d      )   CALL lbc_lnk( bathy , 'T', 1._wp )   ! 1D
config.: same bathy value over the 3x3 domain
   IF( ln_zco      )   CALL zgr_zco          ! z-coordinate
   IF( ln_zps      )   CALL zgr_zps          ! Partial step z-coordinate
   IF( ln_sco      )   CALL zgr_sco          ! s-coordinate or hybrid
z-s coordinate
   !
   ! final adjustment of mbathy & check
   ! -----------------------------------
   IF( .NOT.lk_c1d )   CALL zgr_bat_ctl      ! check bathymetry (mbathy)
and suppress isolated ocean points
END SELECT
   IF( lzoom       )   CALL zgr_bat_zoom     ! correct mbathy in case of
zoom sub
                       CALL zgr_bot_level    ! deepest ocean level for
t-, u- and v-points
                       CALL zgr_top_level    ! shallowest ocean level
for T-, U-, V- points

Note: The same domain file read in zgr_read is also to be accessed in hgr_read for the horizontal grid information (jphgr_msh=0).

The ability to reproduce results from all reference configurations using the external files to define the domain should be verified at this stage.

Phase 3:

The third phase will be to identify configuration dependent physics code and replicate the functions (or case statement blocks) either by providing user defined functions or reading appropriate fields from external files. The afore-mentioned fmask modifications are one example which could be replaced by reading a modified fmask from an external file.

After this phase it should be possible to run an ORCA2 configuration with no hardcoded references in the trunk code.

Phase 4:

Following success with phases 1-3 the next stage will be to systematically break down the multiple functionality in routines such as domhgr into separate examples of user-defined routines (in this case a set of routines, each of which sets a different vertical grid). Care should be taken to standardise subroutine arguments with inputs and return fields clearly documented. These new routines should be moved into the appropriate MY_SRC directory of a reference configuration or into a new directory under TOOLS or MISCELLANEOUS if they are not actively used in any of the reference configurations. domhgr.F90 and domzgr.F90, in particular, should be greatly simplified by this procedure.

Phase 5

Incorporate necessary additions to the domain.nc file to support ISF active configurations (misfdep, risfdep?) and check for possible redundancy in domain.nc (i.e. are all the fields really required?). Not sure _1d arrays are, for example?

Finally check that documentation has been kept up to date.

Preview

Since the preview step must be completed before the PI starts the coding, the previewer(s) answers are expected to be completed within the two weeks after the PI has sent his request.
For each question, an iterative process should take place between PI and previewer(s) in order to reach a "YES" answer for each of the following questions.

Questions Answer Comment
Does the previewer agree with the proposed methodology?
Does the previewer agree with the proposed flowchart and list of routines to be changed?
Does the previewer agree with the proposed new list of variables, including agreement with coding rules?
Does the previewer agree with the proposed summary of updates in reference manual?
… … …

Updated on 03/09/2016 18:48:35 by acc

Once all "YES" have been reached, the PI can start the development into his development branch.

Tests

Once the development is done, the PI should complete this section below and ask the reviewers to start their review in the lower section.

Questions Answer Comment
Can this change be shown to produce expected impact? (if option activated)?
Can this change be shown to have a null impact? (if option not activated)
Detailed results of restartability and reproducibility when the option is activated. Please indicate the configuration used for this test
Detailed results of SETTE tests (restartability and reproducibility for each of the reference configuration)
Results of the required bit comparability tests been run: Are there no differences when activating the development?
If some differences appear, is reason for the change valid/understood?
If some differences appear, is the !ticket describing in detail the impact this change will have on model configurations?
Is this change expected to preserve all diagnostics?
If no, is reason for the change valid/understood?
Are there significant changes in run time/memory?
… … …

Updated on 10/25/2016 11:39:51 by flavoni

Review

A successful review is needed to schedule the merge of this development into the future NEMO release during next Merge Party (usually in November).

Code changes and documentation

Question Answer Comment
Is the proposed methodology now implemented?
Are the code changes in agreement with the flowchart defined at Preview step?
Are the code changes in agreement with list of routines and variables as proposed at Preview step?
If not, are the discrepancies acceptable?
Is the in-line documentation accurate and sufficient?
Do the code changes comply with NEMO coding standards?
Is the !ticket of development documented with sufficient details for others to understand the impact of the change?
Are the reference manual tex files now updated following the proposed summary in preview section?
Is there a need for some documentation on the web pages (in addition to in-line and reference manual)?
If yes, please describe and ask PI. A yes answer must include all documentation available.
… … …

Review Summary

Is the review fully successful?

Updated on 11/04/2016 15:03:25 by flavoni

Once review is successful, the development must be scheduled for merge during next Merge Party Meeting.

Last modified 4 years ago Last modified on 2016-03-31T11:49:04+02:00