[4701] | 1 | #!/bin/bash -vx |
---|
[3684] | 2 | # Par exemple: |
---|
| 3 | # ./make_axe4.sh V6.5AIS8 |
---|
| 4 | |
---|
[4701] | 5 | local=`pwd` |
---|
| 6 | source ${local}/env_Multi_atlas_axe4.sh |
---|
[3684] | 7 | # ----------------------------------------------------------------- |
---|
| 8 | |
---|
| 9 | if [ $# -ne 1 ] |
---|
| 10 | then |
---|
| 11 | echo "Example: ./make_axe4.sh V6.5AIS8" |
---|
| 12 | exit |
---|
| 13 | fi |
---|
| 14 | |
---|
| 15 | # ----------------------------------------------------------------- |
---|
| 16 | # Based on /home/fabric/LMDZ/UTILS/config.sh |
---|
| 17 | |
---|
| 18 | comp=$1 |
---|
| 19 | |
---|
| 20 | COMP_D=$MULTIDIR/$comp |
---|
[4701] | 21 | runstxt=${local}/runs.txt |
---|
[3684] | 22 | if [ ! -d $COMP_D ] ; then echo "$COMP_D not found" && exit ; fi |
---|
| 23 | |
---|
| 24 | # Liste des simulations de la comparasion $comp |
---|
| 25 | # ----------------------------------------------------------------- |
---|
| 26 | liste_sim="" |
---|
| 27 | DEF_FILE=$COMP_D/def.txt |
---|
| 28 | for s in `awk ' {print $1} ' $DEF_FILE` ; do liste_sim="$liste_sim $s" ; done |
---|
| 29 | |
---|
| 30 | # ----------------------------------------------------------------- |
---|
| 31 | # Comparaison to CloudSat precipitation rates over Antarctica |
---|
| 32 | # ----------------------------------------------------------------- |
---|
| 33 | |
---|
| 34 | outputdir=$COMP_D/AXE4/PRECIP/PNG |
---|
| 35 | if [ ! -d $outputdir ] |
---|
| 36 | then |
---|
| 37 | mkdir -pv $outputdir |
---|
| 38 | else |
---|
| 39 | echo "$outputdir has been found." |
---|
| 40 | fi |
---|
| 41 | |
---|
| 42 | # PLOT OBSERVED PRECIP |
---|
[4701] | 43 | cmdtmp="${local}/AXE4/make_axe4-map-precip-obs.py -o $outputdir" |
---|
| 44 | echo $cmdtmp |
---|
| 45 | $cmdtmp |
---|
[3684] | 46 | |
---|
| 47 | # PLOT SIMULATION RESULTS |
---|
| 48 | if [ 0 = 0 ] ; then |
---|
| 49 | for sim in $liste_sim ; do |
---|
| 50 | years=`grep '^'$sim' ' $DEF_FILE | awk ' { print $2 }'` |
---|
| 51 | echo FICHIERS POUR LA SIMULATION $sim annees $years |
---|
| 52 | simdir=`grep -w "^$sim " $runstxt | awk ' { print $2 } '` |
---|
| 53 | run=`basename $simdir ` |
---|
[4701] | 54 | input=$SEORIG/${run}_SE_${years}_1M_histmth.nc |
---|
[3684] | 55 | if [ -e $input ] |
---|
| 56 | then |
---|
[4701] | 57 | cmdtmp="${local}/AXE4/make_axe4-map-precip.py -i $input -o $outputdir" |
---|
| 58 | echo $cmdtmp |
---|
| 59 | $cmdtmp |
---|
| 60 | cmdtmp="${local}/AXE4/make_axe4-map-precip_newcoord.py -i $input -o $outputdir" |
---|
| 61 | echo $cmdtmp |
---|
| 62 | $cmdtmp |
---|
[3684] | 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 | simdir=`grep -w "^$sim " $runstxt | awk ' { print $2 } '` |
---|
| 88 | run=`basename $simdir ` |
---|
[4701] | 89 | input=$SEORIG/${run}_SE_${years}_1M_histmth.nc |
---|
[3684] | 90 | if [ -e $input ] |
---|
| 91 | then |
---|
[4701] | 92 | cmdtmp="${local}/AXE4/make_axe4-temp-DC-mast.py -i $input -o $outputdir" |
---|
| 93 | echo $cmdtmp |
---|
| 94 | $cmdtmp |
---|
| 95 | cd ${local}/AXE4/ETIENNE3/ |
---|
| 96 | echo ./plot.sh -i $input -o $outputdir |
---|
| 97 | ./plot.sh -i $input -o $outputdir |
---|
| 98 | cd ${local} |
---|
[3684] | 99 | else |
---|
| 100 | echo $input' file not found' |
---|
| 101 | fi |
---|
| 102 | # ----------------------------------------------------------------- |
---|
| 103 | done |
---|
| 104 | |
---|