Changes between Version 28 and Version 29 of Users/SetupNewConfiguration
- Timestamp:
- 2017-05-16T14:42:36+02:00 (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Users/SetupNewConfiguration
v28 v29 1 1 {{{#!rst 2 .. _nemonewconfig:3 2 4 3 ============================== … … 6 5 ============================== 7 6 8 .. code-block:`PageOutline:2-3`9 10 7 Last edition: :code-block:`Wikinfo:changed_ts` by :code-block:`Wikinfo:changed_by` 8 9 .. contents:: Table of contents 11 10 12 11 ----------------------------- … … 20 19 21 20 Create 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 21 in the following example) 22 23 .. code-block:: bash 24 25 makenemo –n 'ORCA_LIM3_MYCONFIG' -r ORCA_LIM3 25 26 26 27 Option 2: Duplicate with differences … … 29 30 Create and compile a new configuration based on a reference configuration (ORCA_LIM3 in 30 31 the 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' 34 37 35 38 Option 3: Use the SIREN tools to subset an existing model … … 49 52 `here <http://prodn.idris.fr/thredds/catalog/ipsl_public/rron463/catalog.html?dataset=DatasetScanipsl_public/rron463/INPUT_SIREN.tar>`_ . 50 53 51 `SIREN documentation </nemo/doxygen/index.html>`_ :trac:`../doxygen/index.html SIREN documentation`54 `SIREN documentation </nemo/doxygen/index.html>`_ 52 55 53 56 Any questions or comments regarding the use of SIREN should be posted in the corresponding … … 70 73 house your new configuration by duplicating the closest reference configuration to your 71 74 target 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 75 components then run 76 77 .. code-block:: bash 78 79 makenemo –n 'MY_NEW_CONFIG' -r ORCA_LIM3 80 81 where ``'MY_NEW_CONFIG'`` can be substituted with a suitably descriptive name for your new 77 82 configuration. The purpose of this step is simply to create and populate the appropriate WORK, 78 83 MY_SRC and EXP00 subdirectories for your new configuration. Other choices for the base reference 79 configuration might be :84 configuration might be 80 85 81 86 * GYRE - If your target application is ocean-only … … 84 89 85 90 **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 91 file 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 89 96 90 97 sub-directory. Firstly though, ensure that your configuration is set to use such a file by 91 confirming that:: 98 confirming that 99 100 .. code-block:: fortran 92 101 93 102 ln_read_cfg = .true. 94 103 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:: 104 in 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 100 111 101 112 int ORCA , ORCA_index - configuration name, configuration resolution … … 142 153 only one namelist and minimal changes to the usrdef modules] 143 154 144 Firstly, construct the directory structure, starting in the ``CONFIG`` directory:: 145 146 ./makenemo -a TEST_CASES -n MY_NEW_TEST -r LOCK_EXCHANGE 155 Firstly, 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 147 160 148 161 where the ``-a`` option has been used to locate the new configuration in the 149 162 ``TEST_CASES`` subdirectory (it is recommended practice to keep full configurations and 150 163 idealised cases clearly distinguishable). This command will have created (amongst others) 151 the following files and directories:: 152 153 TEST_CASES/MY_NEW_TEST: 164 the following files and directories: 165 166 .. code-block:: bash 167 168 TEST_CASES/'MY_NEW_TEST': 154 169 BLD MY_SRC cpp_MY_NEW_TEST.fcm 155 170 EXP00 WORK 156 171 157 TEST_CASES/ MY_NEW_TEST/EXP00:172 TEST_CASES/'MY_NEW_TEST'/EXP00: 158 173 context_nemo.xml domain_def_nemo.xml 159 174 field_def_nemo-opa.xml file_def_nemo-opa.xml … … 162 177 namelist_ref 163 178 164 TEST_CASES/ MY_NEW_TEST/MY_SRC:179 TEST_CASES/'MY_NEW_TEST'/MY_SRC: 165 180 usrdef_hgr.F90 usrdef_nam.F90 usrdef_zgr.F90 166 181 usrdef_istate.F90 usrdef_sbc.F90 zdfini.F90 … … 168 183 The key to setting up an idealised configuration lies in adapting a small set of short fortran90 169 184 modules 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:: 185 5 such routines but the full set that is availablein the ``NEMO/OPA_SRC/USR`` directory is: 186 187 .. code-block:: bash 171 188 172 189 ../NEMO/OPA_SRC/USR: … … 181 198 the horizontal and vertical domains. Templates for these are provided in the 182 199 ``usrdef_hgr.F90`` and ``usrdef_zgr.F90`` modules. The application of these modules is 183 activated whenever:: 200 activated whenever: 201 202 .. code-block:: fortran 184 203 185 204 ln_read_cfg = .false. … … 190 209 191 210 Another explicit control is available in the ``namsbc`` namelist which activates the 192 use of analytical forcing. With:: 211 use of analytical forcing. With 212 213 .. code-block:: fortran 193 214 194 215 ln_usr = .true. 195 216 196 217 Other 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 198 221 199 222 ln_tsd_init = .false. 200 223 201 in the ``namtsd`` namelist. The remaining modules, namely:: 224 in the ``namtsd`` namelist. The remaining modules, namely 225 226 .. code-block:: bash 202 227 203 228 usrdef_closea.F90 usrdef_fmask.F90 … … 214 239 So, in most cases, the set up of idealised model configurations can be completed by 215 240 copying 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 as241 ``NEMOGCM/CONFIG/'MY_NEW_TEST'/MY_SRC`` directory and editing the appropriate modules as 217 242 needed. The default set are those used for the GYRE reference configuration. 218 243 The contents of ``MY_SRC`` directories from other idealised configurations