Difference between revisions of "Mars Dynamico Installation manual"

From Planets
Jump to: navigation, search
(SSO adaptation)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This page follows a manual for installing Mars Dynamico
+
This page follows a manual for installing Mars [[The DYNAMICO dynamical core|Dynamico]] (use the following link to access the wiki page of Dynamico    https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_DYNAMICO_dynamical_core ).
  
 +
The first step is to compile DYNAMICO using the LMDZ-MARS physics. Please refer to [[DYNAMICO with LMDZ physics]] for this step.
  
 
1. Install the LMDZ Mars GCM and newstart
 
1. Install the LMDZ Mars GCM and newstart
 
   a) make sure u have the datafir and all of the *.def files.  
 
   a) make sure u have the datafir and all of the *.def files.  
 
   b) create start.nc and startfi.nc
 
   b) create start.nc and startfi.nc
2.  Compile start2archive_SSO
+
2.  Compile start2archive with SSO
   a) run : makelmdz_fcm -arch <archive> -d <dimensions (lonxlatxalt)>  -p mars start2archive_SSO to create start_archive
+
   a) run : makelmdz_fcm -arch <archive> -d <dimensions (lonxlatxalt)>  -p mars start2archive to create start_archive
   b) run strart2archice_SSO
+
   b) run start2archive.e --add-sso
 
   c) cp start_archive.nc to the dynamico_runs folder
 
   c) cp start_archive.nc to the dynamico_runs folder
3. Install Dynamico
+
 
  a) use the following link to access the wiki page of Dynamico    https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_DYNAMICO_dynamical_core
+
3. Create an initial condiations files for dynamico by running a  dynamico simulation without the physics.
  b)  git clone https://gitlab.in2p3.fr/ipsl/projets/dynamico/dynamico.git
+
   a) Copy from '''ICOSA_LMDZ/bin/icosa_lmdz.exe''' to a dynamico_runs folder (you should have followed [[DYNAMICO with LMDZ physics]] first, to compile '''icosa_lmdz.exe''').
  c) install XIOS, follow this link to access the wiki page of XIOS
+
   b) Copy the xml files and the start files and the def files in the dynamico_runs directory and have access to the datadir.
    1. if the make_xios dont work try this : ./make_xios --prod  --arch ifort_MESOIPSL --arch_path ../ARCH --job 8 --full
 
  d) move back to dynamico folder and run  ./make_icosa -parallel <parralel_component> -with_xios -arch <archive> -job 8
 
    if it doesnt work again add the arch path to ../ARCH
 
4. Create an initial condiations files for dynamico by running a  dynamico simulation without the physics.
 
   a) Compile make_icosa_lmdz in trunk/ICOSA_LMDZ
 
  b) Copy from icosa_lmdz/bin/icosa_lmdz.exe to a dynamico_runs folder
 
   c) Copy the xml files and the start files and the def files in the dynamico_runs directory and have access to the datadir.
 
    variable "nivsigs" needs be renamed "sigs" (XIOS requires CF-compliant files) (RV: No neeeded anymore)
 
    ncrename -vnivsigs,sigs start_archive.nc
 
 
     input file start_archive.nc need be converted to NetCDF4 format
 
     input file start_archive.nc need be converted to NetCDF4 format
 
     nccopy -k 4 start_archive.nc start_archive_nc4.nc
 
     nccopy -k 4 start_archive.nc start_archive_nc4.nc
5. run dynamic.
+
4. run dynamic.
 
   a) In run_icosa.def change to run_length=1500, etat_isothermal_temp=200, etat=isothermal and startphy_file=false(not start_file)
 
   a) In run_icosa.def change to run_length=1500, etat_isothermal_temp=200, etat=isothermal and startphy_file=false(not start_file)
 
   b) copy datadir to the running directory
 
   b) copy datadir to the running directory
Line 31: Line 23:
 
       1. cp restartfi.nc startphy_icosa_ref.nc
 
       1. cp restartfi.nc startphy_icosa_ref.nc
 
       2. cp restart_icosa.nc start_icosa_ref.nc
 
       2. cp restart_icosa.nc start_icosa_ref.nc
6. move to LMDZ.mars/util/startarchive2icosa then change compile script to adapt for the right location of XIOS and run compile u should get start_archive2icosa and rearrange_startphy
+
5. move to LMDZ.mars/util/startarchive2icosa then change compile script to adapt for the right location of XIOS and run compile u should get start_archive2icosa and rearrange_startphy
 
   a) copy start_archive2icosa and rearrange_startphy to the dynamico_runs folder.
 
   a) copy start_archive2icosa and rearrange_startphy to the dynamico_runs folder.
 
   b) Create surface_nc4.nc and copy it dynamico_runs folder
 
   b) Create surface_nc4.nc and copy it dynamico_runs folder
Line 40: Line 32:
 
   g) change the XIOS and the for startfi0.nc  paths in icosa_finalize.bash and run it. It adds and changes variables in the startfiles.
 
   g) change the XIOS and the for startfi0.nc  paths in icosa_finalize.bash and run it. It adds and changes variables in the startfiles.
 
   h) The scripts outputs startfi.nc and start_icosa.nc
 
   h) The scripts outputs startfi.nc and start_icosa.nc
   i) In the current version of Dynamico, the variable q for tracer is needed but unused. To create this unused variable simply run this short python code
+
    
    1. go into python
+
6. update the tracer name in startfi for each tracer for example: ncrename -v ccn_number_surf,ccn_number startfi.nc
    2. import numpy as np
 
    3. import netCDF4 as nc
 
    4. fn = 'start_icosa.nc'
 
    5. ds = nc.Dataset(fn, 'a', format='NETCDF4')
 
    6. nq = ds.createDimension('nq', 7)
 
    7. q = ds.createVariable('q', 'f8', ('nq','lev', 'cell_mesh',))
 
    8. nqq = ds.createVariable('nq', 'f8', ('nq',))
 
    9. q[:,:,:]=0.
 
    10. q.online_operation = "once"
 
    11. q.coordinates = "lat lon"
 
    12. ds.close()
 
7. update the tracer name in startfi for each tracer for example: ncrename -v ccn_number_surf,ccn_number startfi.nc
 
  
8. Run Dynamico simulation
+
7. Run Dynamico simulation
 
   a) change the iodef.xml
 
   a) change the iodef.xml
 
   b) change in run_icosa.def etat0=start_file and add etat0_start_file_colocated=true
 
   b) change in run_icosa.def etat0=start_file and add etat0_start_file_colocated=true
  c) *sometimes weird variables can be missing like W and geopot : ncks -A -v geopot restart_icosa.nc start_icosa.nc
 
  
 +
[[Category:DYNAMICO]]
 
[[Category:Mars-DYNAMICO]]
 
[[Category:Mars-DYNAMICO]]

Latest revision as of 16:01, 13 November 2024

This page follows a manual for installing Mars Dynamico (use the following link to access the wiki page of Dynamico https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_DYNAMICO_dynamical_core ).

The first step is to compile DYNAMICO using the LMDZ-MARS physics. Please refer to DYNAMICO with LMDZ physics for this step.

1. Install the LMDZ Mars GCM and newstart

 a) make sure u have the datafir and all of the *.def files. 
 b) create start.nc and startfi.nc

2. Compile start2archive with SSO

 a) run : makelmdz_fcm -arch <archive> -d <dimensions (lonxlatxalt)>  -p mars start2archive to create start_archive
 b) run start2archive.e --add-sso
 c) cp start_archive.nc to the dynamico_runs folder

3. Create an initial condiations files for dynamico by running a dynamico simulation without the physics.

 a) Copy from ICOSA_LMDZ/bin/icosa_lmdz.exe to a dynamico_runs folder (you should have followed DYNAMICO with LMDZ physics first, to compile icosa_lmdz.exe).
 b) Copy the xml files and the start files and the def files in the dynamico_runs directory and have access to the datadir.
    input file start_archive.nc need be converted to NetCDF4 format
    nccopy -k 4 start_archive.nc start_archive_nc4.nc

4. run dynamic.

 a) In run_icosa.def change to run_length=1500, etat_isothermal_temp=200, etat=isothermal and startphy_file=false(not start_file)
 b) copy datadir to the running directory
 c) run icosa_lmdz.exe 
 d) copy the files outputed by icosa_lmdz.exe
     1. cp restartfi.nc startphy_icosa_ref.nc
     2. cp restart_icosa.nc start_icosa_ref.nc

5. move to LMDZ.mars/util/startarchive2icosa then change compile script to adapt for the right location of XIOS and run compile u should get start_archive2icosa and rearrange_startphy

 a) copy start_archive2icosa and rearrange_startphy to the dynamico_runs folder.
 b) Create surface_nc4.nc and copy it dynamico_runs folder
 c) source arch.env
 d) run  ./start_archive2icosa as a job (requires a lot of memory) and make sure that Iodef.xml is the one for compile.
 e) the script create start_icosa_prefinalize.nc and  startfi_prefinalize.nc
 f) copy icosa_finalize script form /trunk/LMDZ.MARS/util/startarchive2icosa/icosa_finalize.bash to dynamico_runs folder
 g) change the XIOS and the for startfi0.nc  paths in icosa_finalize.bash and run it. It adds and changes variables in the startfiles.
 h) The scripts outputs startfi.nc and start_icosa.nc
 

6. update the tracer name in startfi for each tracer for example: ncrename -v ccn_number_surf,ccn_number startfi.nc

7. Run Dynamico simulation

 a) change the iodef.xml
 b) change in run_icosa.def etat0=start_file and add etat0_start_file_colocated=true