1 | #!/bin/bash |
---|
2 | |
---|
3 | mkdir -p WORK$$ |
---|
4 | cd WORK$$ |
---|
5 | |
---|
6 | wget="wget -t 1" |
---|
7 | |
---|
8 | vars="pourc_ter pourc_oce w500 cldh cldl cldm cldq cldt evap flat pluc plul precip prw psol q2m sens sicf slp soll soll0 sols sols0 t2m topl0 topl tops0 tops tsol u10m v10m wind10m clhcalipso clmcalipso cllcalipso cltcalipso" |
---|
9 | |
---|
10 | simu=$1 |
---|
11 | echo simu $simu |
---|
12 | run=`echo $simu | sed -e 's/_[0-9][0-9][0-9][0-9]_[0-9][0-9][0-9][0-9]//'` |
---|
13 | |
---|
14 | echo run $run |
---|
15 | |
---|
16 | years=`echo $simu | sed -e 's/'$run'//' | sed -e 's/_//'` |
---|
17 | ANS_deb=`echo $years | cut -c1-4` |
---|
18 | ANS_fin=`echo $years | cut -c6-9` |
---|
19 | echo years $years |
---|
20 | |
---|
21 | runstxt=/home/fabric/LMDZ/MultiSimu/runs.txt |
---|
22 | simdir=`grep -w "^$run " $runstxt | awk ' { print $2 } '` |
---|
23 | echo simdir $simdir |
---|
24 | sim=`basename $simdir ` |
---|
25 | |
---|
26 | for var in $vars ; do |
---|
27 | echo sim ${sim:0:4} |
---|
28 | time=${ANS_deb}0101_${ANS_fin}1230 |
---|
29 | file=${sim}_${time}_1M_$var.nc |
---|
30 | echo $file |
---|
31 | |
---|
32 | if [ ! -f $simdir/ATM/Analyse/TS_MO/$file ] ; then |
---|
33 | |
---|
34 | if [ "${sim:0:2}" = "MR" ] ; then |
---|
35 | #$wget http://dodsp.idris.fr/rdzt401/MTH/$file |
---|
36 | echo Voir si les TS existent dans ce cas |
---|
37 | elif [ "${sim}" = "CM605-LR-sstClim-01" ] ; then |
---|
38 | # A definr la decinie pour le couple |
---|
39 | $wget https://esgf.extra.cea.fr/thredds/fileServer/store_thredds/p86denv/IPSLCM6/PROD/clim/$sim/ATM/Analyse/TS_MO/$file |
---|
40 | elif [ "${sim:0:5}" = "CM605" ] ; then |
---|
41 | case $sim in |
---|
42 | CM605-LR-pdCtrl-01|CM605.THC1-LR-pdCtrl-01) login=p86caub ;; |
---|
43 | CM605.calv-LR-pdCtrl-02|CM605.dt20-LR-pdCtrl-02) login=p86mart ;; |
---|
44 | CM605.NOSU-LR-pdCtrl-02|CM605.NOSU-LR-pdCtrl-03) login=p86maf ;; |
---|
45 | CM605.Z0-LR-pdCtrl-01|CM605.GUST-LR-pdCtrl-01) login=p529tra ;; |
---|
46 | *) exit |
---|
47 | esac |
---|
48 | $wget https://esgf.extra.cea.fr/thredds/fileServer/store_thredds/$login/IPSLCM6/DEVT/pdControl/$sim/ATM/Analyse/TS_MO/$file |
---|
49 | |
---|
50 | elif [ "${sim:0:4}" = "NPv5" ] ; then |
---|
51 | if [ "${sim:0:6}" = "NPv5.8" ] || [ "$sim" = "NPv5.70svn2685" ] || [ "$sim" = "NPv5.MixAdiab" ] || [ "$sim" = "NPv5.V5.70Orolf" ] || [ "$sim" = "NPv5.70OrodrOrolf" ] || [ "$sim" = "NPv5.vn2709" ] || [ "$sim" = "NPv5.vn2709cv72" ] ; then |
---|
52 | echo $wget https://esgf.extra.cea.fr/thredds/fileServer/store_thredds/aidel/LMDZOR/DEVT/clim/$sim/ATM/Analyse/TS_MO/$file |
---|
53 | $wget https://esgf.extra.cea.fr/thredds/fileServer/store_thredds/aidel/LMDZOR/DEVT/clim/$sim/ATM/Analyse/TS_MO/$file |
---|
54 | else |
---|
55 | echo $wget http://esgf.extra.cea.fr/thredds/fileServer/store/aidel/LMDZOR/DEVT/clim//$sim/ATM/Analyse/TS_MO/$file |
---|
56 | $wget $wget http://esgf.extra.cea.fr/thredds/fileServer/store/aidel/LMDZOR/DEVT/clim//$sim/ATM/Analyse/TS_MO/$file |
---|
57 | fi |
---|
58 | |
---|
59 | elif [ "${sim:0:4}" = "LMDZ" ] ; then |
---|
60 | echo $wget https://esgf.extra.cea.fr/thredds/fileServer/store_thredds/aidel/LMDZOR/DEVT/clim/$sim/ATM/Analyse/TS_MO/$file |
---|
61 | $wget https://esgf.extra.cea.fr/thredds/fileServer/store_thredds/aidel/LMDZOR/DEVT/clim/$sim/ATM/Analyse/TS_MO/$file |
---|
62 | |
---|
63 | elif [ "${sim:0:7}" = "NPv4.12" ] ; then |
---|
64 | $wget http://dodsp.idris.fr/rlmd093/IGCM_OUT/LMDZOR/DEVT/clim/$sim/ATM/Analyse/TS_MO/$file |
---|
65 | elif [ "${sim:0:8}" = "AR4.0ada" -o "${sim:0:9}" = "NPv3.1ada" ] ; then |
---|
66 | $wget http://dodsp.idris.fr/rlmd093/IGCM_OUT/LMDZOR/DEVT/CLIM/$sim/ATM/Analyse/TS_MO/$file |
---|
67 | elif [ "${sim:0:6}" = "CPL6v5" ] ; then |
---|
68 | $wget http://dods.extra.cea.fr/store/p86fair/IPSLCM6/PROD/piControl/$sim/ATM/Analyse/TS_MO/$file |
---|
69 | elif [ "${sim:0:16}" = "v5.5pftXORCA1V01" ] ; then |
---|
70 | $wget http://dods.extra.cea.fr/store/p86fair/IPSLCM6/PROD/piControl/${sim}_tmp/ATM/Analyse/TS_MO/$file |
---|
71 | elif [ "${sim:0:18}" = "CL5.CWRR90mSu.3607" ] ; then |
---|
72 | $wget http://esgf.extra.cea.fr/thredds/fileServer/store/p86ghatt/LMDZOR/PROD/ref3607/${sim}/ATM/Analyse/SE/$file |
---|
73 | elif [ "${sim:0:22}" = "CL5.CWRR90msnowSu.3607" ] ; then |
---|
74 | $wget http://esgf.extra.cea.fr/thredds/fileServer/store/p86ghatt/LMDZOR/PROD/ref3607/${sim}/ATM/Analyse/TS_MO/$file |
---|
75 | elif [ "${sim:0:16}" = "CL5.CWRRcSu.3607" ] ; then |
---|
76 | $wget http://esgf.extra.cea.fr/thredds/fileServer/store/p86ghatt/LMDZOR/PROD/ref3607/${sim}/ATM/Analyse/TS_MO/$file |
---|
77 | elif [ "${sim:0:22}" = "CL5.CWRR90msnowZ0.3607" ] ; then |
---|
78 | $wget http://esgf.extra.cea.fr/thredds/fileServer/store/p86ghatt/LMDZOR/PROD/ref3607/${sim}/ATM/Analyse/TS_MO/$file |
---|
79 | elif [ "${sim:0:18}" = "CL5.CWRR90mZ0.3607" ] ; then |
---|
80 | $wget http://esgf.extra.cea.fr/thredds/fileServer/store/p86ghatt/LMDZOR/PROD/ref3607/${sim}/ATM/Analyse/TS_MO/$file |
---|
81 | #elif [ "${sim:0:18}" = "CL5.CWRR90mSu.3525" ] ; then |
---|
82 | # $wget http://dods.extra.cea.fr/store/p86ghatt/LMDZOR/PROD/ref3525/${sim}/ATM/Analyse/SE/$file |
---|
83 | #echo OK c est la ; exit |
---|
84 | elif [ "${sim:0:12}" = "v5.5XORCA1V01" ] ; then |
---|
85 | $wget http://dods.extra.cea.fr/store/p86fair/IPSLCM6/PROD/piControl/${sim}/ATM/Analyse/TS_MO/$file |
---|
86 | elif [ "${sim:0:12}" = "v5.63XORCA1T" ] ; then |
---|
87 | $wget http://dods.extra.cea.fr/store/p86fair/IPSLCM6/PROD/piControl/${sim}_temp/ATM/Analyse/TS_MO/$file |
---|
88 | elif [ "${sim:0:5}" = "v5.5X" ] ; then |
---|
89 | $wget http://dods.extra.cea.fr/store/p86fair/IPSLCM6/PROD/piControl/$sim/ATM/Analyse/TS_MO/$file |
---|
90 | elif [ "${sim:0:4}" = "AMIP" ] ; then |
---|
91 | $wget http://dods.extra.cea.fr/store/mellull/LMDZOR/PROD/amip/$sim/ATM/Analyse/TS_MO/$file |
---|
92 | elif [ "${sim:2:12}" = ".historical1" ] ; then |
---|
93 | $wget http://dods.extra.cea.fr/store/p86denv/IPSLCM5A/PROD/historical/v3.historical1/ATM/Analyse/TS_MO/$file |
---|
94 | elif [ "${sim:2:8}" = ".histNP1" ] ; then |
---|
95 | $wget http://dods.extra.cea.fr/store/p86fair/IPSLCM5B/PROD/historical/v5.histNP1/ATM/Analyse/TS_MO/$file |
---|
96 | elif [ "${sim:2:15}" = ".historicalCMR5" ] ; then |
---|
97 | $wget http://dods.extra.cea.fr/store/p86maf/IPSLCM5A-MR/PROD/historical/v5.historicalCMR5/ATM/Analyse/TS_MO/$file |
---|
98 | elif [ "${sim:0:11}" = "ADA2016COMP" ] ; then |
---|
99 | $wget http://dods.idris.fr/rlmd007/LMDZOR/PROD/clim/$sim/ATM/Analyse/TS_MO/$file |
---|
100 | elif [ "${sim:0:7}" = "MP65vd2" ] ; then |
---|
101 | # $wget http://dods.extra.cea.fr/store/p86musat/Tuning_runs/tun141479_svn2574_xios2/$sim/TS_MO/$file |
---|
102 | echo TS pour ce cas ? |
---|
103 | elif [ "${sim:0:7}" = "MP68vd2" ] ; then |
---|
104 | # $wget http://dods.extra.cea.fr/store/p86musat/Tuning_runs/tun141479_svn2574_xios2/$sim/$file |
---|
105 | echo TS pour ce cas ? |
---|
106 | elif [ "${sim:0:2}" = "T0" ] ; then |
---|
107 | fileb=`echo $file | sed -e 's/T0//'` |
---|
108 | simb=`echo $sim | sed -e 's/T0//'` |
---|
109 | echo FILEB $fileb |
---|
110 | # $wget http://dods.extra.cea.fr/store/p86musat/Tuning_runs/tun141479_svn2468/$simb/$fileb |
---|
111 | echo TS pour ce cas ? |
---|
112 | \mv -f $fileb $file |
---|
113 | else |
---|
114 | echo Cas non prevu |
---|
115 | exit |
---|
116 | fi |
---|
117 | |
---|
118 | if [ ! -d $simdir/ATM/Analyse/TS_MO ] ; then |
---|
119 | mkdir -p $simdir/ATM/Analyse/TS_MO |
---|
120 | fi |
---|
121 | |
---|
122 | mv $file $simdir/ATM/Analyse/TS_MO/ |
---|
123 | else |
---|
124 | echo Le fichier $file est deja rapatrie |
---|
125 | fi |
---|
126 | done |
---|