Difference between revisions of "Venus - DYNAMICO"
(→Execution - Test_Case Venus (type Held&Suarez) - DYNAMICO) |
|||
(23 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
Dynamico is the recently developed Dynamical core, enabling better performance and solving some issues of the LMDZ model. To know more about it, see this page: | Dynamico is the recently developed Dynamical core, enabling better performance and solving some issues of the LMDZ model. To know more about it, see this page: | ||
− | [ | + | [[The DYNAMICO dynamical core]]. |
== Installation - DYNAMICO == | == Installation - DYNAMICO == | ||
− | Before installing '''DYNAMICO''', you should have previously installed '''LMDZ''' (and everything that refers to it), see this page: | + | Before installing '''DYNAMICO''', you should have previously installed '''LMDZ Venus''' (and everything that refers to it), see this page: |
[https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/Quick_Install_and_Run_Venus_PCM Quick Install and Run Venus PCM] | [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/Quick_Install_and_Run_Venus_PCM Quick Install and Run Venus PCM] | ||
− | + | One should also see the '''PCM directory layout''' page to understand and install everything : [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/PCM_directory_layout PCM directory layout]. | |
− | + | You should have '''XIOS''' (please see this page for its installation: [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_XIOS_Library The XIOS Library]). | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Finally, you also need [[the DYNAMICO dynamical core|DYNAMICO '''installed and compiled''']]. | |
− | == Execution - Test_Case - DYNAMICO == | + | == Execution - Test_Case Venus (type Held&Suarez) - DYNAMICO == |
Now, we will run a testCase “without the physics”, to verify that the Dynamical Core works alone. | Now, we will run a testCase “without the physics”, to verify that the Dynamical Core works alone. | ||
− | To do this, make a new folder “''' | + | To do this, make a new folder “'''test_VENUS'''”, alongside '''ICOSAGCM''' and '''XIOS'''. |
<pre> | <pre> | ||
cd /your/path/trunk/ | cd /your/path/trunk/ | ||
− | mkdir | + | mkdir test_VENUS |
</pre> | </pre> | ||
− | Then, we need to copy the specific .def files for this testCase | + | Then, we need to copy the specific .def files for this testCase (they are in /ICOSAGCM), we will use (in the most part) the same as in the [[The_DYNAMICO_dynamical_core#Running_a_simple_Held_and_Suarez_test_case|Held&Suarez basic testCase]]. |
<pre> | <pre> | ||
Line 78: | Line 32: | ||
cd /your/path/trunk/ICOSAGCM/TEST_CASE/HELD_SUAREZ | cd /your/path/trunk/ICOSAGCM/TEST_CASE/HELD_SUAREZ | ||
− | # Copy the .def files in the repository | + | # Copy the .def files in the repository test_VENUS |
− | cp *def ../../../ | + | cp *def ../../../test_VENUS |
</pre> | </pre> | ||
Line 86: | Line 40: | ||
<pre> | <pre> | ||
cd /your/path/trunk/ICOSAGCM/xml/DYNAMICO_XML | cd /your/path/trunk/ICOSAGCM/xml/DYNAMICO_XML | ||
− | cp *xml ../../../ | + | cp *xml ../../../test_VENUS |
cd .. | cd .. | ||
− | cp iodef.xml ../../ | + | cp iodef.xml ../../test_VENUS |
</pre> | </pre> | ||
− | Then, | + | Then, copy the executable '''“icosa_gcm.exe”''' (it is placed in '''ICOSAGCM/bin''') in the test directory test_VENUS : |
<pre> | <pre> | ||
− | + | cd /your/path/trunk/ICOSAGCM/bin | |
− | + | cp icosa_gcm.exe ../../test_VENUS | |
− | |||
− | |||
− | |||
− | |||
</pre> | </pre> | ||
− | If | + | If, when running the model, you want a NetCDF file (.nc) with all the data, you should modify the .xml file “'''file_def_dynamico.xml'''”, line 70, changing the “false” to “true” for “enabled”. This will enable the “dynamico.nc” file to be created, it is already a re-interpolation of the dynamico-grid into long-lat, which makes it usable directly with Ferret/Panoply. |
+ | Then, there are some changes to be made to the run.def and earth_const.def files. | ||
+ | First, rename the '''earth_const.def''' file into '''venus_const.def''' file : | ||
<pre> | <pre> | ||
− | + | mv earth_const.def venus_const.def | |
+ | </pre> | ||
− | + | Next, you should [[venus_const.def|change the '''venus_const.def''' completely, to match the Venus atmosphere]]. | |
− | |||
− | |||
− | |||
− | + | After this, it is time to change [[Run.def for Venus-DYNAMICO|the '''run.def''' file]], to be quick, you should change the '''"etat0"''' parameter into '''"venus"''', the '''"physics"''' parameter into '''"Lebonnois2012"''', the '''"day_step"''' (because of the long day one Venus), etc.... Rather than explaining all the different parameters that changes, [[Run.def for Venus-DYNAMICO|see the dedicated example]] of a complete script (that should work from scratch) : | |
− | + | (one can compare with the [[run.def for Held&Suarez test case]] to see the differences) | |
− | |||
− | |||
− | |||
− | |||
− | Everything is ready to run the model. Go to ''' | + | Everything is now ready to run the model. Go to '''test_VENUS''', then use the slurm command “'''sbatch'''” to submit a job to the cluster. |
<pre> | <pre> | ||
Line 130: | Line 76: | ||
</pre> | </pre> | ||
− | Slurm script (example): | + | Slurm script (example for spirit1): |
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Line 173: | Line 119: | ||
Now that we verified that the testCase '''HELD_and_SUAREZ''' is working, we will be able to “plug” the '''DYNAMICO''' dynamical core to some real Physics. For this, you already need '''LMDZ''', alongside '''XIOS''' and '''DYNAMICO'''. | Now that we verified that the testCase '''HELD_and_SUAREZ''' is working, we will be able to “plug” the '''DYNAMICO''' dynamical core to some real Physics. For this, you already need '''LMDZ''', alongside '''XIOS''' and '''DYNAMICO'''. | ||
− | In addition, you should have '''ICOSA_LMDZ''': | + | In addition, you should have '''[[ICOSA LMDZ directory layout and contents|ICOSA_LMDZ/]]'''. |
− | + | Your trunk folder should look like this: | |
<pre> | <pre> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
ARCH ICOSAGCM ICOSA_LMDZ LMDZ.COMMON LMDZ.VENUS IOIPSL XIOS test_HELD_SUAREZ | ARCH ICOSAGCM ICOSA_LMDZ LMDZ.COMMON LMDZ.VENUS IOIPSL XIOS test_HELD_SUAREZ | ||
</pre> | </pre> | ||
− | + | Please now follow how to [[DYNAMICO_with_LMDZ_physics#Compiling_DYNAMICO_with_a_LMDZ_physics_package|compile DYNAMICO with a physics package]]. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Running Venus - DYNAMICO == | == Running Venus - DYNAMICO == | ||
Line 260: | Line 136: | ||
</pre> | </pre> | ||
− | See the README.md in / | + | === Where to find .xml files === |
+ | |||
+ | See the README.md in '''[[ICOSA LMDZ directory layout and contents|ICOSA_LMDZ/]]''' to know what '''xml''' files to take where (note that this exemple written right after correspond to the '''current''' way of choosing '''xml files''', this if therefore strongly adviced to open the README that should be always up to date) : | ||
<syntaxhighlight lang="text"> | <syntaxhighlight lang="text"> | ||
Line 269: | Line 147: | ||
- context_input_dynamico.xml | - context_input_dynamico.xml | ||
- field_def_dynamico.xml | - field_def_dynamico.xml | ||
+ | - nudging_dynamico.xml | ||
+ | - sponge_dynamico.xml | ||
from ICOSA_LMDZ/xml [INTERFACE] | from ICOSA_LMDZ/xml [INTERFACE] | ||
Line 308: | Line 188: | ||
cp field_def_physics.xml context_lmdz_physics.xml ../../Venus_DYNAMICO | cp field_def_physics.xml context_lmdz_physics.xml ../../Venus_DYNAMICO | ||
</pre> | </pre> | ||
+ | |||
+ | When writing this documentation, the '''context_lmdz_physics.xml''' contained in LMDZ.VENUS/deftank is probably lacking some lines, and you should have a '''"dom_glo"''' issue when running DYNAMICO, here are the lines to change/add : | ||
+ | |||
+ | Line 7 to completely replace by : (replacing between <domain_definition> and </domain_definition>) | ||
+ | <pre> | ||
+ | <domain_group id="dom_glo" data_dim="1" > | ||
+ | <domain id="dom_glo" /> | ||
+ | </domain_group> | ||
+ | |||
+ | <domain id="dom_regular" ni_glo="96" nj_glo="97" type="rectilinear" > | ||
+ | <generate_rectilinear_domain lat_start="-90" lat_end="90" lon_start="180" lon_end="-176.25" /> | ||
+ | <interpolate_domain order="1"/> | ||
+ | </domain> | ||
+ | |||
+ | <domain id="dom_out" domain_ref="dom_regular"/> | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | Then lines 44 to 46, add : (line 34 from the original file) | ||
+ | <pre> | ||
+ | <grid id="grid_2D"> | ||
+ | <domain domain_ref="dom_glo" /> | ||
+ | </grid> | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | Then lines 50 to 57 add : (line 37 from the original file) | ||
+ | <pre> | ||
+ | </grid> | ||
+ | <!-- output grids --> | ||
+ | <grid id="grid_3D_out"> | ||
+ | <domain domain_ref="dom_out" /> | ||
+ | <axis axis_ref="altitude" /> | ||
+ | </grid> | ||
+ | <grid id="grid_2D_out"> | ||
+ | <domain domain_ref="dom_out" /> | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | === Where to find .def files === | ||
+ | More '''.def''' files are needed in order to run the complete '''Venus-DYNAMICO with LMDZ physics''' (compared to the Held&Suarez testCase) : | ||
+ | |||
+ | - '''run_icosa.def''' : everything linked to the DYNAMICO dynamical core will be driven in this file, see this page : [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_run_icosa.def_Input_File The run_icosa.def Input File] | ||
+ | |||
+ | - '''physics.def''' : everything linked to the LMDZ physics will be driven in this file. | ||
+ | |||
+ | - '''run.def''' : just a "bridge" for run_icosa.def and physics.def. | ||
+ | |||
+ | - '''z2sig.def''' : defines the vertical level of discretization, to find in LMDZ.VENUS. (there are many vertical discretization, 50, 78 etc.... 50 levels will be quicker to run, therefore the best way to test if everything works). See this page for more information : [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_z2sig.def_Input_File The z2sig.def Input File] | ||
+ | |||
+ | === Where to find others needed files === | ||
+ | |||
TO CONTINUE | TO CONTINUE | ||
+ | == Using the restart.nc file to continue your simulation == | ||
+ | If you want to continue you simulation using the "end-data" of your previous one, all is explained here in the DYNAMICO page : [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_DYNAMICO_dynamical_core#Using_the_restart.nc_file_to_continue_your_simulation using restart.nc] | ||
+ | |||
+ | [[Category:DYNAMICO]] | ||
+ | [[Category:Venus-DYNAMICO]] | ||
[[Category:Venus-Model]] | [[Category:Venus-Model]] |
Latest revision as of 17:50, 18 October 2024
Contents
Venus - DYNAMICO
Dynamico is the recently developed Dynamical core, enabling better performance and solving some issues of the LMDZ model. To know more about it, see this page: The DYNAMICO dynamical core.
Installation - DYNAMICO
Before installing DYNAMICO, you should have previously installed LMDZ Venus (and everything that refers to it), see this page: Quick Install and Run Venus PCM
One should also see the PCM directory layout page to understand and install everything : PCM directory layout.
You should have XIOS (please see this page for its installation: The XIOS Library).
Finally, you also need DYNAMICO installed and compiled.
Execution - Test_Case Venus (type Held&Suarez) - DYNAMICO
Now, we will run a testCase “without the physics”, to verify that the Dynamical Core works alone.
To do this, make a new folder “test_VENUS”, alongside ICOSAGCM and XIOS.
cd /your/path/trunk/ mkdir test_VENUS
Then, we need to copy the specific .def files for this testCase (they are in /ICOSAGCM), we will use (in the most part) the same as in the Held&Suarez basic testCase.
# Go where the .def files are cd /your/path/trunk/ICOSAGCM/TEST_CASE/HELD_SUAREZ # Copy the .def files in the repository test_VENUS cp *def ../../../test_VENUS
Do the same for the .xml files:
cd /your/path/trunk/ICOSAGCM/xml/DYNAMICO_XML cp *xml ../../../test_VENUS cd .. cp iodef.xml ../../test_VENUS
Then, copy the executable “icosa_gcm.exe” (it is placed in ICOSAGCM/bin) in the test directory test_VENUS :
cd /your/path/trunk/ICOSAGCM/bin cp icosa_gcm.exe ../../test_VENUS
If, when running the model, you want a NetCDF file (.nc) with all the data, you should modify the .xml file “file_def_dynamico.xml”, line 70, changing the “false” to “true” for “enabled”. This will enable the “dynamico.nc” file to be created, it is already a re-interpolation of the dynamico-grid into long-lat, which makes it usable directly with Ferret/Panoply.
Then, there are some changes to be made to the run.def and earth_const.def files. First, rename the earth_const.def file into venus_const.def file :
mv earth_const.def venus_const.def
Next, you should change the venus_const.def completely, to match the Venus atmosphere.
After this, it is time to change the run.def file, to be quick, you should change the "etat0" parameter into "venus", the "physics" parameter into "Lebonnois2012", the "day_step" (because of the long day one Venus), etc.... Rather than explaining all the different parameters that changes, see the dedicated example of a complete script (that should work from scratch) :
(one can compare with the run.def for Held&Suarez test case to see the differences)
Everything is now ready to run the model. Go to test_VENUS, then use the slurm command “sbatch” to submit a job to the cluster.
cd /your/path/trunk/test_HELD_SUAREZ sbatch script_d_execution.slurm
Slurm script (example for spirit1):
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=8
#SBATCH --cpus-per-task=1
#SBATCH --partition=zen4 # zen4: 64cores/node and 240GB of memory
##SBATCH --partition=zen16 # zen16: 32 cores/node core and 496GB of memory
#SBATCH -J job_mpi_omp
#SBATCH --time=0:20:00
#SBATCH --output %x.%j.out
source /your/path/trunk/ICOSAGCM/arch/arch-YOUR_ARCH.env
export OMP_NUM_THREADS=1
export OMP_STACKSIZE=400M
mpirun icosa_gcm.exe > icosa_gcm.out 2>&1
In this script, you should modify the path and “YOUR_ARCH” with your architecture (for the source command). Note that we are not using OpenMP here, it is not functional for now (TO UPDATE).
To verify that the code is properly running, you can show directly the “icosa_gcm.out” file.
tail -f icosa_gcm.out
Once the code is finished running, something like this should appear (at the end of the icosa_gcm.out):
GETIN restart_file_name = restart masse advec mass rmsdpdt energie enstrophie entropie rmsv mt.ang GLOB -0.999E-15 0.000E+00 0.79047E+01 0.110E-02 0.261E+00 0.155E-02 0.743E+01 0.206E-01 Time elapsed : 601.628763000000
Connection Venus - DYNAMICO
Now that we verified that the testCase HELD_and_SUAREZ is working, we will be able to “plug” the DYNAMICO dynamical core to some real Physics. For this, you already need LMDZ, alongside XIOS and DYNAMICO.
In addition, you should have ICOSA_LMDZ/. Your trunk folder should look like this:
ARCH ICOSAGCM ICOSA_LMDZ LMDZ.COMMON LMDZ.VENUS IOIPSL XIOS test_HELD_SUAREZ
Please now follow how to compile DYNAMICO with a physics package.
Running Venus - DYNAMICO
After compiling everything in the right order, we need to prepare the directory. Make a new one alongside the others:
cd /your/path/trunk/ mkdir Venus_DYNAMICO
Where to find .xml files
See the README.md in ICOSA_LMDZ/ to know what xml files to take where (note that this exemple written right after correspond to the current way of choosing xml files, this if therefore strongly adviced to open the README that should be always up to date) :
organization of XML files and synchronization with code
-------------------------------------------------------
from ICOSAGCM/xml [DYNAMICO dynamical core]
- context_input_dynamico.xml
- field_def_dynamico.xml
- nudging_dynamico.xml
- sponge_dynamico.xml
from ICOSA_LMDZ/xml [INTERFACE]
- iodef.xml
from LMDZ.VENUS/deftank [LMDZ physics]
- field_def_physics.xml
- context_lmdz_physics.xml
-----
to be created and adapted from ICOSAGCM/xml
>> check compatibility when changing ICOSAGCM version
- context_dynamico.xml
to be created and adapted from ICOSAGCM test cases
>> check compatibility when changing ICOSAGCM version
- file_def_dynamico.xml
From ICOSAGCM/xml/DYNAMICO/ :
cd /your/path/ICOSAGCM/xml/DYNAMICO cp context_input_dynamico.xml field_def_dynamico.xml dynamico.xml nudging_dynamico.xml sponge_dynamico.xml ../../Venus_DYNAMICO
From ICOSA_LMDZ :
cd /your/path/ICOSA_LMDZ/xml cp iodef.xml ../../Venus/DYNAMICO
From LMDZ.VENUS :
cd /your/path/LMDZ.VENUS/deftank cp field_def_physics.xml context_lmdz_physics.xml ../../Venus_DYNAMICO
When writing this documentation, the context_lmdz_physics.xml contained in LMDZ.VENUS/deftank is probably lacking some lines, and you should have a "dom_glo" issue when running DYNAMICO, here are the lines to change/add :
Line 7 to completely replace by : (replacing between <domain_definition> and </domain_definition>)
<domain_group id="dom_glo" data_dim="1" > <domain id="dom_glo" /> </domain_group> <domain id="dom_regular" ni_glo="96" nj_glo="97" type="rectilinear" > <generate_rectilinear_domain lat_start="-90" lat_end="90" lon_start="180" lon_end="-176.25" /> <interpolate_domain order="1"/> </domain> <domain id="dom_out" domain_ref="dom_regular"/>
Then lines 44 to 46, add : (line 34 from the original file)
<grid id="grid_2D"> <domain domain_ref="dom_glo" /> </grid>
Then lines 50 to 57 add : (line 37 from the original file)
</grid> <!-- output grids --> <grid id="grid_3D_out"> <domain domain_ref="dom_out" /> <axis axis_ref="altitude" /> </grid> <grid id="grid_2D_out"> <domain domain_ref="dom_out" />
Where to find .def files
More .def files are needed in order to run the complete Venus-DYNAMICO with LMDZ physics (compared to the Held&Suarez testCase) :
- run_icosa.def : everything linked to the DYNAMICO dynamical core will be driven in this file, see this page : The run_icosa.def Input File
- physics.def : everything linked to the LMDZ physics will be driven in this file.
- run.def : just a "bridge" for run_icosa.def and physics.def.
- z2sig.def : defines the vertical level of discretization, to find in LMDZ.VENUS. (there are many vertical discretization, 50, 78 etc.... 50 levels will be quicker to run, therefore the best way to test if everything works). See this page for more information : The z2sig.def Input File
Where to find others needed files
TO CONTINUE
Using the restart.nc file to continue your simulation
If you want to continue you simulation using the "end-data" of your previous one, all is explained here in the DYNAMICO page : using restart.nc