source: BOL/Multi_atlas/make_axe4.sh @ 3801

Last change on this file since 3801 was 3684, checked in by idelkadi, 4 years ago

Repository under svn of a first version of Multiatlas diagnostics for LMDZ. This version is adapted to be able to run a LMDZ multiatlas on an individual account on the ciclad machine of the IPSL. In this version, the parts to be modified are identified so as to subsequently adapt it to other machines.
This version is still under development.

  • Property svn:executable set to *
File size: 2.9 KB
RevLine 
[3684]1#!/bin/bash
2# Par exemple:
3# ./make_axe4.sh V6.5AIS8
4
5# -----------------------------------------------------------------
6
7if [ $# -ne 1 ]
8then
9  echo "Example: ./make_axe4.sh V6.5AIS8"
10exit
11fi
12
13# -----------------------------------------------------------------
14# Based on /home/fabric/LMDZ/UTILS/config.sh
15
16comp=$1
17
18season=YEAR
19GR=VLR
20MAIN_SE=/prodigfs/ipslfs/dods/fabric/lmdz/SE
21EXPNAME=NPV5LRL79
22STOREDIR=/prodigfs/ipslfs/dods/fabric/lmdz/STORE/$EXPNAME
23MULTIDIR=/prodigfs/ipslfs/dods/fabric/lmdz/MultiSimu
24COMP_D=$MULTIDIR/$comp
25runstxt=/home/fabric/LMDZ/MultiSimu/runs.txt
26if [ ! -d $COMP_D ] ; then echo "$COMP_D not found" && exit ; fi
27
28# Liste des simulations de la comparasion $comp
29# -----------------------------------------------------------------
30liste_sim=""
31DEF_FILE=$COMP_D/def.txt
32for 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
38outputdir=$COMP_D/AXE4/PRECIP/PNG
39if [ ! -d $outputdir ]
40then
41  mkdir -pv $outputdir
42else
43  echo "$outputdir has been found."
44fi
45
46# PLOT OBSERVED PRECIP
47cmdtmp="./AXE4/make_axe4-map-precip-obs.py -o $outputdir"
48echo $cmdtmp && ./$cmdtmp
49
50# PLOT SIMULATION RESULTS
51if [ 0 = 0 ] ; then
52for 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# -----------------------------------------------------------------
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#  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# -----------------------------------------------------------------
100done
101
Note: See TracBrowser for help on using the repository browser.