Commit cf869f24 authored by Patryk Kiepas's avatar Patryk Kiepas 🐦
Browse files

Merge branch 'lam_dynamics' into 'master'

Adding LAM DYNAMICO-only working configuration on JeanZay

See merge request !2
parents 03a0bade 9b1fdd0c
#!/bin/bash
# This script downloads and builds XIOS and DYNAMICO in the current working directory.
ARCH_NAME=X64_JEANZAY
NUM_JOBS=8
# Get the latest XIOS
module load svn/1.9.7
svn co http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/trunk XIOS
pushd XIOS/
./make_xios --arch ${ARCH_NAME} --job ${NUM_JOBS}
popd
# Get the latest DYNAMICO (on trunk2master branch by default).
git clone https://gitlab.in2p3.fr/ipsl/projets/dynamico/dynamico.git DYNAMICO
pushd DYNAMICO/
./make_icosa -arch ${ARCH_NAME} -parallel mpi -prod -with_xios -job ${NUM_JOBS}
popd
#!/bin/bash
# This input file must agree with the header https://gitlab.in2p3.fr/ipsl/projets/dynamico/dynamico/-/blob/trunk2master/TEST_CASE/LAM_ERA5/ERA_062000.nc_header
ERA5_PATH=/gpfsstore/rech/wuu/ump84rg/DATA/ERA5_062000.nc
mkdir -p RUNS/LAM_CREATE_ETAT0_MPI40
mkdir -p RUNS/LAM_RUN_MPI40
DYNAMICO_PATH=../../DYNAMICO
# Prepare the create etat0 run
pushd RUNS/LAM_CREATE_ETAT0_MPI40
cp ${DYNAMICO_PATH}/TEST_CASE/LAM_ERA5/CREATE_ETAT0/* .
# Remove references to XIOS LMDZ defintions
sed -i /LMDZ/d iodef.xml
# Create symoblic links to built DYNAMICO
ln -s ${DYNAMICO_PATH} build
ln -s build/bin/icosa_gcm.exe gcm.exe
# Prepare input files
mkdir input/
ln -s ${ERA5_PATH} input/
ln -s ${ERA5_PATH} input/ERA5.nc
# Prepare job script
cp ../../jean-zay/job_interactive.sh .
popd
# Prepare the main run
pushd RUNS/LAM_RUN_MPI40
cp ${DYNAMICO_PATH}/TEST_CASE/LAM_ERA5/RUN/* .
# Remove references to XIOS LMDZ defintions
sed -i /LMDZ/d iodef.xml
# Change the length of the RUN to 29 days, activate dynamico.nc
sed -i 's/run_length=2592000/run_length=2505600/g' run_dynamico.def
sed -i 's/enabled="false"/enabled="true"/g' file_def_dynamico.xml
# Create symoblic links to built DYNAMICO
ln -s ${DYNAMICO_PATH} build
ln -s build/bin/icosa_gcm.exe gcm.exe
# Prepare input files
mkdir input/
ln -s ${ERA5_PATH} input/
ln -s ${ERA5_PATH} input/ERA5.nc
# Prepare job script
cp ../../jean-zay/job.sh .
popd
\ No newline at end of file
#!/bin/bash
# Run interactive job to create etat0
pushd RUNS/LAM_CREATE_ETAT0_MPI40/
./job_interactive.sh
popd
# Copy generated etat0
cp RUNS/LAM_CREATE_ETAT0_MPI40/netcdf/* RUNS/LAM_RUN_MPI40/input/
pushd RUNS/LAM_RUN_MPI40/input/
cp start0.nc start.nc
popd
\ No newline at end of file
# LAM with DYNAMICO only
This is an easy example how to run LAM+DYNAMICO on JeanZay without any physics.
## Execution
```sh
# This will build DYNAMICO and XIOS
./01_build.sh
# This will prepare the RUNS (CREATE_ETAT0 and RUN)
./02_create_runs.sh
# This will create the ETAT0 for the main run
./03_prepare_etat0.sh
# Now, run the LAM!
cd RUN/LAM_RUN_MPI40/
sbatch job.sh
# Check the results
cd netcdf/
ncview dynamico.nc
```
\ No newline at end of file
#!/bin/bash
## Request name
#SBATCH --job-name=DCMIP41_mpi
## Number of tasks (=MPI processes) to use
#SBATCH --ntasks=40
## Number of OpenMP threads
#SBATCH --cpus-per-task=1
## QoS for short jobs
#SBATCH --qos=qos_cpu-dev
## Elapsed time limit HH:MM:SS
#SBATCH --time=00:30:00
# do not use hyperthreading
#SBATCH --hint=nomultithread
# standard outputs
#SBATCH --output=DYNAMICO%j.out
#SBATCH --error=DYNAMICO%j.out
# Change computing group if needed !
#SBATCH -A wuu@cpu
export OMP_NUM_THREADS=1
# OpenMP binding
export OMP_PLACES=cores
# stack
export OMP_STACKSIZE=128M
ulimit -s unlimited
# move to submission directory
cd ${SLURM_SUBMIT_DIR}
# load the same modules as during compilation
source build/arch.env
module list
# cleanup execution directory and run
rm -rf gcm.log logs *.nc netcdf
ln -s input/*.nc .
date > gcm.log
ulimit -s unlimited
srun ./gcm.exe >> gcm.log
date >> gcm.log
# move output files to netcdf subdir
mkdir -p netcdf
cp gcm.log *.def netcdf
mv *.nc netcdf
# keep log files, source code and executable for debug
mkdir -p logs
cp *.xml logs
cp -pr gcm.exe logs
cp -pr build/src logs
mv xios_client_*.err xios_client_*.out gcm.log logs
#!/bin/bash
export OMP_NUM_THREADS=1
# OpenMP binding
export OMP_PLACES=cores
# stack
export OMP_STACKSIZE=128M
ulimit -s unlimited
# load the same modules as during compilation
source build/arch.env
module list
# cleanup execution directory and run
rm -rf gcm.log logs *.nc netcdf
ln -s input/*.nc .
date > gcm.log
ulimit -s unlimited
./gcm.exe >> gcm.log
date >> gcm.log
# move output files to netcdf subdir
mkdir -p netcdf
cp gcm.log *.def netcdf
mv *.nc netcdf
# keep log files, source code and executable for debug
mkdir -p logs
cp *.xml logs
cp -pr gcm.exe logs
cp -pr build/src logs
mv xios_client_*.err xios_client_*.out gcm.log logs
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment