Difference between revisions of "Installing Mars mesoscale model on spirit"
Line 24: | Line 24: | ||
It is necessary to unlimit the stacksize to avoit unwanted segmentation faults by adding this to your ~/.bashrc | It is necessary to unlimit the stacksize to avoit unwanted segmentation faults by adding this to your ~/.bashrc | ||
− | |||
<syntaxhighlight lang="Bash"> | <syntaxhighlight lang="Bash"> | ||
ulimit -s unlimited | ulimit -s unlimited | ||
Line 30: | Line 29: | ||
In the end, source the .bashrc file! | In the end, source the .bashrc file! | ||
+ | |||
+ | === Extra technical details=== | ||
+ | * Note that you can decide to not modify your .bashrc file but instead put all the lines in a "mesoscale.env file and add a | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | source mesoscale.env | ||
+ | </syntaxhighlight> | ||
+ | at the beginning of the meso_install.sh script. | ||
+ | * WRF needs a NETCDF environment variable where everything is in the same dir (Fortran and C stuff). If this is not available one needs to create a uniquer dire with links to all the C and Fortran stuff. NCDFLIB and NCDFINC are for the physics. | ||
+ | * WHERE_MPI env variable is used by some scripts to make sure we use the right one | ||
+ | |||
== Set up the installer == | == Set up the installer == |
Revision as of 16:09, 6 September 2023
Contents
Set up environment
Add this in your ~/.bashrc then source the file
module purge
module load intel/2021.4.0
module load intel-mkl/2020.4.304
module load openmpi/4.0.7
module load hdf5/1.10.7-mpi
module load netcdf-fortran/4.5.3-mpi
module load netcdf-c/4.7.4-mpi
declare -x WHERE_MPI=/net/nfs/tools/u20/22.3/PrgEnv/intel/linux-ubuntu20.04-zen2/openmpi/4.0.7-intel-2021.4.0-43fdcnab3ydwu7ycrplnzlp6xieusuz7/bin/
declare -x NETCDF=/scratchu/spiga/les_mars_project_spirit/netcdf_hacks/SPIRIT
declare -x NCDFLIB=$NETCDF/lib
declare -x NCDFINC=$NETCDF/include
Do not forget to declare the local directory in PATH by adding this to your ~/.bashrc
declare -x PATH=./:$PATH
It is necessary to unlimit the stacksize to avoit unwanted segmentation faults by adding this to your ~/.bashrc
ulimit -s unlimited
In the end, source the .bashrc file!
Extra technical details
- Note that you can decide to not modify your .bashrc file but instead put all the lines in a "mesoscale.env file and add a
source mesoscale.env
at the beginning of the meso_install.sh script.
- WRF needs a NETCDF environment variable where everything is in the same dir (Fortran and C stuff). If this is not available one needs to create a uniquer dire with links to all the C and Fortran stuff. NCDFLIB and NCDFINC are for the physics.
- WHERE_MPI env variable is used by some scripts to make sure we use the right one
Set up the installer
Go to your 'data' directory (cd /homedata/_MY_LOGIN_ or cd /data/_MY_LOGIN_) and download the installer with the following command
svn co https://svn.lmd.jussieu.fr/Planeto/trunk/MESOSCALE/LMD_MM_MARS/SIMU
Make sure the installer can be executed
chmod 755 SIMU/meso_install.sh
Make a link (e.g. where you are, in the parent directory of /data) to the main script in this SIMU directory
ln -sf SIMU/meso_install.sh .
Run the installer with a simple display of possible options
./meso_install.sh -h
Install the code
Update to the latest version of installer
cd SIMU
svn update
chmod 755 meso_install.sh
cd ..
Run the installer by providing a name for your specific directory
./meso_install.sh -n DESCRIBE_YOUR_RESEARCH_PROJECT
Special case: In case you do not have a gitlab account, ask for an archive (tar.gz) of the code. Let us assume the name is git-trunk-mesoscale-compile-run-spirit.tar.gz and the file is in the current directory (for instance in /homedata/_MY_LOGIN_) then run the installer with the following command
./meso_install.sh -n DESCRIBE_YOUR_RESEARCH_PROJECT -a git-trunk-mesoscale-compile-run-spirit
Weird! fcm is not working interactively. It only works if being declared in the environment file by adding
declare -x PATH=/homedata/_MY_LOGIN_/DESCRIBE_YOUR_RESEARCH_PROJECT/code/LMDZ.COMMON/FCM_V1.2/bin/:$PATH
then recompile the GCM compiling (which had failed previously) by doing
cd /homedata/_MY_LOGIN_/DESCRIBE_YOUR_RESEARCH_PROJECT/
./compile_gcm.sh
and recreate start files from a sample start_archive.nc by doing (in subdirectory gcm/newstart)
./mini_startbase.sh
Run the full workflow GCM + initialization + mesoscale model
Have a look in the script named launch just for info or to change the number of processors or the step at which you start. Send the launch job to the cluster by typing (note that you can change the number of core to run with in the header of the script, e.g. #SBATCH --ntasks=24 to use 24 cores)
sbatch launch
You can check the status of the run by typing
squeueme
A more detailed run
The best is probably to use a more complete startbase than the minimal one that was created. For instance, to get a more complete startbase, link 'data_gcm' to point towards '/data/spiga/2021_STARTBASES_rev2460/MY35'
To use the tyler cap setting in namelist.wps, download the tylerall archive here 'https://web.lmd.jussieu.fr/~aslmd/mesoscale_model/data_static/' and extract the content in the folder named data_static