With the sole exception of running NEMO without MPI
(in which case output options are limited to the default minimum),
diagnostic outputs from NEMO are handled by the third party ``XIOS`` library.
It can be used in two different modes:
:*attached*: Each NEMO process directly deals with its own output.
:*detached*: You have separate XIOS processes that deal with the output.
For both of these options, you can activate the option for "one_file" or "multiple_file" mode. For the former, output is collected and collated to directly produce one single file for your domain. For the latter option, you will have as many output files as your number of NEMO processes (if in attached) or XIOS processes (if in detatched).
For more details, refer the to section on configuring XIOS outputs below.
Instructions on how to install XIOS can be found on its :xios_doc:`wiki<>`.
...
...
@@ -127,7 +123,7 @@ modifications, can clone the repository at the release tag:
Experienced developers who may wish to experiment with other branches or code more recent than the
release -perhaps with a view to returning developements to the system, can clone the main repository
release (perhaps with a view to returning developements to the system), can clone the main repository
and then switch to the tagged release:
.. code:: console
...
...
@@ -178,6 +174,8 @@ All compiler options in NEMO are controlled using files in :file:`./arch/arch-'m
If you want further help on how to use this functionality: ./build_arch-auto.sh -h
The build_arch-auto.sh will create an arch file called arch-auto.fcm
Alternatively, you can copy, rename and edit a configuration file from an architecture similar to your own.
You will need to set appropriate values for all of the variables in the file.
In particular the variables:
...
...
@@ -199,30 +197,31 @@ Preparing an experiment
Create and compile a new configuration
--------------------------------------
The main script to {re}compile and create executable is called :file:`makenemo` located at
The main script to {re}compile and create an executable is called :file:`makenemo`, it is located at
the root of the working copy.
It is used to identify the routines you need from the source code, to build the makefile and run it.
As an example, compile a :file:`MY_GYRE` configuration from GYRE with 'my_arch':
As an example, compile a :file:`MY_GYRE` configuration from GYRE, which can be found in the ``cfgs`` directory (more information on GYRE can be found in the `NEMO Reference Manual <https://doi.org/10.5281/zenodo.6334656>`_). The following example uses the 'auto' arch file (if you used the automatic build):
.. code-block:: sh
./makenemo –m 'my_arch' –r GYRE -n 'MY_GYRE'
./makenemo -h # This is for help
./makenemo –m 'auto' –r GYRE -n 'MY_GYRE'
Then at the end of the configuration compilation,
:file:`MY_GYRE` directory will have the following structure.
the :file:`MY_GYRE` directory will have the following structure.
XIOS allows for an efficient management of diagnostic outputs as
the time averaging, file writing and even some simple arithmetic or regridding are carried out in
parallel to the NEMO model run.
XIOS allows for an efficient management of diagnostic outputs.
This page gives a basic introduction to using XIOS with NEMO.
Additional information are available at the XIOS :xios:`wiki<>` and in the NEMO reference manual.
Use of XIOS for NEMO IOs is activated using the pre-compiler key ``key_xios``.
XIOS is controlled by means of XML input files that should be copied to your model run directory before running the model.
Examples of these files can be found in the reference configurations (:file:`./cfgs`).
Examples of these files can be found in the reference configurations' subdirectories (:file:`./cfgs`).
The XIOS executable expects to find a file called :file:`iodef.xml` in the model run directory.
In NEMO we have made the decision to use include statements in the :file:`iodef.xml` file to include:
To improve readability, NEMO has the following 'include' statements in the :file:`iodef.xml` file:
- :file:`field_def_nemo-oce.xml` (for physics),
- :file:`field_def_nemo-ice.xml` (for ice),
- :file:`field_def_nemo-pisces.xml` (for biogeochemistry) and
- :file:`domain_def.xml` from the :file:`./cfgs/SHARED` directory.
- :file:`field_def_nemo-oce.xml` (potential output variable definition for physics)
- :file:`field_def_nemo-ice.xml` (potential output variable definition for ice)
- :file:`field_def_nemo-pisces.xml` (potential output variable definition for biogeochemistry)
- :file:`domain_def.xml` and :file:`axis_def.xml` (horizontal and vertical grid information)
Most users will not need to modify :file:`domain_def.xml` or :file:`field_def_nemo-???.xml` unless
they want to add new diagnostics to the NEMO code.
The definition of the output files is organized into separate :file:`file_definition.xml` files which
are included in the :file:`iodef.xml` file.
All these files are available in the :file:`./cfgs/SHARED` directory.
.. note::
| Most users will not modify the above xml files unless they want to add new diagnostics to the NEMO code.
| The user, instead, defines the selection of output files that is of interest to them in :file:`file_def_nemo-oce/ice/pisces.xml` files.
XIOS be used along with NEMO with two different modes:
XIOS can be used along with NEMO in two different modes:
Detached Mode
^^^^^^^^^^^^^
...
...
@@ -291,6 +297,9 @@ This method is less efficient than the detached mode but can be more convenient
with small configurations.
To activate this mode simply set ``using_server`` to false in the :file:`iodef.xml` file
.. note::
| For both of these options, you can activate the option for "one_file" or "multiple_file" mode. For the former, output is collected and collated to directly produce one single file for your domain. For the latter option, you will have as many output files as your number of NEMO processes (if in attached) or XIOS processes (if in detatched).
More :file:`makenemo` options
-----------------------------
...
...
@@ -312,16 +321,15 @@ For example:
./makenemo –m 'my_arch' –r GYRE -n 'MY_GYRE' -j 8
will compile up to 8 processes simultaneously.
will compile with up to 8 processes simultaneously.
Default behaviour
-----------------
At the first use,
The first time you call ``makenemo``,
you need the ``-m`` option to specify the architecture configuration file
(compiler and its options, routines and libraries to include),
then for next compilation, it is assumed you will be using the same compiler.
If the ``-n`` option is not specified the last compiled configuration will be used.
then for next compilation, it is assumed that you will be using the same compiler.
Tools used during the process
-----------------------------
...
...
@@ -330,11 +338,11 @@ The various bash scripts used by ``makenemo`` (for instance, to create the
``WORK`` directory) are located in the ``mk`` subdirectory. In most cases, there
should be no need for user intervention with these scripts. Occasionally,
incomplete builds can leave the environment in a indeterminate state. If
problems are experienced with subsequent attempts then running:
problems are experienced with subsequent attempts then try running: