[3684] | 1 | #!/bin/bash |
---|
| 2 | |
---|
| 3 | mkdir -p WORK$$ |
---|
| 4 | cd WORK$$ |
---|
| 5 | |
---|
| 6 | wget="wget -t 1" |
---|
| 7 | |
---|
| 8 | vars="evap flat pluc plul precip psol q2m sens sicf slp soll sols SWdnSFC t2m topl0 topl tops0 tops tsol u10m v10m wind10m u850" |
---|
| 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}_1D_$var.nc |
---|
| 30 | echo $file |
---|
| 31 | |
---|
| 32 | if [ ! -f $simdir/ATM/Analyse/TS_DA/$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_DA/$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_DA/$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_DA/$file |
---|
| 53 | $wget https://esgf.extra.cea.fr/thredds/fileServer/store_thredds/aidel/LMDZOR/DEVT/clim/$sim/ATM/Analyse/TS_DA/$file |
---|
| 54 | else |
---|
| 55 | echo $wget http://esgf.extra.cea.fr/thredds/fileServer/store/aidel/LMDZOR/DEVT/clim//$sim/ATM/Analyse/TS_DA/$file |
---|
| 56 | $wget $wget http://esgf.extra.cea.fr/thredds/fileServer/store/aidel/LMDZOR/DEVT/clim//$sim/ATM/Analyse/TS_DA/$file |
---|
| 57 | fi |
---|
| 58 | elif [ "${sim:0:4}" = "LMDZ" ] ; then |
---|
| 59 | echo $wget https://esgf.extra.cea.fr/thredds/fileServer/store_thredds/aidel/LMDZOR/DEVT/clim/$sim/ATM/Analyse/TS_DA/$file |
---|
| 60 | $wget https://esgf.extra.cea.fr/thredds/fileServer/store_thredds/aidel/LMDZOR/DEVT/clim/$sim/ATM/Analyse/TS_DA/$file |
---|
| 61 | |
---|
| 62 | elif [ "${sim:0:7}" = "NPv4.12" ] ; then |
---|
| 63 | $wget http://dodsp.idris.fr/rlmd093/IGCM_OUT/LMDZOR/DEVT/clim/$sim/ATM/Analyse/TS_DA/$file |
---|
| 64 | elif [ "${sim:0:8}" = "AR4.0ada" -o "${sim:0:9}" = "NPv3.1ada" ] ; then |
---|
| 65 | $wget http://dodsp.idris.fr/rlmd093/IGCM_OUT/LMDZOR/DEVT/CLIM/$sim/ATM/Analyse/TS_DA/$file |
---|
| 66 | elif [ "${sim:0:6}" = "CPL6v5" ] ; then |
---|
| 67 | $wget http://dods.extra.cea.fr/store/p86fair/IPSLCM6/PROD/piControl/$sim/ATM/Analyse/TS_DA/$file |
---|
| 68 | elif [ "${sim:0:16}" = "v5.5pftXORCA1V01" ] ; then |
---|
| 69 | $wget http://dods.extra.cea.fr/store/p86fair/IPSLCM6/PROD/piControl/${sim}_tmp/ATM/Analyse/TS_DA/$file |
---|
| 70 | elif [ "${sim:0:18}" = "CL5.CWRR90mSu.3607" ] ; then |
---|
| 71 | $wget http://esgf.extra.cea.fr/thredds/fileServer/store/p86ghatt/LMDZOR/PROD/ref3607/${sim}/ATM/Analyse/SE/$file |
---|
| 72 | elif [ "${sim:0:22}" = "CL5.CWRR90msnowSu.3607" ] ; then |
---|
| 73 | $wget http://esgf.extra.cea.fr/thredds/fileServer/store/p86ghatt/LMDZOR/PROD/ref3607/${sim}/ATM/Analyse/TS_DA/$file |
---|
| 74 | elif [ "${sim:0:16}" = "CL5.CWRRcSu.3607" ] ; then |
---|
| 75 | $wget http://esgf.extra.cea.fr/thredds/fileServer/store/p86ghatt/LMDZOR/PROD/ref3607/${sim}/ATM/Analyse/TS_DA/$file |
---|
| 76 | elif [ "${sim:0:22}" = "CL5.CWRR90msnowZ0.3607" ] ; then |
---|
| 77 | $wget http://esgf.extra.cea.fr/thredds/fileServer/store/p86ghatt/LMDZOR/PROD/ref3607/${sim}/ATM/Analyse/TS_DA/$file |
---|
| 78 | elif [ "${sim:0:18}" = "CL5.CWRR90mZ0.3607" ] ; then |
---|
| 79 | $wget http://esgf.extra.cea.fr/thredds/fileServer/store/p86ghatt/LMDZOR/PROD/ref3607/${sim}/ATM/Analyse/TS_DA/$file |
---|
| 80 | #elif [ "${sim:0:18}" = "CL5.CWRR90mSu.3525" ] ; then |
---|
| 81 | # $wget http://dods.extra.cea.fr/store/p86ghatt/LMDZOR/PROD/ref3525/${sim}/ATM/Analyse/SE/$file |
---|
| 82 | #echo OK c est la ; exit |
---|
| 83 | elif [ "${sim:0:12}" = "v5.5XORCA1V01" ] ; then |
---|
| 84 | $wget http://dods.extra.cea.fr/store/p86fair/IPSLCM6/PROD/piControl/${sim}/ATM/Analyse/TS_DA/$file |
---|
| 85 | elif [ "${sim:0:12}" = "v5.63XORCA1T" ] ; then |
---|
| 86 | $wget http://dods.extra.cea.fr/store/p86fair/IPSLCM6/PROD/piControl/${sim}_temp/ATM/Analyse/TS_DA/$file |
---|
| 87 | elif [ "${sim:0:5}" = "v5.5X" ] ; then |
---|
| 88 | $wget http://dods.extra.cea.fr/store/p86fair/IPSLCM6/PROD/piControl/$sim/ATM/Analyse/TS_DA/$file |
---|
| 89 | elif [ "${sim:0:4}" = "AMIP" ] ; then |
---|
| 90 | $wget http://dods.extra.cea.fr/store/mellull/LMDZOR/PROD/amip/$sim/ATM/Analyse/TS_DA/$file |
---|
| 91 | elif [ "${sim:2:12}" = ".historical1" ] ; then |
---|
| 92 | $wget http://dods.extra.cea.fr/store/p86denv/IPSLCM5A/PROD/historical/v3.historical1/ATM/Analyse/TS_DA/$file |
---|
| 93 | elif [ "${sim:2:8}" = ".histNP1" ] ; then |
---|
| 94 | $wget http://dods.extra.cea.fr/store/p86fair/IPSLCM5B/PROD/historical/v5.histNP1/ATM/Analyse/TS_DA/$file |
---|
| 95 | elif [ "${sim:2:15}" = ".historicalCMR5" ] ; then |
---|
| 96 | $wget http://dods.extra.cea.fr/store/p86maf/IPSLCM5A-MR/PROD/historical/v5.historicalCMR5/ATM/Analyse/TS_DA/$file |
---|
| 97 | elif [ "${sim:0:11}" = "ADA2016COMP" ] ; then |
---|
| 98 | $wget http://dods.idris.fr/rlmd007/LMDZOR/PROD/clim/$sim/ATM/Analyse/TS_DA/$file |
---|
| 99 | elif [ "${sim:0:7}" = "MP65vd2" ] ; then |
---|
| 100 | # $wget http://dods.extra.cea.fr/store/p86musat/Tuning_runs/tun141479_svn2574_xios2/$sim/TS_DA/$file |
---|
| 101 | echo TS pour ce cas ? |
---|
| 102 | elif [ "${sim:0:7}" = "MP68vd2" ] ; then |
---|
| 103 | # $wget http://dods.extra.cea.fr/store/p86musat/Tuning_runs/tun141479_svn2574_xios2/$sim/$file |
---|
| 104 | echo TS pour ce cas ? |
---|
| 105 | elif [ "${sim:0:2}" = "T0" ] ; then |
---|
| 106 | fileb=`echo $file | sed -e 's/T0//'` |
---|
| 107 | simb=`echo $sim | sed -e 's/T0//'` |
---|
| 108 | echo FILEB $fileb |
---|
| 109 | # $wget http://dods.extra.cea.fr/store/p86musat/Tuning_runs/tun141479_svn2468/$simb/$fileb |
---|
| 110 | echo TS pour ce cas ? |
---|
| 111 | \mv -f $fileb $file |
---|
| 112 | else |
---|
| 113 | echo Cas non prevu |
---|
| 114 | exit |
---|
| 115 | fi |
---|
| 116 | |
---|
| 117 | if [ ! -d $simdir/ATM/Analyse/TS_DA ] ; then |
---|
| 118 | mkdir -p $simdir/ATM/Analyse/TS_DA |
---|
| 119 | fi |
---|
| 120 | |
---|
| 121 | mv $file $simdir/ATM/Analyse/TS_DA/ |
---|
| 122 | else |
---|
| 123 | echo Le fichier $file est deja dans rapatrie |
---|
| 124 | fi |
---|
| 125 | done |
---|