Skip to content

Multiple nudging files

The default IPSL-CM-LAM example uses a single input file with nudging data, called nudging_forcing.nc. However, we can imagine a configuration where variables are diveded in a per-month fashion, each in a separate file. Such multifile setup is very common, as is in the case of ERA5 data.

The configuration of multiple nudging files is simple and it requires only two steps:

  1. Tell MODIPSL where to find our files
  2. Tell XIOS in which file a given variable is.

Let's start!

Configuring MODIPSL

Paths to nudging files are defined under the List key in the [BoundaryFiles] section of the COMP/dynamico.card file. The standard LAM with ERA5 experiment uses only one nudging_forcing.nc file:

[BoundaryFiles]
List=(${R_IN}/ATM/FORCING_LAM/${config_UserChoices_ForcingName}_${config_UserChoices_ForcingDate}.nc, nudging_forcing.nc)

This file is copied from the source path (on the left) to the target file (on the right). The source path can be parametrized, like in the example above, where config_UserChoices_<VAR> variables are taken from the [UserChoices] section of the main config.card. There is also a set of time-related variables, like ${month} and ${year}.

Info

The ${R_IN} variable is machine-specific and it points to, de-facto, a standard directory with data. You can investigate it, by looking into the source code of libIGCM. This is what the revision 1703 of libIGCM has to tell us:

> grep R_IN= libIGCM_sys -r | sed -E 's/.*sys_([^.]*)\.ksh.*(R_IN:=.*)}.*/\1 has \2/'
mesoipsl has R_IN:=/projsu/igcmg/IGCM
irene has R_IN:=/ccc/work/cont003/igcmg/igcmg/IGCM
irene-amd has R_IN:=/ccc/work/cont003/igcmg/igcmg/IGCM
default has R_IN:=/home_local/${LOGIN}/IGCM
jeanzay has R_IN:=/gpfswork/rech/psl/commun/IGCM
obelix has R_IN:=/home/orchideeshare/igcmg/IGCM

The target specifies the name of the file in the $RUN_DIR directory. It is either a completely new file name, like nudging_forcing.nc, or . which leaves the name intact. The file renaming is important for multi-period simulations, e.g. month-by-month simulation, because the XIOS configuration only operates on fixed file names, like r.nc or u.nc. If the nudging file has time-parametrized name, similar to u_${year}_${month}.nc, in the end, it must be renamed to u.nc just for XIOS.

Use case: using separated per-variable files

This is just simple as adding several pairs of source-target!


Warning

Watch out for any whitespaces at the end of list's row. They could destroy the *.card format and cut the list in half.

Use case: changing simulation region

Configuring XIOS

Removing variables

It is not possible to remove any nudging variable, as all of them are required by the ICOSA_LMDZ driver. However, it is possible to give them 0 value and don't include as NetCDF file (either a separate one or combined nudging_forcing.nc).