source: trunk/LMDZ.MARS/deftank/ciclad/run_month1

Last change on this file was 2510, checked in by abierjon, 4 years ago

Mars GCM:
Some corrections of run scripts in deftank/ciclad/ :
the next run_monthX is now well written, with a formulation that is more coherent with deftank/occigen/run_month1 version
+ the PBS memory specifications for the CICLAD job are set to more relevant values

AB

File size: 1.9 KB
Line 
1#PBS -S /bin/bash
2#PBS -N run_month1
3#PBS -q day
4#PBS -j eo
5#PBS -l nodes=1:ppn=24
6#PBS -l mem=30gb
7#PBS -l vmem=50gb
8#PBS -l walltime=20:00:00
9
10## Script to run chained simulations on Ciclad
11## (uses script "run0" and reference file "run.def.ref")
12## Set values of "num_now" and "num_end" in the script below
13## to set initial month # and final month # of the simulation
14
15# go to directory where the job was launched
16cd $PBS_O_WORKDIR
17
18# source the environment (you might need to adapt this path to your case)
19source ../trunk/LMDZ.COMMON/arch.env
20
21date
22
23## set starting month and ending month below:
24num_now=1
25num_end=12
26(( num_previous = $num_now - 1 ))
27
28echo "$num_previous" > num_run
29# next month number
30(( num_next = $num_now + 1 ))
31# true (i.e. modulo 12) month number
32(( true_num = $num_now % 12 ))
33
34\rm -f  error; touch error
35
36case $true_num in
37  1 ) sed s/9999/61/ run.def.ref > run.def ; run0 >> error ;;    #1
38  2 ) sed s/9999/66/ run.def.ref > run.def ; run0 >> error ;;    #2
39  3 ) sed s/9999/66/ run.def.ref > run.def ; run0 >> error ;;    #3
40  4 ) sed s/9999/65/ run.def.ref > run.def ; run0 >> error ;;    #4
41  5 ) sed s/9999/60/ run.def.ref > run.def ; run0 >> error ;;    #5
42  6 ) sed s/9999/54/ run.def.ref > run.def ; run0 >> error ;;    #6
43  7 ) sed s/9999/50/ run.def.ref > run.def ; run0 >> error ;;    #7
44  8 ) sed s/9999/46/ run.def.ref > run.def ; run0 >> error ;;    #8
45  9 ) sed s/9999/47/ run.def.ref > run.def ; run0 >> error ;;    #9
46 10 ) sed s/9999/47/ run.def.ref > run.def ; run0 >> error ;;    #10
47 11 ) sed s/9999/51/ run.def.ref > run.def ; run0 >> error ;;    #11
48  0 ) sed s/9999/56/ run.def.ref > run.def ; run0 >> error ;;    #12
49  * ) echo "error" ;;
50esac
51
52# launch job for next month
53if (( $num_next <= $num_end )) ; then
54  cp -f run_month$num_now tmp
55  sed -e "s@run_month${num_now}@run_month${num_next}@" \
56      -e "s@num_now=${num_now}@num_now=${num_next}@" tmp > run_month$num_next
57  rm tmp
58  qsub run_month$num_next
59fi
Note: See TracBrowser for help on using the repository browser.