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/ModelInterfacing/InputsOutputs (diff) – NEMO

Changes between Version 6 and Version 7 of Users/ModelInterfacing/InputsOutputs


Ignore:
Timestamp:
2017-03-30T00:25:06+02:00 (7 years ago)
Author:
nicolasmartin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Users/ModelInterfacing/InputsOutputs

    v6 v7  
    33Output of diagnostics in NEMO is usually done using XIOS. This is an efficient way of writing diagnostics because the time averaging, file writing and even some simple arithmetic or regridding is carried out in parallel to the NEMO model run. This page gives a basic introduction to using XIOS with NEMO. Much more information is available from the XIOS homepage above and from the NEMO reference manual. 
    44 
    5 Use of XIOS for diagnostics is activated using the pre-compiler key "key_iomput". In nemo_v3_6_STABLE the default version of XIOS is XIOS1.0 but XIOS2.0 can be used by activating key_xios2. '''NB: Due to a change in the XIOS1.0 branch NEMO v3.6 STABLE will only work up to revision 703 of the XIOS1.0 branch without modifying the code manually.''' At the head of the NEMO trunk only XIOS2.0 can be used (XIOS2.0 is the XIOS trunk) and key_xios2 is not required. 
     5Use of XIOS for diagnostics is activated using the pre-compiler key `key_iomput`. In nemo_v3_6_STABLE the default version of XIOS is XIOS1.0 but XIOS2.0 can be used by activating `key_xios2`. '''NB: Due to a change in the XIOS1.0 branch NEMO v3.6 STABLE will only work up to revision 703 of the XIOS1.0 branch without modifying the code manually.''' At the head of the NEMO trunk only XIOS2.0 can be used (XIOS2.0 is the XIOS trunk) and `key_xios2` is not required. 
    66 
    7 == XIOS namelists == 
     7== XIOS namelists 
    88XIOS is controlled using xml input files. The exact setup differs slightly between XIOS1.0 and XIOS2.0 
    99 
    10 === XIOS1.0 === 
    11 Examples of these files can be found in the reference configurations (NEMOGCM/CONFIG) in the nemo_v3_6_STABLE branch. The XIOS executable expects to find a file called iodef.xml in the model run directory. In NEMO we have made the decision to use include statements in the iodef.xml file to include field_def.xml and domain_def.xml from the NEMOGCM/CONFIG/SHARED directory. Most users will not need to modify domain_def.xml or field_def.xml unless they want to add new diagnostics to the NEMO code (see below). 
     10=== XIOS1.0 
     11Examples of these files can be found in the reference configurations (`NEMOGCM/CONFIG`) in the nemo_v3_6_STABLE branch. The XIOS executable expects to find a file called `iodef.xml` in the model run directory. In NEMO we have made the decision to use include statements in the `iodef.xml` file to include `field_def.xml` and `domain_def.xml` from the `NEMOGCM/CONFIG/SHARED` directory. Most users will not need to modify `domain_def.xml` or `field_def.xml` unless they want to add new diagnostics to the NEMO code (see below). 
    1212 
    13 === XIOS2.0 === 
    14 An iodef.xml file is still required in the run directory. For XIOS2.0 the field_def.xml file has been further split into field_def-opa.xml (for physics), field_def-lim.xml (for ice) and field_def-bgc.xml (for biogeochemistry). Also the definition of the output files has been moved from the iodef.xml file into separate file_definition.xml files which are included in the iodef.xml file. Note that the domain_def.xml file is also different for XIOS2.0. Examples of these files can be found in the trunk under NEMOGCM/CONFIG/GYRE_XIOS in the nemo_v3_6_STABLE branch or in the trunk under NEMOGCM/CONFIG. 
     13=== XIOS2.0 
     14An `iodef.xml` file is still required in the run directory. For XIOS2.0 the `field_def.xml` file has been further split into `field_def-opa.xml` (for physics), `field_def-lim.xml` (for ice) and `field_def-bgc.xml` (for biogeochemistry). Also the definition of the output files has been moved from the `iodef.xml` file into separate `file_definition.xml` files which are included in the `iodef.xml` file. Note that the `domain_def.xml` file is also different for XIOS2.0. Examples of these files can be found in the trunk under `NEMOGCM/CONFIG/GYRE_XIOS` in the nemo_v3_6_STABLE branch or in the trunk under `NEMOGCM/CONFIG`. 
    1515 
     16== XIOS modes 
     17=== Detached Mode 
     18In detached mode the XIOS executable is executed on separate cores from the NEMO model. This is the recommended method for using XIOS for realistic model runs. To use this mode set `using_server` to `true` at 
     19the bottom of the `iodef.xml` file. Make sure there is a copy (or link to) your XIOS executable in the working directory and in your job submission script allocate processors to XIOS. 
    1620 
    17 == XIOS modes == 
    18 === Detached Mode === 
    19 In detached mode the XIOS executable is executed on separate cores from the NEMO model. This is the recommended method for using XIOS for realistic model runs. To use this mode set "using_server" to true at 
    20 the bottom of the iodef.xml file. Make sure there is a copy (or link to) your XIOS execuatble in the working directory and in your job submission script allocate processors to XIOS. 
    21  
    22 === Attached Mode === 
     21=== Attached Mode 
    2322In attached mode XIOS runs on each of the cores used by NEMO. This method is less efficient than the detached mode but can be more convenient for testing or with small configurations. To activate this mode simply set "using_server" to false in the iodef.xml file and don't allocate any cores to XIOS. Note that due to the different domain decompositions between XIOS and NEMO if the total number of cores is larger than the number of grid points in the j direction then the model run will fail. 
    2423 
    2524 
    26 == Adding new diagnostics == 
     25== Adding new diagnostics 
    2726If you want to add a NEMO diagnostic to the NEMO code you will need to do the following: 
    2827   1) Add any necessary code to calculate you new diagnostic in NEMO 
     
    3130 
    3231   3) If it is computationally expensive to calculate your new diagnostic you should also use "iom_use" to determine if it is requested in the current model run. For example, 
    33 {{{ 
     32{{{#!f 
    3433IF iom_use('field_id') THEN 
    3534   !Some expensive computation