source: trunk/LMDZ.MARS/deftank/irene/run_month1 @ 3493

Last change on this file since 3493 was 2816, checked in by emillour, 2 years ago

Mars GCM:
Minor fix on the example script for Irene.
EM

File size: 2.1 KB
Line 
1#!/bin/bash
2# Partition to run on:
3#MSUB -q rome
4# project to run on
5#MSUB -A  gen10391
6# disks to use
7#MSUB -m  scratch,work,store
8# Job name
9#MSUB -r run_month1
10# Job standard output:
11#MSUB -o run_month1.%I
12# Job standard error:
13#MSUB -e run_month1.%I
14# number of OpenMP threads c
15#MSUB -c 5
16# number of MPI tasks n
17#MSUB -n 24
18# number of nodes to use N
19#MSUB -N 1
20# max job run time T (in seconds)
21#MSUB -T 43200
22# request exclusive use of the node (128 cores)
23#MSUB -x
24
25# A few parameters that might need be changed depending on your setup:
26# Path to the arch.env to source
27source ../trunk/LMDZ.COMMON/arch.env
28# Number of threads to use (must be the same as "#MSUB -c" above)
29export OMP_NUM_THREADS=5
30export OMP_STACKSIZE=400M
31
32set -xv
33ls -al
34
35## set starting month and ending month below:
36num_now=1
37num_end=12
38(( num_previous = $num_now - 1 ))
39
40echo "$num_previous" > num_run
41# next month number
42(( num_next = $num_now + 1 ))
43# true (i.e. modulo 12) month number
44(( true_num = $num_now % 12 ))
45
46\rm -f  error; touch error
47
48case $true_num in
49  1 ) sed s/9999/61/ run.def.ref > run.def ; run0 >> error ;;    #1
50  2 ) sed s/9999/66/ run.def.ref > run.def ; run0 >> error ;;    #2
51  3 ) sed s/9999/66/ run.def.ref > run.def ; run0 >> error ;;    #3
52  4 ) sed s/9999/65/ run.def.ref > run.def ; run0 >> error ;;    #4
53  5 ) sed s/9999/60/ run.def.ref > run.def ; run0 >> error ;;    #5
54  6 ) sed s/9999/54/ run.def.ref > run.def ; run0 >> error ;;    #6
55  7 ) sed s/9999/50/ run.def.ref > run.def ; run0 >> error ;;    #7
56  8 ) sed s/9999/46/ run.def.ref > run.def ; run0 >> error ;;    #8
57  9 ) sed s/9999/47/ run.def.ref > run.def ; run0 >> error ;;    #9
58 10 ) sed s/9999/47/ run.def.ref > run.def ; run0 >> error ;;    #10
59 11 ) sed s/9999/51/ run.def.ref > run.def ; run0 >> error ;;    #11
60  0 ) sed s/9999/56/ run.def.ref > run.def ; run0 >> error ;;    #12
61  * ) echo "error" ;;
62esac
63
64# launch job for next month
65if (( $num_next <= $num_end )) ; then
66  cp -f run_month$num_now tmp
67  sed -e "s@run_month${num_now}@run_month${num_next}@" \
68      -e "s@num_now=${num_now}@num_now=${num_next}@" tmp > run_month$num_next
69  rm tmp
70 
71  ccc_msub run_month$num_next
72fi
Note: See TracBrowser for help on using the repository browser.