Mars Dynamico Installation manual
From Planets
Revision as of 09:44, 1 May 2023 by Evos (talk | contribs) (Created page with "This page follows a manual for installing Mars Dynamico 1. Install the LMDZ Mars GCM and newstart a) make sure u have the datafir and all of the *.def files. b) create...")
This page follows a manual for installing Mars Dynamico
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_SSO
a) run : makelmdz_fcm -arch <archive> -d <dimensions (lonxlatxalt)> -p mars start2archive_SSO to create start_archive b) run strart2archice_SSO 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 b) git clone https://gitlab.in2p3.fr/ipsl/projets/dynamico/dynamico.git c) install XIOS, follow this link to access the wiki page of XIOS 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 nccopy -k 4 start_archive.nc start_archive_nc4.nc
5. 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 start_icosa0.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
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 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 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
a) change the iodef.xml 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