source: BOL/Multi_atlas/make_axe4.sh @ 5434

Last change on this file since 5434 was 4701, checked in by musat, 15 months ago

Adaptation script make_axe4.sh (AXE4) a spirit2
Mise a jour html axe3 par Abderrahmane Idelkadi
IonelaMusat?

  • Property svn:executable set to *
File size: 2.8 KB
Line 
1#!/bin/bash -vx
2# Par exemple:
3# ./make_axe4.sh V6.5AIS8
4
5local=`pwd`
6source ${local}/env_Multi_atlas_axe4.sh
7# -----------------------------------------------------------------
8
9if [ $# -ne 1 ]
10then
11  echo "Example: ./make_axe4.sh V6.5AIS8"
12exit
13fi
14
15# -----------------------------------------------------------------
16# Based on /home/fabric/LMDZ/UTILS/config.sh
17
18comp=$1
19
20COMP_D=$MULTIDIR/$comp
21runstxt=${local}/runs.txt
22if [ ! -d $COMP_D ] ; then echo "$COMP_D not found" && exit ; fi
23
24# Liste des simulations de la comparasion $comp
25# -----------------------------------------------------------------
26liste_sim=""
27DEF_FILE=$COMP_D/def.txt
28for 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
34outputdir=$COMP_D/AXE4/PRECIP/PNG
35if [ ! -d $outputdir ]
36then
37  mkdir -pv $outputdir
38else
39  echo "$outputdir has been found."
40fi
41
42# PLOT OBSERVED PRECIP
43cmdtmp="${local}/AXE4/make_axe4-map-precip-obs.py -o $outputdir"
44echo $cmdtmp
45$cmdtmp
46
47# PLOT SIMULATION RESULTS
48if [ 0 = 0 ] ; then
49for 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 `
54  input=$SEORIG/${run}_SE_${years}_1M_histmth.nc
55  if [ -e $input ]
56  then
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
63  else
64    echo $input' file not found'
65  fi
66# -----------------------------------------------------------------
67done
68fi
69 
70
71# -----------------------------------------------------------------
72# Comparaison to Dome C temperatures (40m mast)
73# -----------------------------------------------------------------
74
75outputdir=$COMP_D/AXE4/TZ1DC/PNG
76if [ ! -d $outputdir ]
77then
78  mkdir -pv $outputdir
79else
80  echo "$outputdir has been found."
81fi
82
83# PLOT SIMULATION RESULTS
84for 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 ` 
89  input=$SEORIG/${run}_SE_${years}_1M_histmth.nc
90  if [ -e $input ]
91  then
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}
99  else
100    echo $input' file not found'
101  fi
102# -----------------------------------------------------------------
103done
104
Note: See TracBrowser for help on using the repository browser.