Difference between revisions of "Installing Titan mesoscale model on spirit"

From Planets
Jump to: navigation, search
Line 94: Line 94:
  
 
== Run a simulation ==
 
== Run a simulation ==
 +
 +
=== Simple run ===
  
 
Go to a test directory, for instance:
 
Go to a test directory, for instance:
Line 107: Line 109:
 
<syntaxhighlight lang="Bash">
 
<syntaxhighlight lang="Bash">
 
./ideal.exe
 
./ideal.exe
 +
./wrf.exe
 +
</syntaxhighlight>
 +
 +
=== Step by step ===
 +
 +
Go to a test directory, for instance:
 +
<syntaxhighlight lang="Bash">
 +
cd test_folder
 +
</syntaxhighlight>
 +
 +
# Adapt the simulation parameters in namelist.input (e.g. the duration of the simulation).
 +
# Adapt the simulation parameters in callphys.def (e.g. the number of physical time steps between radiative time steps).
 +
# Adapt the simulation parameters in input_bubble. If you do not want a bubble, set delt and bubble_addCH4 to 0.
 +
# Adapt the simulation parameters in input_coords (longitude, latitude, Ls, local time).
 +
# If you have the namelist option use_levels activated, check that the levels file is coherent with your number of vertical layers. If you want to create a new levels file, use the scripts in tests/zlevels_create_levels_file.
 +
# Create the input_sounding and tracer_sounding files with gettitan_xarray.py:
 +
<syntaxhighlight lang="Bash">
 +
python3 gettitan_xarray.py
 +
</syntaxhighlight>
 +
# Check that symbolic links exist, otherwise create them by running ./make_symbolic_links.sh
 +
# Initialize the simulation:
 +
<syntaxhighlight lang="Bash">
 +
./ideal.exe
 +
</syntaxhighlight>
 +
# Check rsl.out.0000 and rsl.error.0000. You should have "wrf: SUCCESS COMPLETE IDEAL INIT" written at the end.
 +
# If you want to launch a Spirit job: adapt the simulation duration, memory, number of CPUs, ... in scriptlaunch
 +
# Launch the simulation:
 +
If you want to launch a Spirit job:
 +
<syntaxhighlight lang="Bash">
 +
./launch
 +
</syntaxhighlight>
 +
If you want to launch interactively on the console:
 +
<syntaxhighlight lang="Bash">
 
./wrf.exe
 
./wrf.exe
 
</syntaxhighlight>
 
</syntaxhighlight>

Revision as of 16:49, 26 February 2026

Install FCM

On your home, do:

mkdir TOOLS
cd TOOLS
svn checkout https://forge.ipsl.jussieu.fr/fcm/svn/PATCHED/FCM_V1.2
cd
vi .bash_profile

In your ~/.bash_profile, add:

export PATH=$PATH:$HOME/TOOLS/FCM_V1.2/bin

Configure your ~/.bashrc

In your ~/bashrc, add:

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# User specific aliases and functions

ulimit -s unlimited

declare -x PATH=./:$PATH
declare -x WRFIO_NCD_LARGE_FILE_SUPPORT=1

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

Add private key

If you don't have one already, you need to add a private key file on your home, that corresponds to the public key file you have on GitLab.

To do this, put your id_rsa file in the directory ~/.ssh/. Then, change the rights to the file, so that only you can access and read it:


chmod go-r ~./ssh/id_rsa

Install the code

Load les_planet_workflow from Git

On one of the scratch disks (e.g. scratchu), do:

git clone git@gitlab.in2p3.fr:aymeric.spiga/les_mars_project.git les_planet_workflow

Create a new branch

In the les_planet_workflow directory, do:

git branch new_branch
git checkout new_branch

Adapt 0_defining file

Some lines are specific to the cluster, for SPIRIT:

archname="ifort_MESOIPSL"

Some lines are specific to Titan:

version=tags/titan_les_compiles_and_runs_master_MESOIPSL # titan
physics=titan
add="-d 32x48x55 -s 1 -b 23x23 -cpp OLD_COMPILO" # titan

/!\ The "inputs to script configure" depend on the version of WRF you use.

Run install.sh

./install.sh

Run a simulation

Simple run

Go to a test directory, for instance:

cd titan_pbl

Adapt the simulation parameters in namelist.input (e.g. the duration of the simulation).

Update the GCM data path: in callphys.def, set datadir to the same path as the datadir defined in physiq.def (e.g. /data/mlefevre/SIMU/filephys/TITAN/datagcm).

Then initialize and launch the simulation:

./ideal.exe
./wrf.exe

Step by step

Go to a test directory, for instance:

cd test_folder
  1. Adapt the simulation parameters in namelist.input (e.g. the duration of the simulation).
  2. Adapt the simulation parameters in callphys.def (e.g. the number of physical time steps between radiative time steps).
  3. Adapt the simulation parameters in input_bubble. If you do not want a bubble, set delt and bubble_addCH4 to 0.
  4. Adapt the simulation parameters in input_coords (longitude, latitude, Ls, local time).
  5. If you have the namelist option use_levels activated, check that the levels file is coherent with your number of vertical layers. If you want to create a new levels file, use the scripts in tests/zlevels_create_levels_file.
  6. Create the input_sounding and tracer_sounding files with gettitan_xarray.py:
python3 gettitan_xarray.py
  1. Check that symbolic links exist, otherwise create them by running ./make_symbolic_links.sh
  2. Initialize the simulation:
./ideal.exe
  1. Check rsl.out.0000 and rsl.error.0000. You should have "wrf: SUCCESS COMPLETE IDEAL INIT" written at the end.
  2. If you want to launch a Spirit job: adapt the simulation duration, memory, number of CPUs, ... in scriptlaunch
  3. Launch the simulation:

If you want to launch a Spirit job:

./launch

If you want to launch interactively on the console:

./wrf.exe