nemo Sub-Commands
The command pixi run nemo help produces a list of the available nemo options and sub-commands:
For details of the arguments and options for a sub-command use pixi run nemo help <sub-command>. For example:
$ pixi run nemo help run
You can check what version of nemo you have installed with:
$ pixi run nemo --version
run Sub-command
The run sub-command prepares, executes, and gathers the results from the NEMO run described in the specified run description file. The results are gathered in the specified results directory.
The path to the run directory, and the response from the job queue manager (typically a job number) are printed upon completion of the command.
The run sub-command does the following:
Execute the prepare Sub-command via the NEMO-Cmd API to set up a temporary run directory from which to execute the NEMO run.
Create a
NEMO.shjob script in the run directory. The job script:runs NEMO
executes the combine Sub-command to combine the per-processor restart and/or results files
executes the deflate Sub-command to deflate the variables in the large netCDF results files using the Lempel-Ziv compression algorithm to reduce the size of the file on disk
executes the gather Sub-command to collect the run description and results files into the results directory
Submit the job script to the queue manager via the command given by the
--queue-job-cmdoption (which defaults to qsub).
See the Run Description File Structure section for details of the run description YAML file.
The run sub-command concludes by printing the path to the run directory and the response from the job queue manager. Example:
$ pixi run nemo run nemo.yaml $HOME/CANYONS/Mackenzie/myrun
If the run sub-command prints an error message,
you can get a Python traceback containing more information about the error by re-running the command with the --debug flag.
If you are using on-the-fly deflation in XIOS-2;
i.e. you are using 1 XIOS-2 process and have the compression_level="4" attribute set in all of the file_group definitions in your file_def.xml file;
you should use the --no-deflate option to exclude deflate Sub-command from the NEMO.sh job script.
prepare Sub-command
The prepare sub-command sets up a run directory from which to execute the NEMO run described in the specified run description, and output file definitions files:
See the Run Description File Structure section for details of the run description file.
The pixi run nemo prepare command concludes by printing the path to the run directory it created. Example:
$ pixi run nemo prepare nemo.yaml
The name of the run directory is intended to be ephemerally used for a single run.
It’s name is composed of the run id from the run description YAML file
(see Basic Run Configuration)
and the directory’s creation date/time stamp.
If the pixi run nemo prepare command prints an error message,
you can get a Python traceback containing more information about the error by re-running the command with the --debug flag.
Run Directory Contents
The run directory contains:
The run description file provided on the command line.
A
namelist_cfg(the file name required by NEMO) file that is constructed by concatenating the namelist segments listed in the run description file (see Run Description File Structure).A symlink to the
EXP00/namelist_reffile in the directory of the NEMO configuration given by the config name and NEMO code config keys in the run description file is also created to provide default values to be used for any namelist variables not included in the namelist segments listed in the run description file.A symlink called
bathy_meter.nc(the file name required by NEMO) to the bathymetry file specified in the grid section of the run description file.A symlink called
coordinates.nc(the file name required by NEMO) to the grid coordinates file specified in the grid section of the run description file.A file called
domain_def.xml(the file name required by NEMO) that contains the XIOS output server domain definitions for the run. The file that is copied todomain_def.xmlis specified in the output section of the run description file.A file called
field_def.xml(the file name required by NEMO) that contains the XIOS output server field definitions for the run. The file that is copied tofield_def.xmlis specified in the output section of the run description file.A file called
iodefs.xml(the file name required by NEMO). that file specifies the output files and variables they contain for the run. The file that is copied toiodefs.xmlis specified in the output section of the run description file. It is also sometimes referred to as the NEMO IOM defs file.The
nemo.exeexecutable found in theBLD/bin/directory of the NEMO configuration given by the config name and NEMO code config keys in the run description file. pixi run nemo prepare aborts with an error message and exit code 2 if thenemo.exefile is not found. In that case the run directory is not created.The
xios_server.exeexecutable found in thebin/sub-directory of the directory given by the XIOS key in the paths section of the run description file. pixi run nemo prepare aborts with an error message and exit code 2 if thexios_server.exefile is not found. In that case the run directory is not created.
The run directory also contains symbolic links to forcing directories (e.g. initial conditions, atmospheric, open boundary conditions, rivers run-off, etc.) The names of those symlinks and the directories that they point to are given in the forcing section of the run description file. Please see forcing Section in the Run Description File Structure docs for full details. It is your responsibility to ensure that these symlinks match the forcing directories given in your namelist files.
Finally,
if the run description YAML file contains a vcs revisions section,
the run directory will contain 1 or more files whose names end with _rev.txt.
The file names begin with the root directory names of the version control repositories given in the vcs revisions section.
The files contain version control system metadata from the listed version control repositories.
Those files provide a record of the last committed revision of the repositories that will be in effect for the run,
which is important reproducibility information for the run.
If any of the listed repositories contain uncommitted changes,
the paths of the files and their status codes,
the information from the version control system status command for those files will be appended to the repository’s _rev.txt file.
Please see the vcs revisions Section for more details.
combine Sub-command
The combine sub-command combines the per-processor results and/or restart files from an MPI NEMO run described in DESC_FILE using the the NEMO rebuild_nemo tool:
The per-processor files are deleted.
If the pixi run nemo combine command prints an error message,
you can get a Python traceback containing more information about the error by re-running the command with the --debug flag.
deflate Sub-command
The deflate sub-command deflates the variables in netCDF files using the Lempel-Ziv compression algorithm to reduce the size of the file on disk:
You can give the command as many file names as you wish, with or without paths. You can also use shell wildcards and/or regular expressions to produce the list of file paths/names to deflate.
Storage savings can be as much as 80%. Files processed by deflate are converted to netCDF-4 format. The deflated file replaces the original file, but the deflation process uses temporary storage to prevent data loss.
pixi run nemo deflate is equivalent to running:
$ ncks -4 -L4 -O FILEPATH FILEPATH
on each FILEPATH.
If the pixi run nemo deflate command prints an error message,
you can get a Python traceback containing more information about the error by re-running the command with the --debug flag.
gather Sub-command
The gather sub-command moves results from a NEMO run into a results directory:
If the pixi run nemo gather command prints an error message,
you can get a Python traceback containing more information about the error by re-running the command with the --debug flag.