Early Mars benchmark - DYNAMICO

From Planets
Revision as of 09:03, 23 October 2024 by Maxime Maurice (talk | contribs) (Created page with "== Prerequisites == First make sure you can run the early Mars benchmark with the LMDZ dynamical core. Then install dynamico and XIOS (preferentially in the same trunk direct...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Prerequisites

First make sure you can run the early Mars benchmark with the LMDZ dynamical core. Then install dynamico and XIOS (preferentially in the same trunk directory). Now that everything is working separately, let's put everything together.

Compiling dynamico with the generic PCM physics package

First we need to compile dynamico with the physics package of the generic PCM. Go to the ICOSA_LMDZ folder. To compile, we will use the make_icosa_lmdz file which is a wrapper for the compilation scripts of IOIPSL, XIOS, the generic PCM's physics (called by makelmdz_fcm -libphy) and dynamico (make_icosa). Some compilation command line examples are provded in the ascii files make_irene_lmdz and compile_adastra-gnu. For our purpose, let's go with the following command:

make_icosa_lmdz -p std -p_opt "-b 32x36" -parallel mpi_omp -arch {your_arch} -arch_path ../ARCH -job 8

Make sure that you have been using the same architecture for installing all the pieces. If the compilation worked, the last lines of the prompt look something like:

->Make               : 6 seconds
->TOTAL              : 7 seconds
Build command finished on Mon Oct 21 15:05:13 2024.

Notice that it will probably take a bit longer, in particular if XIOS needs to be compiled. The bin folder now contains an executable called icosa_lmdz.exe.

Adapting the early Mars benchmark

Now go to the folder of the early Mars benchmark sources, and create a subfolder called "dynamico". Copy and paste all the .def files from the benchmark into this folder, as well as your executable icosa_lmdz.exe.

planetary_const.def

We'll need additional .def files for the planetary constants and run informations. You can simply copy and paste the const_earth.def for Earth used in the Held and Suarez test of dynamico into the local folder as const_mars.def, and adapt it appropriately.

run_icosa.def

We'll also use a run_icosa.def file, for which you can find inforrmation here. You can modify it to have 40 triangles subdivisions and n_spliti and n_splitj equal to 4, and llm=15 (15 vertical levels, as in the benchmark). You also need to set disvert=plugin, meaning that the vertical discretization will be handled by the appropriate plugin from the generic model. Set day_step=480, nqtot=3 (given by traceur.def). Deactivate Rayleigh friction (rayleigh_friction_type=none). Finally, make sure you have physics = phys_external. Now that all the run info is in the run_icosa.def file, run.def is simply calling this file:

###########################################################################
### INCLUDE OTHER DEF FILES (physics, specific settings, etc...)
###########################################################################
INCLUDEDEF=run_icosa.def

INCLUDEDEF=mars_const.def

INCLUDEDEF=callphys.def


prt_level=0

## iphysiq must be same as itau_physics
iphysiq=5
#iphysiq=10

Make sure the tracer.def (the tracer file for dynamico) is consistant with traceur.def (the tracer file for the physics).

Contrarily to the native benchmark, we'll need to use XIOS to run with dynamico. That involves a few more input files. You will find out which xml files you need and where to look for them in the trunk, in the README.xml file which is located in the xml subfolder of the ICOSA_LMDZ folder of the trunk.

The context_physics_lmdz.xml file contains information relative to the physics grid. The original file creates a grid larger than we need. For the benchmark we will reduce the resolution to 32x32. To do so, add the following block taking example on the already existing ones:

<domain id="dom_32_32" type="rectilinear" ni_glo="32" nj_glo="32"   >
  <generate_rectilinear_domain/>
  <interpolate_domain order="1"/>
</domain>

and indicate that we want to use this new grid as the output grid. To do so, modify the existing line defining variable dom_out as:

<domain id="dom_out" domain_ref="dom_32_32"/>

Contrarily to the LMDZ dynamical core, a dynamico run usually does not start from a start.nc initial state. Instead, an initial state is generated, from which the simulation really starts. Let's thus make two subfolders: one called "init" where we will generate the initial state, and one called "run" where the simulation will run.

iodef.xml

Here simply change the line:

<context id="LMDZ" src="./context_lmdz_physics.xml" />

to:

<context id="LMDZ" src="./context_pcm_physics.xml" />

Generating the initial state

In the run_icosa.def, comment out the following lines:

#etat0=start_file
#etat0_start_file_colocated=true

and uncomment instead:

etat0=isothermal
etat0_isothermal_temp=200

and

etat0_ps_white_noise=0.01
etat0_theta_rhodz_white_noise=0.01

Running the simulation