Ignore:
Timestamp:
2019-01-23T17:26:33+01:00 (19 months ago)
Author:
mocavero
Message:

Update diagnostics.rst file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/cfgs/SHARED/README.rst

    r10460 r10562  
    1 *********** 
    2 Diagnostics 
    3 *********** 
     1DIAGNOSTICS 
     2=========== 
    43 
    54.. contents:: 
    6    :local: 
     5           :local: 
    76 
    8 | Output of diagnostics in NEMO is usually done using XIOS. 
    9   This is an efficient way of writing diagnostics because the time averaging, file writing and even 
    10   some simple arithmetic or regridding is carried out in parallel to the NEMO model run. 
    11 | This page gives a basic introduction to using XIOS with NEMO. 
    12   Much more information is available from the XIOS homepage above and from the `NEMO manual`_. 
     7Output of diagnostics in NEMO is usually done using XIOS. 
     8This 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. 
     9This page gives a basic introduction to using XIOS with NEMO. 
     10Much more information is available from the XIOS homepage above and from the NEMO manual. 
    1311 
    14 Use of XIOS for diagnostics is activated using the pre-compiler key ``key_iomput``. 
    15 The default version of XIOS is the 2.0 release.  
     12Use of XIOS for diagnostics is activated using the pre-compiler key ``key_iomput``.  
    1613 
    1714Extracting and installing XIOS 
    18 ============================== 
     15------------------------------ 
    1916 
    20171. Install the NetCDF4 library. 
    2118   If you want to use single file output you will need to compile the HDF & NetCDF libraries to allow parallel IO. 
    22 2. Download the version of XIOS that you wish to use. 
    23    The recommended version is now XIOS 2.0: 
     192. Download the version of XIOS that you wish to use. The recommended version is now XIOS 2.5: 
    2420    
    25    .. code-block:: console 
     21.. code-block:: console 
    2622 
    27       $ svn co ​http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/branchs/xios-2.0 xios-2.0 
     23   $ svn co http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/branchs/xios-2.5 xios-2.5 
    2824 
    29    and follow the instructions in :xios:`XIOS documentation <wiki/documentation>` to compile it. 
    30    If you find problems at this stage, support can be found by subscribing to the `XIOS mailing list 
    31    <http://forge.ipsl.jussieu.fr/mailman/listinfo.cgi/xios-users>`_ 
    32    and sending a mail message to it.  
     25and follow the instructions in `XIOS documentation <http://forge.ipsl.jussieu.fr/ioserver/wiki/documentation>`_ to compile it. 
     26   If you find problems at this stage, support can be found by subscribing to the `XIOS mailing list <http://forge.ipsl.jussieu.fr/mailman/listinfo.cgi/xios-users>`_ and sending a mail message to it.  
    3327 
    34 Namelists 
    35 ========= 
     28XIOS Configuration files 
     29------------------------ 
    3630 
    37 XIOS is controlled using xml input files that should be copied to your model run directory before 
    38 running the model. 
    39 The exact setup differs slightly between 1.0 and 2.0 releases. 
    40  
    41 An ``iodef.xml`` file is still required in the run directory. 
    42 For XIOS 2.0 the ``field_def.xml`` file has been further split into ``field_def-oce.xml`` (for physics), 
    43 ``field_def-ice.xml`` (for ice) and ``field_def-bgc.xml`` (for biogeochemistry). 
    44 Also the definition of the output files has been moved from the ``iodef.xml`` file into 
    45 separate ``file_definition.xml`` files which are included in the ``iodef.xml`` file. 
    46 Note that the ``domain_def.xml`` file is also different for XIOS 2.0. 
     31XIOS is controlled using xml input files that should be copied to your model run directory before running the model. 
     32Examples of these files can be found in the reference configurations (``cfgs``). The XIOS executable expects to find a file called ``iodef.xml`` in the model run directory. 
     33In NEMO we have made the decision to use include statements in the ``iodef.xml`` file to include ``field_def_nemo-oce.xml`` (for physics), ``field_def_nemo-ice.xml`` (for ice), ``field_def_nemo-pisces.xml`` (for biogeochemistry) and ``domain_def.xml`` from the /cfgs/SHARED directory. 
     34Most users will not need to modify ``domain_def.xml`` or ``field_def_nemo-???.xml`` unless they want to add new diagnostics to the NEMO code. 
     35The definition of the output files is organized into separate ``file_definition.xml`` files which are included in the ``iodef.xml`` file. 
    4736 
    4837Modes 
    49 ===== 
     38----- 
    5039 
    5140Detached Mode 
     
    6049   <variable id="using_server" type="boolean">true</variable> 
    6150 
    62 Make sure there is a copy (or link to) your XIOS executable in the working directory and 
    63 in your job submission script allocate processors to XIOS. 
     51Make 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. 
    6452 
    6553Attached Mode 
     
    6755 
    6856In attached mode XIOS runs on each of the cores used by NEMO. 
    69 This method is less efficient than the detached mode but can be more convenient for testing or 
    70 with small configurations. 
     57This method is less efficient than the detached mode but can be more convenient for testing or with small configurations. 
    7158To activate this mode simply set ``using_server`` to false in the ``iodef.xml`` file 
    7259 
     
    7663 
    7764and don't allocate any cores to XIOS. 
    78 Note that due to the different domain decompositions between XIOS and NEMO if 
    79 the total number of cores is larger than the number of grid points in the j direction then the model run will fail. 
     65Note 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. 
    8066 
    8167Adding new diagnostics 
    82 ====================== 
     68---------------------- 
    8369 
    8470If you want to add a NEMO diagnostic to the NEMO code you will need to do the following: 
    8571 
    86721. Add any necessary code to calculate you new diagnostic in NEMO 
    87 2. Send the field to XIOS using ``CALL iom_put( 'field_id', variable )`` where ``field_id`` is a unique id for 
    88    your new diagnostics and variable is the fortran variable containing the data. 
    89    This should be called at every model timestep regardless of how often you want to output the field. 
    90    No time averaging should be done in the model code.  
    91 3. If it is computationally expensive to calculate your new diagnostic you should also use "iom_use" to 
    92    determine if it is requested in the current model run. For example, 
     732. Send the field to XIOS using ``CALL iom_put( 'field_id', variable )`` where ``field_id`` is a unique id for your new diagnostics and variable is the fortran variable containing the data. 
     74   This should be called at every model timestep regardless of how often you want to output the field. No time averaging should be done in the model code.  
     753. 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, 
    9376    
    94    .. code-block:: fortran 
     77.. code-block:: fortran 
    9578 
    9679      IF iom_use('field_id') THEN 
     
    10184      ENDIF 
    10285 
    103 4. Add a variable definition to the ``field_def.xml`` (or ``field_def-???.xml``) file 
     864. Add a variable definition to the ``field_def_nemo-???.xml`` file. 
    104875. Add the variable to the ``iodef.xml`` or ``file_definition.xml`` file. 
Note: See TracChangeset for help on using the changeset viewer.