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.
Users/SetupNewConfiguration (diff) – NEMO

Changes between Version 28 and Version 29 of Users/SetupNewConfiguration


Ignore:
Timestamp:
2017-05-16T14:42:36+02:00 (7 years ago)
Author:
nicolasmartin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Users/SetupNewConfiguration

    v28 v29  
    11{{{#!rst 
    2 .. _nemonewconfig: 
    32 
    43============================== 
     
    65============================== 
    76 
    8 .. code-block:`PageOutline:2-3` 
    9  
    107Last edition: :code-block:`Wikinfo:changed_ts` by :code-block:`Wikinfo:changed_by` 
     8 
     9.. contents:: Table of contents 
    1110 
    1211----------------------------- 
     
    2019 
    2120Create and compile a new configuration duplicating a reference configuration (ORCA_LIM3 
    22 in the following example):: 
    23  
    24    makenemo –n ORCA_LIM3_MYCONFIG -r ORCA_LIM3 
     21in the following example) 
     22 
     23.. code-block:: bash 
     24 
     25   makenemo –n 'ORCA_LIM3_MYCONFIG' -r ORCA_LIM3 
    2526 
    2627Option 2: Duplicate with differences 
     
    2930Create and compile a new configuration based on a reference configuration (ORCA_LIM3 in 
    3031the following example) but with different pre-processor options. For this either add 
    31 (add_key) or remove (del_key) keys as required; e.g.:: 
    32  
    33    makenemo –n ORCA2_LIM3_MYCONFIG -r ORCA2_LIM3 del_key "key_iomput" add_key "key_xios" 
     32(add_key) or remove (del_key) keys as required; e.g. 
     33 
     34.. code-block:: bash 
     35 
     36   makenemo –n 'ORCA2_LIM3_MYCONFIG' -r ORCA2_LIM3 del_key 'key_iomput' add_key 'key_xios' 
    3437 
    3538Option 3: Use the SIREN tools to subset an existing model 
     
    4952`here <http://prodn.idris.fr/thredds/catalog/ipsl_public/rron463/catalog.html?dataset=DatasetScanipsl_public/rron463/INPUT_SIREN.tar>`_ . 
    5053 
    51 `SIREN documentation </nemo/doxygen/index.html>`_ :trac:`../doxygen/index.html SIREN documentation` 
     54`SIREN documentation </nemo/doxygen/index.html>`_ 
    5255 
    5356Any questions or comments regarding the use of SIREN should be posted in the corresponding 
     
    7073house your new configuration by duplicating the closest reference configuration to your 
    7174target application.  For example, If your application requires both ocean and ice 
    72 components then run:: 
    73  
    74    makenemo –n MY_NEW_CONFIG -r ORCA_LIM3 
    75  
    76 where ``MY_NEW_CONFIG`` can be substituted with a suitably descriptive name for your new 
     75components then run 
     76 
     77.. code-block:: bash 
     78 
     79   makenemo –n 'MY_NEW_CONFIG' -r ORCA_LIM3 
     80 
     81where ``'MY_NEW_CONFIG'`` can be substituted with a suitably descriptive name for your new 
    7782configuration.  The purpose of this step is simply to create and populate the appropriate WORK,  
    7883MY_SRC and EXP00 subdirectories for your new configuration. Other choices for the base reference 
    79 configuration might be: 
     84configuration might be 
    8085 
    8186  * GYRE  - If your target application is ocean-only 
     
    8489 
    8590**2** All the domain information for your new configuration will be contained within a netcdf 
    86 file called ``domain_cfg.nc`` which you will need to create and place in the:: 
    87  
    88    NEMOGCM/CONFIG/MY_NEW_CONFIG/EXP00 
     91file called ``domain_cfg.nc`` which you will need to create and place in the 
     92 
     93.. code-block:: bash 
     94 
     95   NEMOGCM/CONFIG/'MY_NEW_CONFIG'/EXP00 
    8996 
    9097sub-directory. Firstly though, ensure that your configuration is set to use such a file by 
    91 confirming that:: 
     98confirming that 
     99 
     100.. code-block:: fortran 
    92101 
    93102   ln_read_cfg = .true. 
    94103 
    95 in:: 
    96  
    97    NEMOGCM/CONFIG/MY_NEW_CONFIG/EXP00/namelist_cfg 
    98  
    99 **3** Create the domain_cfg.nc file which must contain the following fields:: 
     104in 
     105 
     106.. code-block:: bash 
     107 
     108   NEMOGCM/CONFIG/'MY_NEW_CONFIG'/EXP00/namelist_cfg 
     109 
     110**3** Create the domain_cfg.nc file which must contain the following fields 
    100111 
    101112   int ORCA  , ORCA_index            - configuration name, configuration resolution 
     
    142153only one namelist and minimal changes to the usrdef modules] 
    143154 
    144 Firstly, construct the directory structure, starting in the ``CONFIG`` directory:: 
    145  
    146    ./makenemo -a TEST_CASES -n MY_NEW_TEST -r LOCK_EXCHANGE 
     155Firstly, construct the directory structure, starting in the ``CONFIG`` directory: 
     156 
     157.. code-block:: bash 
     158 
     159   ./makenemo -a TEST_CASES -n 'MY_NEW_TEST' -r LOCK_EXCHANGE 
    147160 
    148161where the ``-a`` option has been used to locate the new configuration in the 
    149162``TEST_CASES`` subdirectory (it is recommended practice to keep full configurations and 
    150163idealised cases clearly distinguishable). This command will have created (amongst others) 
    151 the following files and directories:: 
    152  
    153    TEST_CASES/MY_NEW_TEST: 
     164the following files and directories: 
     165 
     166.. code-block:: bash 
     167 
     168   TEST_CASES/'MY_NEW_TEST': 
    154169   BLD     MY_SRC     cpp_MY_NEW_TEST.fcm 
    155170   EXP00   WORK 
    156171 
    157    TEST_CASES/MY_NEW_TEST/EXP00: 
     172   TEST_CASES/'MY_NEW_TEST'/EXP00: 
    158173   context_nemo.xml        domain_def_nemo.xml 
    159174   field_def_nemo-opa.xml  file_def_nemo-opa.xml 
     
    162177   namelist_ref 
    163178 
    164    TEST_CASES/MY_NEW_TEST/MY_SRC: 
     179   TEST_CASES/'MY_NEW_TEST'/MY_SRC: 
    165180   usrdef_hgr.F90       usrdef_nam.F90    usrdef_zgr.F90 
    166181   usrdef_istate.F90    usrdef_sbc.F90    zdfini.F90 
     
    168183The key to setting up an idealised configuration lies in adapting a small set of short fortran90 
    169184modules which should be dropped into the MY_SRC directory. Here the LOCK_EXCHANGE example is using 
    170 5 such routines but the full set that is availablein the ``NEMO/OPA_SRC/USR`` directory is:: 
     1855 such routines but the full set that is availablein the ``NEMO/OPA_SRC/USR`` directory is: 
     186 
     187.. code-block:: bash 
    171188 
    172189   ../NEMO/OPA_SRC/USR: 
     
    181198the horizontal and vertical domains.  Templates for these are provided in the 
    182199``usrdef_hgr.F90`` and ``usrdef_zgr.F90`` modules. The application of these modules is 
    183 activated whenever:: 
     200activated whenever: 
     201 
     202.. code-block:: fortran 
    184203 
    185204   ln_read_cfg = .false. 
     
    190209 
    191210Another explicit control is available in the ``namsbc`` namelist which activates the 
    192 use of analytical forcing. With:: 
     211use of analytical forcing. With 
     212 
     213.. code-block:: fortran 
    193214 
    194215   ln_usr = .true. 
    195216 
    196217Other usrdef modules are activated by less explicit means. For example, code in 
    197 ``usrdef_istate.F90`` is used to define initial temperature and salinity fields if:: 
     218``usrdef_istate.F90`` is used to define initial temperature and salinity fields if 
     219 
     220.. code-block:: fortran 
    198221 
    199222   ln_tsd_init   = .false. 
    200223 
    201 in the ``namtsd`` namelist. The remaining modules, namely:: 
     224in the ``namtsd`` namelist. The remaining modules, namely 
     225 
     226.. code-block:: bash 
    202227 
    203228   usrdef_closea.F90   usrdef_fmask.F90 
     
    214239So, in most cases, the set up of idealised model configurations can be completed by 
    215240copying the template routines from ``NEMOGCM/NEMO/OPA_SRC/USR`` into your new 
    216 ``NEMOGCM/CONFIG/MY_NEW_TEST/MY_SRC`` directory and editing the appropriate modules as 
     241``NEMOGCM/CONFIG/'MY_NEW_TEST'/MY_SRC`` directory and editing the appropriate modules as 
    217242needed. The default set are those used for the GYRE reference configuration. 
    218243The contents of ``MY_SRC`` directories from other idealised configurations