New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
run_job.slurm in NEMO/branches/2021/dev_r14318_RK3_stage1_tsplit/tests/SEICHE/EXPREF – NEMO

source: NEMO/branches/2021/dev_r14318_RK3_stage1_tsplit/tests/SEICHE/EXPREF/run_job.slurm @ 14597

Last change on this file since 14597 was 14597, checked in by jchanut, 3 years ago

#2634: Implement Marsaleix (2008) and Demange (2019) test case (an external SEICHE over a 2DV stratified ocean and a seamount). One can optionnaly retrieve a standard external or 2 layer internal Seiche with a flat bottom.

  • Property svn:executable set to *
File size: 3.3 KB
Line 
1#!/bin/bash
2#
3#SBATCH -J SEICHE
4#SBATCH -o SEICHE.%j.out
5#SBATCH -e SEICHE.%j.err
6#SBATCH -N 1
7#SBATCH -p mono
8#SBATCH --ntasks-per-node:32
9#SBATCH --time=00:20:00
10#SBATCH --exclusive
11#SBATCH -x node-07
12#
13#
14OCEANCORES=30
15XIOCORES=2
16#
17###############################################################
18export MPIRUN="mpirun -np $OCEANCORES"
19export RUN_DIR=/data/rd_exchange/jchanut/dev_r14318_RK3_stage1_tsplit/tests/SEICHE
20export TOOL_DIR=/data/rd_exchange/jchanut/dev_r14318_RK3_stage1_tsplit/tools
21#export RUN_DIR="$(dirname "$(pwd)")"
22export EXE_DIR=/kara/data1/jchanut/SEICHE
23###############################################################
24#
25# change to the working directory
26#
27cd ${EXE_DIR}
28cp ${RUN_DIR}/EXPREF/*.xml .
29cp ${RUN_DIR}/EXPREF/namelist_ref .
30cp ${RUN_DIR}/EXPREF/namelist_cfg_skel_marsaleix ./namelist_cfg_skel
31cp ${RUN_DIR}/BLD/bin/nemo.exe .
32cp ${XIOS_BIN}/xios_server.exe .
33cp ${TOOL_DIR}/REBUILD_NEMO/rebuild_nemo .
34cp ${TOOL_DIR}/REBUILD_NEMO/rebuild_nemo.exe .
35#
36#ntest=0: test time convergence ; =1: spatial convergence ; =2: both at constant courant number
37#ntest=-1: is a sanity check with constant barotropic time step and varying baroclinic time step
38ntest=-1
39exp_base='SEICHE_mar_rk3_dt'
40rdt_base=960
41nbaro_base=112
42nstep_base=1080
43npts_base=1600
44nlev_base=30
45atfp_base=0.1
46btav='.false.'
47btfw='.true.'
48ralpha_base=0.07 # = 0.5*theta
49nexp=5
50for (( i=1; i<=$nexp; i++))
51do
52   rdt=$rdt_base
53   nstep=$nstep_base
54   npts=$npts_base
55   nlev=$nlev_base
56   nbaro=$nbaro_base
57   atfp=$atfp_base
58   ralpha=$ralpha_base
59   exp=$exp_base'_'$i
60if   [[ $ntest -eq  0 || $ntest -eq  2 || $ntest -eq -1 ]] ; then
61# Temporal convergence
62   for (( j=1; j<$i; j++)) do rdt=` expr  $rdt / 2 `; done
63   for (( j=1; j<$i; j++)) do nstep=` expr  $nstep \\* 2 `; done
64elif [[ $ntest -eq  1 ]] ; then
65# Spatial convergence only:
66# smallest time step:
67   for (( j=1; j<$nexp; j++)) do rdt=` expr  $rdt / 2 `; done
68   for (( j=1; j<$nexp; j++)) do nstep=` expr  $nstep \\* 2 `; done
69fi
70if   [[ $ntest -eq  1 || $ntest -eq  2 ]] ; then
71# With spatial and temporal convergence:
72   for (( j=1; j<$i; j++)) do npts=` expr  $npts \\* 2 `; done
73fi
74if   [[ $ntest -eq  -1 ]] ; then
75# This is a verification test: whatever the baroclinic time step is
76# number of barotropic iterations is modified accordingly
77# such that barotropic time step is constant. If no time averaging in the
78# barotropic mode, the solution should basically be unchanged
79   for (( j=1; j<$i; j++)) do nbaro=` expr  $nbaro / 2 `; done
80fi
81if   [[ $ntest -eq  3 ]] ; then
82# With spatial and temporal convergence:
83   for (( j=1; j<$i; j++)) do nlev=` expr  $nlev \\* 2 `; done
84fi
85   sed -e "s/EXPNAME/'$exp'/"  \
86       -e "s/RDT/${rdt}/"      \
87       -e "s/NPTS/${npts}/"    \
88       -e "s/NLEV/${nlev}/"    \
89       -e "s/NSTEP/${nstep}/"  \
90       -e "s/NBARO/$nbaro/"    \
91       -e "s/RALPHA/$ralpha/"  \
92       -e "s/BTAV/$btav/"      \
93       -e "s/BTFW/$btfw/"      \
94       -e "s/ASS/$atfp/" namelist_cfg_skel > namelist_cfg
95   time mpirun -bynode -np $OCEANCORES ./nemo.exe : -np $XIOCORES ./xios_server.exe
96   mv run.stat.nc ${i}_run.stat.nc
97   mv run.stat ${i}_run.stat
98   mv ocean.output ${i}_ocean.output
99   stepout=`printf "%08d\n" $nstep`
100   ./rebuild_nemo ${exp}_${stepout}_restart $OCEANCORES 
101   rm -rf ${exp}_${stepout}_restart_*
102   rm nam_rebuild*
103   mv ${exp}_${stepout}_restart.nc ${exp}_restart.nc
104done
105#
106exit
Note: See TracBrowser for help on using the repository browser.