New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
2016WP/Simplif2-CNRS-simona – NEMO
wiki:2016WP/Simplif2-CNRS-simona

Version 7 (modified by flavoni, 8 years ago) (diff)

--

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

Error: Failed to load processor TracForm
No macro or processor named 'TracForm' found

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:

Error: Failed to load processor email
No macro or processor named 'email' found

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.

Error: Failed to load processor TracForm
No macro or processor named 'TracForm' found

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.

Error: Failed to load processor TracForm
No macro or processor named 'TracForm' found

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).

Error: Failed to load processor TracForm
No macro or processor named 'TracForm' found

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