source: BOL/LMDZ_Setup/reb.sh @ 4766

Last change on this file since 4766 was 4615, checked in by asima, 17 months ago

Initial import of LMDZ_Setup environment
(former TEST_PROD which was distributed as tutorial_prod.tar).

See also related doc LMDZ_Setup_HowTo (former tutorial_prod_FAQ) :
https://docs.google.com/document/d/1OLZG6e-86NiXuv5-aALxKIh-QPkp4BdCwWtiBFot-6c

This initial import corresponds to TEST_PROD from
https://lmdz.lmd.jussieu.fr/pub/Training/Archive/tutorial_prod.tar_v20230707.

Previous versions of tutorial_prod.tar are available at
https://lmdz.lmd.jussieu.fr/pub/Training/Archive

File size: 1.3 KB
Line 
1#!/bin/bash
2
3#    ./reb $type $ym $SIM $SIMUDIR
4
5ym=$1
6SIMUDIR=$2
7SIM=`basename $SIMUDIR`
8shift 2
9types="$*"
10PUT=mv
11rebuild=/gpfswork/rech/groupe/rgroupe027/LMDZ20191008.trunkOR3013/modipsl/bin/rebuild
12local=`pwd`
13
14
15echo type $type
16echo ym $ym
17echo SIM $SIM
18echo SIMUDIR $SIMUDIR
19
20for type in $types ; do
21
22job=$SIM$type
23
24cat <<eod>| $job
25#!/bin/bash
26#SBATCH --job-name=Seq              # nom du job
27#SBATCH -A groupe@cpu
28#SBATCH --nodes=1                   # nombre de noeuds
29#SBATCH --ntasks-per-node=1         # nombre de taches MPI par noeud
30#SBATCH --time=00:30:00             # temps d execution maximum demande (HH:MM:SS)
31#SBATCH --output=post${type}%j.out          # nom du fichier de sortie
32#SBATCH --error=post${type}%j.out           # nom du fichier d'erreur (ici en commun avec la sortie)
33 
34# on se place dans le repertoire de soumission
35cd $local
36pwd
37
38. lmdz_env.sh
39
40ulimit -s unlimited
41  if [ -f ${type}_0000.nc ] ; then
42    $rebuild -o ${type}.$ym.nc ${type}_[0-9][0-9][0-9][0-9].nc
43  else
44    echo ${type}_0000.nc absent
45  fi
46  if [ -f $type.$ym.nc ] ; then
47     ${PUT} $type.$ym.nc ${SIMUDIR}/$type.$ym.nc
48     \rm -f ${type}_[0-9][0-9][0-9][0-9].nc
49  else
50     echo La reconstruction de $type.$ym.nc a echoue
51  fi
52eod
53
54echo Submitting the rebuild job $job
55sbatch $job
56
57done
Note: See TracBrowser for help on using the repository browser.