8. Coupling NEMO MEDUSA - NOC-MSM/Regional-NEMO-Medusa GitHub Wiki
So far, we only downloaded the NEMO code and set up physical + biological inputs.
However, we still need to download MEDUSA code and couple it to NEMO. MEDUSA is added as an external. The link between NEMO and MEDUSA is done through the TOP, this is why after we only use the top namelists (and not the medusa namelists).
Need to first contact the MetOffice people to get login access to the code. (you can contact Julien Palimeri for help with that)
Some useful documentation:
- There is an existing wiki on how to run NEMO-MEDUSA mainly on Mobilis here :
https://code.metoffice.gov.uk/trac/medusa/wiki
- It is a svn server like NEMO, with the code here : https://code.metoffice.gov.uk/trac/medusa/browser
- Some instructions on how to compile are here : https://code.metoffice.gov.uk/trac/medusa/wiki/HowToCheckOut
Go to the base of your NEMO code. For me its here : /work/n01/n01/valegu/EA_R12_BIO/nemo_vr4.06/
From there, we need to add MEDUSA as an externals
.
Enter the following command line :
svn propedit svn:externals .
Then you can add the following lines :
https://code.metoffice.gov.uk/svn/medusa/main/trunk/src/MEDUSA@131 src/TOP/MEDUSA
https://code.metoffice.gov.uk/svn/medusa/main/trunk/cfgs/ORCA2_MEDUSA@166 cfgs/ORCA2_MEDUSA
https://code.metoffice.gov.uk/svn/medusa/main/trunk/cfgs/SHARED_MEDUSA@166 cfgs/SHARED_MEDUSA
Then something like below should be displayed :
^/utils/build/arch@12130 arch
^/utils/build/makenemo@12191 makenemo
^/utils/build/mk@11662 mk
^/utils/tools_r4.0-HEAD@12672 tools
^/vendors/AGRIF/stable@14105 ext/AGRIF
^/vendors/FCM@10134 ext/FCM
^/vendors/IOIPSL@9655 ext/IOIPSL
https://code.metoffice.gov.uk/svn/medusa/main/trunk/src/MEDUSA@131 src/TOP/MEDUSA
https://code.metoffice.gov.uk/svn/medusa/main/trunk/cfgs/ORCA2_MEDUSA@166 cfgs/ORCA2_MEDUSA
https://code.metoffice.gov.uk/svn/medusa/main/trunk/cfgs/SHARED_MEDUSA@166 cfgs/SHARED_MEDUSA
# SETTE mapping (inactive)
#^/branches/NERC/dev_sette_NERC@13625 sette
svn update
You then need to provide your login and password.
Then you have to compile. The first time you compile with MEDUSA :
# Julien instructions
./makenemo -m ${HPC_TARG}_${COMPILER} -r ORCA2_ICE_PISCES -n ORCA2_MEDUSA -j 8
./makenemo -m ${HPC_TARG}_${COMPILER} -r ORCA2_MEDUSA -j 8
Note 1 : We had to remove the ICE component
from the ORCA2_ICE_PISCES
config inside ref_cfgs.txt
. Also make sure ICE component
is also removed from the ORCA2_MEDUSA
setup inside work_cfgs.txt
.
Note 2 : We removed key_si3
from cpp_ORCA2_MEDUSA.fcm
and included key_nosignedzero
(not initially included)
Afterwards, if you want to update your MEDUSA version, you can follow below :
svn propedit svn:externals .
Update your MEDUSA version :
https://code.metoffice.gov.uk/svn/medusa/main/trunk/src/MEDUSA@297 src/TOP/MEDUSA
https://code.metoffice.gov.uk/svn/medusa/main/trunk/cfgs/ORCA2_MEDUSA@295 cfgs/ORCA2_MEDUSA
https://code.metoffice.gov.uk/svn/medusa/main/trunk/cfgs/SHARED_MEDUSA@294 cfgs/SHARED_MEDUSA
svn update
(provide your metoffice password)
Then compile :
./makenemo -m ${HPC_TARG}_${COMPILER} -r ORCA2_MEDUSA -j 8
You can first do a clean before updating your MEDUSA version:
#erase -> src/TOP/MEDUSA
./makenemo -r ORCA2_MEDUSA clean
Remove the ice component inside the context_nemo.xml
:
<field_definition src="./field_def_nemo-ice.xml"/> <!-- NEMO sea-ice model -->
<file_definition src="./file_def_nemo-ice.xml"/> <!-- NEMO sea-ice model -->
The main difficulties we encountered was linked to the section namtrc_bdy
!----------------------------------------------------------------------
&namtrc_bdy ! Setup of tracer boundary conditions
!-----------------------------------------------------------------------
cn_trc_dflt = 'neumann' ! OBC applied by default to all tracers !!! VAL : CHANGED FROM neumann to specified
cn_trc = 'frs' ! Boundary conditions used for tracers with data files (selected in namtrc)
nn_trcdmp_bdy = 0 ! Use damping timescales defined in nambdy of namelist
! = 0 NO damping of tracers at open boudaries
! = 1 Only for tracers forced with external data
! = 2 Damping applied to all tracers
/