Changeset 178
- Timestamp:
- Oct 22, 2019, 1:20:54 PM (6 years ago)
- Location:
- models/LMDZ
- Files:
-
- 2 edited
-
serie_LMDZ.sh (modified) (7 diffs)
-
setup_LMDZ.sh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
models/LMDZ/serie_LMDZ.sh
r167 r178 19 19 20 20 21 LMDZdir=/home/hourdin/ITUNE/ R166/HighTune/../../LMDZtrunk21 LMDZdir=/home/hourdin/ITUNE/OOO/HighTune/../LMDZtrunk 22 22 EXPE=`pwd`/WAVE$WAVEN 23 23 … … 43 43 44 44 case $cas in 45 ARMCU/REF) lmdzcas=arm_cu ;;46 RICO/REF) lmdzcas=rico ;;47 BOMEX/REF) lmdzcas=bomex ;;48 AYOTTE/24SC) lmdzcas=ayotte_24SC ;;49 AYOTTE/05WC) lmdzcas=ayotte_05WC ;;50 IHOP/REF) lmdzcas=ihop ;;51 SANDU/SLOW) lmdzcas=sanduslow ;;52 SANDU/REF) lmdzcas=sanduref ;;53 SANDU/FAST) lmdzcas=sandufast ;;54 RCE_OCE/REF) lmdzcas=rce_oce_les ;;55 GABLS4/REF) lmdzcas=gabls4 ;;45 ARMCU/REF) lmdzcas=arm_cu ;; 46 RICO/REF) lmdzcas=rico ;; 47 BOMEX/REF) lmdzcas=bomex ;; 48 AYOTTE/24SC) lmdzcas=ayotte_24SC ;; 49 AYOTTE/05WC) lmdzcas=ayotte_05WC ;; 50 IHOP/REF) lmdzcas=ihop ;; 51 SANDU/SLOW) lmdzcas=sanduslow ;; 52 SANDU/REF) lmdzcas=sanduref ;; 53 SANDU/FAST) lmdzcas=sandufast ;; 54 RCE_OCE/REF) lmdzcas=rce_oce_les ;; 55 GABLS4/REF) lmdzcas=gabls4 ;; 56 56 *) echo "This case cannot be found" && exit ;; 57 57 esac … … 80 80 81 81 DATA=$EXPE/$cas 82 nproc= 2# number of available CPUs83 84 ##################################################################### 85 # Post traitement vers format standard82 nproc=1 # number of available CPUs 83 84 ##################################################################### 85 # Running SCM and post-processing toward standard format 86 86 ##################################################################### 87 87 function post_un { 88 88 sim=$1 89 time ./lmdz1d.e 90 \rm -f restartphy.nc 91 for iretry in 1 ; do if [ ! -f restartphy.nc ] ; then echo WARNING !!! Simulation $sim crashes, one more try ; ./lmdz1d.e ; fi ; done 89 92 ncks -O -v theta,rhum,vitu,vitv,geop,ovap,ocond,f_th,w_th,rneb,lwp,pres,re,temp hourly.nc tmp.nc 90 93 ncrename -O -v ovap,qv -v ocond,qc -v f_th,Mf -v w_th,w_up -v rhum,hur -v vitu,u -v vitv,v -v pres,pf tmp.nc 91 94 ncap2 -O -s 'zf=geop/9.8' tmp.nc tmp2.nc 92 95 ncks -v zf,pf,re,temp,theta,hur,u,v,qv,qc,Mf,w_up,rneb,lwp tmp2.nc $DATA/$sim.nc 96 # time ../../../../OUTPUT_COMMUNS/lmdz2std.sh ; time ./diag.sh # diags 97 \rm -f limit* start* hist* filehf* day.nc tmp*nc* par*nc hour*nc # cleaning 93 98 } 94 #####################################################################95 99 96 100 … … 150 154 sim=${vals[0]} 151 155 152 # Running one SCM 153 # copying input files 156 ####################################################################### 157 # Preparing SCM simulations 158 # copying and modiying input files 159 ####################################################################### 160 154 161 cp -r REF $sim 155 162 cd $sim … … 158 165 echo $local/phydef2phydef.sh -names `head -1 param.asc | sed -e 's/\"//g' -e 's/ /,/g'` -vals `sed -n -e ${il}p param.asc | sed -e 's/\"//g' -e 's/ /,/g'` -input physiq.orig -output physiq.def 159 166 $local/phydef2phydef.sh -names `head -1 param.asc | sed -e 's/\"//g' -e 's/ /,/g'` -vals `sed -n -e ${il}p param.asc | sed -e 's/\"//g' -e 's/ /,/g'` -input physiq.orig -output physiq.def 160 167 out=/dev/null 168 out=listing 169 mkdir -p $DATA/DEF 170 cp physiq.def $DATA/physiq.def_$sim 171 172 ####################################################################### 161 173 # Running SCM 162 out=listing163 out=/dev/null 174 ####################################################################### 175 164 176 if [ ! -f $DATA/$sim.nc ] ; then 165 166 ( time ./lmdz1d.e 167 time post_un $sim 168 # time ../../../../OUTPUT_COMMUNS/lmdz2std.sh ; time ./diag.sh # diags 169 \rm -f limit* start* hist* filehf* day.nc tmp*nc* par*nc hour*nc # cleaning 170 ) > $out 2>&1 & 171 177 # Sequential mode 178 echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 179 echo RUNING $cas $sim 180 echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 181 if [ $nproc = 1 ] ; then 182 time post_un $sim > $out 2>&1 183 grep crashes $out ; rm -f $out 184 else 185 # Parallel mode : lmdz1d.e run as bacground process 186 time post_un $sim > $out 2>&1 & 187 fi 172 188 else 173 189 echo WARNING WARNING WARNING $DATA/$sim.nc ALREADY EXISTS … … 175 191 (( ii = $ii + 1 )) 176 192 177 echo RUNING Simus $sim $il $nl 178 # Waiting the end of a series of simulations before running the folowing one 193 ############################################################################ 194 # In case of parallel execution : 195 # waiting the end of a series of simulations before running the folowing one 179 196 # checking if the file $DATA/$sim.nc of the last simulation is finished 197 ############################################################################ 198 199 #echo '$nproc $ii $nproc $il $nl ' $nproc $ii $nproc $il $nl 200 if [ $nproc -gt 1 ] ; then 180 201 if [ $ii = $nproc -o $il = $nl ] ; then 181 202 dernier_fichier=$DATA/$sim.nc … … 188 209 echo Il faut attendre combien alors 189 210 fi 211 fi 190 212 cd .. 213 214 # Incrementing $il for next simulation 191 215 (( il = $il + 1 )) 216 192 217 done 193 218 -
models/LMDZ/setup_LMDZ.sh
r170 r178 19 19 ROOT=`pwd | sed -e 's/HighTune/ /' | cut -d" " -f1`HighTune 20 20 echo $ROOT 21 LMDZdir=$ROOT/../../$LMDZ 21 22 ###################################################################### 23 # Checking if model already exists 24 ###################################################################### 25 26 LMDZroot="" 27 if [ -d $ROOT/../../$LMDZ ] ; then 28 LMDZroot=$ROOT/../.. 29 else 30 # By default, LMDZ is installed next to HighTune 31 LMDZroot=$ROOT/.. 32 fi 33 LMDZdir=$ROOT/../$LMDZ 34 22 35 echo LMDZdir $LMDZdir 23 36 … … 40 53 echo LMDZ installation will start within 3 seconds 41 54 sleep 3 42 cd $ ROOT/../..55 cd $LMDZroot 43 56 wget http://www.lmd.jussieu.fr/~lmdz/pub/install_lmdz.sh 44 57 chmod +x install_lmdz.sh
Note: See TracChangeset
for help on using the changeset viewer.
