[3684] | 1 | #!/bin/bash |
---|
| 2 | # Par exemple: |
---|
| 3 | # ./make_axe4.sh V6.5AIS8 |
---|
| 4 | |
---|
| 5 | # ----------------------------------------------------------------- |
---|
| 6 | |
---|
| 7 | if [ $# -ne 1 ] |
---|
| 8 | then |
---|
| 9 | echo "Example: ./make_axe4.sh V6.5AIS8" |
---|
| 10 | exit |
---|
| 11 | fi |
---|
| 12 | |
---|
| 13 | # ----------------------------------------------------------------- |
---|
| 14 | # Based on /home/fabric/LMDZ/UTILS/config.sh |
---|
| 15 | |
---|
| 16 | comp=$1 |
---|
| 17 | |
---|
| 18 | season=YEAR |
---|
| 19 | GR=VLR |
---|
| 20 | MAIN_SE=/prodigfs/ipslfs/dods/fabric/lmdz/SE |
---|
| 21 | EXPNAME=NPV5LRL79 |
---|
| 22 | STOREDIR=/prodigfs/ipslfs/dods/fabric/lmdz/STORE/$EXPNAME |
---|
| 23 | MULTIDIR=/prodigfs/ipslfs/dods/fabric/lmdz/MultiSimu |
---|
| 24 | COMP_D=$MULTIDIR/$comp |
---|
| 25 | runstxt=/home/fabric/LMDZ/MultiSimu/runs.txt |
---|
| 26 | if [ ! -d $COMP_D ] ; then echo "$COMP_D not found" && exit ; fi |
---|
| 27 | |
---|
| 28 | # Liste des simulations de la comparasion $comp |
---|
| 29 | # ----------------------------------------------------------------- |
---|
| 30 | liste_sim="" |
---|
| 31 | DEF_FILE=$COMP_D/def.txt |
---|
| 32 | for s in `awk ' {print $1} ' $DEF_FILE` ; do liste_sim="$liste_sim $s" ; done |
---|
| 33 | |
---|
| 34 | # ----------------------------------------------------------------- |
---|
| 35 | # Comparaison to CloudSat precipitation rates over Antarctica |
---|
| 36 | # ----------------------------------------------------------------- |
---|
| 37 | |
---|
| 38 | outputdir=$COMP_D/AXE4/PRECIP/PNG |
---|
| 39 | if [ ! -d $outputdir ] |
---|
| 40 | then |
---|
| 41 | mkdir -pv $outputdir |
---|
| 42 | else |
---|
| 43 | echo "$outputdir has been found." |
---|
| 44 | fi |
---|
| 45 | |
---|
| 46 | # PLOT OBSERVED PRECIP |
---|
| 47 | cmdtmp="./AXE4/make_axe4-map-precip-obs.py -o $outputdir" |
---|
| 48 | echo $cmdtmp && ./$cmdtmp |
---|
| 49 | |
---|
| 50 | # PLOT SIMULATION RESULTS |
---|
| 51 | if [ 0 = 0 ] ; then |
---|
| 52 | for sim in $liste_sim ; do |
---|
| 53 | years=`grep '^'$sim' ' $DEF_FILE | awk ' { print $2 }'` |
---|
| 54 | echo FICHIERS POUR LA SIMULATION $sim annees $years |
---|
| 55 | simdir=`grep -w "^$sim " $runstxt | awk ' { print $2 } '` |
---|
| 56 | run=`basename $simdir ` |
---|
| 57 | # input=/prodigfs/ipslfs/dods/fabric/lmdz/SE/ORIG/${sim}_SE_${years}_1M_histmth.nc |
---|
| 58 | input=$simdir/ATM/Analyse/SE/${run}_SE_${years}_1M_histmth.nc |
---|
| 59 | if [ -e $input ] |
---|
| 60 | then |
---|
| 61 | cmdtmp="./AXE4/make_axe4-map-precip.py -i $input -o $outputdir" |
---|
| 62 | echo $cmdtmp && ./$cmdtmp |
---|
| 63 | else |
---|
| 64 | echo $input' file not found' |
---|
| 65 | fi |
---|
| 66 | # ----------------------------------------------------------------- |
---|
| 67 | done |
---|
| 68 | fi |
---|
| 69 | |
---|
| 70 | |
---|
| 71 | # ----------------------------------------------------------------- |
---|
| 72 | # Comparaison to Dome C temperatures (40m mast) |
---|
| 73 | # ----------------------------------------------------------------- |
---|
| 74 | |
---|
| 75 | outputdir=$COMP_D/AXE4/TZ1DC/PNG |
---|
| 76 | if [ ! -d $outputdir ] |
---|
| 77 | then |
---|
| 78 | mkdir -pv $outputdir |
---|
| 79 | else |
---|
| 80 | echo "$outputdir has been found." |
---|
| 81 | fi |
---|
| 82 | |
---|
| 83 | # PLOT SIMULATION RESULTS |
---|
| 84 | for sim in $liste_sim ; do |
---|
| 85 | years=`grep '^'$sim' ' $DEF_FILE | awk ' { print $2 }'` |
---|
| 86 | echo FICHIERS POUR LA SIMULATION $sim annees $years |
---|
| 87 | # input=/prodigfs/ipslfs/dods/fabric/lmdz/SE/ORIG/${sim}_SE_${years}_1M_histmth.nc |
---|
| 88 | simdir=`grep -w "^$sim " $runstxt | awk ' { print $2 } '` |
---|
| 89 | run=`basename $simdir ` |
---|
| 90 | input=$simdir/ATM/Analyse/SE/${run}_SE_${years}_1M_histmth.nc |
---|
| 91 | if [ -e $input ] |
---|
| 92 | then |
---|
| 93 | cmdtmp="./AXE4/make_axe4-temp-DC-mast.py -i $input -o $outputdir" |
---|
| 94 | echo $cmdtmp && ./$cmdtmp |
---|
| 95 | ( cd ./AXE4/ETIENNE3/ ; ./plot.sh -i $input -o $outputdir ; cd ../.. ) |
---|
| 96 | else |
---|
| 97 | echo $input' file not found' |
---|
| 98 | fi |
---|
| 99 | # ----------------------------------------------------------------- |
---|
| 100 | done |
---|
| 101 | |
---|