Common recipes¶
This page describes several ready-to-use features, extensions, and changes to your LAM simulations. All of them were tested and are often used in final simulations.
Watch out for your model version!
All the examples presented here are based on the models coming from IPSL/modipsl SVN revision 7494 / Git SHA 2a853521. If you are using another version, the models might be different so that some of the recipes could not work anymore or require substential changes to work again. Please contact us, if you experience some difficulties in applying these recipes.
Set liquid clouds (clwc) and liquid ice (ciwc) to 0¶
It is possible to drop liquid clouds and ice variables and assign them to a custom value, including 0. The benefit is often huge, as we can drop two variables (single nudging file) or two NetCDF files (multi-file setup). Furthermore, some of the analysis performed by the IPSL-CM-LAM team show little impact of 0 value on the final simulation.
Remove uneccessary data¶
In the case of a single nudging_forcing.nc file, there is nothing to do as the clwc and ciwc variables will be skipped.
However, you can also remove them and prepare a thinner nudging file.
On the other hand, with a multi-file setup you should modify the COMP/dynamico.card, so that the clwc.nc and ciwc.nc files (or other names) are not copied anymore.
Copying them is not a problem, however it takes precious simulation time:
[BoundaryFiles]
List = (${config_UserChoices_ForcingDataDir}/q_${year}.nc, q.nc), \
- (${config_UserChoices_ForcingDataDir}/clwc_${year}.nc, clwc.nc), \
- (${config_UserChoices_ForcingDataDir}/ciwc_${year}.nc, ciwc.nc), \
(${config_UserChoices_ForcingDataDir}/r_${year}.nc, r.nc), \
(${config_UserChoices_ForcingDataDir}/sp_${year}.nc, sp.nc), \
(${config_UserChoices_ForcingDataDir}/t2m_${year}.nc, t2m.nc), \
Lastly, we edit nudging_dynamico.xml to remove any references to these variables inside input file definitions, in <file id="nudging_in" .../>:
<field id="H2O_g_nudged_read" name="q" />
- <field id="H2O_l_nudged_read" name="clwc" />
- <field id="H2O_s_nudged_read" name="ciwc" />
<field id="H2O_b_nudged_read" name="cbwc" enabled="false" />
and, in <file id="nudging_in0" ... />:
<field id="H2O_g_nudged_read0" name="q" />
- <field id="H2O_l_nudged_read0" name="clwc" />
- <field id="H2O_s_nudged_read0" name="ciwc" />
<field id="H2O_b_nudged_read0" name="cbwc" enabled="false" />
Set values to 0¶
Once, the uneccessary data is out of our way we can setup the variables to 0.
In order to so, we will use an XIOS trick where we convert data of conforming size, from an existing variable, to 0 at each timestep.
The q variable of specific humidity is perfect for this task as it has the required size (surface variables z and sp would not work here).
All required changes are applied inside <field_definition> tag in the nudging_dynamico.xml file.
<field id="H2O_l_nudged_horiz_interp"
- field_ref="H2O_l_nudged_read"
+ field_ref="H2O_g_nudged_read"
domain_ref="from_nudged"
axis_ref="axis_nudged"
-/>
+>this*0.</field>
<field id="H2O_s_nudged_horiz_interp"
- field_ref="H2O_s_nudged_read"
+ field_ref="H2O_g_nudged_read"
domain_ref="from_nudged"
axis_ref="axis_nudged"
-/>
+>this*0.</field>
<field id="H2O_l_nudged_horiz_interp0"
- field_ref="H2O_l_nudged_read0"
+ field_ref="H2O_g_nudged_read0"
domain_ref="from_nudged"
axis_ref="axis_nudged"
-/>
+>this*0.</field>
<field id="H2O_s_nudged_horiz_interp0"
- field_ref="H2O_s_nudged_read0"
+ field_ref="H2O_g_nudged_read0"
domain_ref="from_nudged"
axis_ref="axis_nudged"
-/>
+>this*0.</field>
# Set liquid clouds (clwc) to zero
[[dynamico."nudging_dynamico.xml".xpath]]
pattern = ".//field[@id='H2O_l_nudged_horiz_interp']"
value = "this*0."
[[dynamico."nudging_dynamico.xml".xpath]]
pattern = ".//field[@id='H2O_l_nudged_horiz_interp']"
attribute = "field_ref"
value = "H2O_g_nudged_read"
[[dynamico."nudging_dynamico.xml".xpath]]
pattern = ".//field[@id='H2O_l_nudged_horiz_interp0']"
value = "this*0."
[[dynamico."nudging_dynamico.xml".xpath]]
pattern = ".//field[@id='H2O_l_nudged_horiz_interp0']"
attribute = "field_ref"
value = "H2O_g_nudged_read0"
# Set ice clouds (ciwc) to zero
[[dynamico."nudging_dynamico.xml".xpath]]
pattern = ".//field[@id='H2O_s_nudged_horiz_interp']"
value = "this*0."
[[dynamico."nudging_dynamico.xml".xpath]]
pattern = ".//field[@id='H2O_s_nudged_horiz_interp']"
attribute = "field_ref"
value = "H2O_g_nudged_read"
[[dynamico."nudging_dynamico.xml".xpath]]
pattern = ".//field[@id='H2O_s_nudged_horiz_interp0']"
value = "this*0."
[[dynamico."nudging_dynamico.xml".xpath]]
pattern = ".//field[@id='H2O_s_nudged_horiz_interp0']"
attribute = "field_ref"
value = "H2O_g_nudged_read0"
Every nudging-forcing variable must go through the interpolation process.
This is where we inject the zeros.
The H2O_l and H2O_s represent liquid clouds (clwc) and liquid ice (ciwc), respectively.
First, we make sure these fields take data from the specific humidity variable q (here H2O_g) by setting the field_ref to H2O_g_nudged_read or H2O_g_nudged_read0.
Watch out for the suffixes!
References to specific humidity variable H2O_g_* have two different suffixes: _read0 and _read. They represent the data at two timesteps, t and t+1, which is neccessary to perform any kind of interpolation. The same applies to the interpolated fields with _interp0 and _interp suffixes, respectively.
Finally, we convert the incoming humidity data into 0, by taking a current timestep value this and multiplying it by 0..
If you want a constant value C instead, you could write this*0.+C, but is there even a reason to try that?
Running simulations beyond year 2014¶
By default, the LAM simulation can run up to year 2014 (inclusive) if only the nudging-forcing data covering this period is provided. However, after year 2014, the historical data ends for ozone, CO2, CH4, N2O, CFC11, and CFC12. Luckily, future projections of this data, covering periods of up to year 2100, exist on all supported machines:
The easy case is when our simulation starts after 2014, because it is enough to just update the paths to new files.
However, when we start before 2014 and go after, our simulation must switch from one set of files to another one.
Here, we show this exact case for a simulation over the period 2009-2020.
Our new configuration uses "SmoothFiles" of MODIPSL/libIGCM a feature allowing switching between files as a function of the CumulPeriod (an index of the current simulation period).
The example runs in a yearly fashion using Period=1Y, hence, in the period 2009-2020 (inclusive) there are 12 CumulPeriod.