Changes between Version 7 and Version 8 of Users/Model Interfacing/Inputs Outputs


Ignore:
Timestamp:
2017-03-30T01:18:41+02:00 (4 years ago)
Author:
nicolasmartin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Users/Model Interfacing/Inputs Outputs

    v7 v8  
    11= Inputs-Outputs (Using XIOS) 
     2 
     3Last edition: '''[[Wikinfo(changed_ts)]]''' by '''[[Wikinfo(changed_by)]]''' 
    24 
    35Output 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. 
    46 
    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. 
     7Use 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. 
    68 
    79== XIOS namelists 
     
    2022 
    2123=== Attached Mode 
    22 In 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. 
    23  
     24In 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. 
    2425 
    2526== Adding new diagnostics 
     
    2728   1) Add any necessary code to calculate you new diagnostic in NEMO 
    2829 
    29    2) 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. 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.  
     30   2) 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. 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.  
    3031 
    3132   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, 
     
    3940}}} 
    4041 
    41    4) Add a variable definition to the field_def.xml (or field_def-???.xml) file 
     42   4) Add a variable definition to the `field_def.xml` (or `field_def-???.xml`) file 
    4243 
    43    5) Add the variable to the iodef.xml or file_definition.xml file. 
    44  
    45  
    46  
     44   5) Add the variable to the `iodef.xml` or `file_definition.xml` file.