-
Notifications
You must be signed in to change notification settings - Fork 7
Porting Notes
NEMO4 is a major release of the NEMO modelisation system. It is the result of a simplification procedure started in 2017. Simplification occurs in many aspect of the code :
- Reorganization of the tree structure of NEMO, now mainly under
src/directory. - Obsolete features of NEMO removed (e.g: Neptune effect, or no-slip accurate).
- Externalization of all mesh building actions : NEMO now read a
domain_cfg.ncfile containing basic input field (ex-coordinates, bathymetry, vertical metrics ... ). A tool is proposed for building thedomain_cfg.ncfile from the input files used in NEMO_3.6. - As a consequence, the core of NEMO has no more differentiation according to the config (e.g: no more hard coded changes of e1, e2 in
some straits, according to
cp_cfgandjp_cfg). If modifications are relevant in the code they are concentrated inusrdef_xxxmodules (e.g.usrdef_fmask.F90where shlat conditions are changed in some straits). But for changes in the horizontal metrics, previously performed in thedomhgr.F90module, no changes are reported inusrdef_domhgr.F90(which is used only for defining different --and user dependent-- domain.)
According to these introduction remarks, DCM need a strong lift-up to follow this new NEMO version. We take the opportunity to clean
up DCM from obsolescence (e.g: systematic use of bash instead of ksh in the scripts), to add functionalities (such as the ability
to easy install and run NEMO test-cases, or NEMO reference configurations) and to develop this new version on GitHub.
This remodeled version of DCM is dedicated to NEMO4 and no backward compatibility with previous version is provided. However, the rationale stays the same:
- 2 complementary parts:
- DCMTOOLS for building the code for a given configuration (hierarchical source management, compilation). The DCM command used so far are maintained and the DCM user will not feel the NEMO differences at this level.
-
RUNTOOLS for running complex ocean configurations. Centralisation of the management of a simulation from a CTL directory, with easy commands such as
run_nemo.sh!
- all DCM tools in
bin/are prefixed bydcm_, no extension,bashassumed. - all fortran code in DRAKKAR ( modified from NEMO reference) uses
#if defined key_drakkarstatement to clearly identify drakkar modifications. (This imply thay if key_drakkar is defined in CPP.keys, drakkar modifications are taken into account, else the code is the standard NEMO code). makefile in the config directory, manage this cpp key according to theREFONLYkeyword. - When a namelist block is modified with respect to the standard one, we in fact put the modifications only in a second independent block suffixed with
_drk(e.g.:namrun_drk). This allow the final namelists to be compatible between DRAKKAR and NEMO standard versions (in this latter case, drakkar namelist block are just ignored.
- You clone DCM from github with :
git clone https://github.com/meom-group/DCM.git DCM_4.0beta
- Now in
DCM_4.Obetadirectory you have:DCMTOOLS DOC License README.md RUNTOOLS
- After this cloning, you need to load the NEMO reference version (at the svn revision compatible with the DRAKKAR modified files), in
DCMTOOLS/NEMOREF:
cd DCMTOOLS/NEMOREF
./getnemoref.sh
-
DCMTOOLS/DRAKKARandDCMTOOLS/NEMOREFholdNEMO4sub-directory, where the nemo4 system take place.
cd DCMTOOLS/DRAKKAR/NEMO4
ls
arch cfgs doc ext mk src tests tools which is the new NEMO layout.
-
archholds the arch file for fcm compilation -
cfgsholds the reference configurations -
extholds all external packages ( e.g:IOIPS AGRIFandFCM) -
mkholds the compilation tools based onext/FCM -
srcholds the core NEMO code (fortran90) -
testsholds the test-case configurations -
toolsholds the NEMO associated tools ( e.g:WEIGHTS,MPP_PREP... )
- DCM tools are now in
$HOMEDCM/bin - templates file (makefile, module_example, bash setup files, CPP.keys, etc...) are in
$HOMEDCM/templates
- porting
WEIGHTS,MPP_PREP,REBUILD_MPPOK - problem detected for
OBSTOOLS: link to the core NEMO routine is dangerous as changing files there, ( needed because of compilation error) also changes the files in core NEMO. A ticket will be sent.
- In order to do this porting, we first check the differences between DRAKKAR and NEMOREF in the last NEMODRAK revision.
- Then we try to implement the relevant changes in the NEMO4 code (in the DRAKKAR tree, of course).
- A decicated page is used to describe this action, in order not to fill up this page.