[3684] | 1 | #!/bin/bash |
---|
| 2 | |
---|
| 3 | #http://dods.extra.cea.fr/store/aidel/LMDZOR/DEVT/clim/NPv5.50/ATM/Analyse/SE/NPv5.50_SE_1982_1989_1M_histmth.nc |
---|
| 4 | |
---|
| 5 | mkdir -p WORK$$ |
---|
| 6 | cd WORK$$ |
---|
| 7 | wget="wget -t 1" |
---|
| 8 | |
---|
| 9 | simu=$1 |
---|
| 10 | echo simu $simu |
---|
| 11 | run=`echo $simu | sed -e 's/_[0-9][0-9][0-9][0-9]_[0-9][0-9][0-9][0-9]//'` |
---|
| 12 | |
---|
| 13 | echo run $run |
---|
| 14 | runstxt=/home/fabric/LMDZ/MultiSimu/runs.txt |
---|
| 15 | simdir=`grep -w "^$run " $runstxt | awk ' { print $2 } '` |
---|
| 16 | echo simdir $simdir |
---|
| 17 | sim=`basename $simdir ` |
---|
| 18 | |
---|
| 19 | years=`echo $simu | sed -e 's/'$run'//' | sed -e 's/_//'` |
---|
| 20 | echo years $years |
---|
| 21 | runu=${sim}_SE_$years |
---|
| 22 | |
---|
| 23 | echo runu $runu |
---|
| 24 | |
---|
| 25 | for file in ${runu}_1M_histmth.nc ${runu}_1M_histmthCOSP.nc ; do |
---|
| 26 | |
---|
| 27 | sim=` echo $file | sed -e 's/_SE_.*..nc//'` |
---|
| 28 | |
---|
| 29 | echo AVANT SIM $sim $file |
---|
| 30 | |
---|
| 31 | echo $simdir/ATM/Analyse/SE/$file |
---|
| 32 | |
---|
| 33 | if [ ! -f $simdir/ATM/Analyse/SE/$file ] ; then |
---|
| 34 | echo OK |
---|
| 35 | |
---|
| 36 | echo APRES SIM $sim $file |
---|
| 37 | echo sim ${sim:0:4} |
---|
| 38 | |
---|
| 39 | if [ "${sim:0:2}" = "MR" ] ; then |
---|
| 40 | $wget http://dodsp.idris.fr/rdzt401/MTH/$file |
---|
| 41 | elif [ "${sim}" = "CM605-LR-sstClim-01" ] ; then |
---|
| 42 | $wget https://esgf.extra.cea.fr/thredds/fileServer/store_thredds/p86denv/IPSLCM6/PROD/clim/$sim/ATM/Analyse/SE/$file |
---|
| 43 | elif [ "${sim:0:5}" = "CM605" ] ; then |
---|
| 44 | case $sim in |
---|
| 45 | CM605-LR-pdCtrl-01|CM605.THC1-LR-pdCtrl-01) login=p86caub ;; |
---|
| 46 | CM605.calv-LR-pdCtrl-02|CM605.dt20-LR-pdCtrl-02) login=p86mart ;; |
---|
| 47 | CM605.NOSU-LR-pdCtrl-02|CM605.NOSU-LR-pdCtrl-03) login=p86maf ;; |
---|
| 48 | CM605.Z0-LR-pdCtrl-01|CM605.GUST-LR-pdCtrl-01) login=p529tra ;; |
---|
| 49 | *) exit |
---|
| 50 | esac |
---|
| 51 | $wget https://esgf.extra.cea.fr/thredds/fileServer/store_thredds/$login/IPSLCM6/DEVT/pdControl/$sim/ATM/Analyse/SE/$file |
---|
| 52 | elif [ "${sim:0:4}" = "NPv5" ] ; then |
---|
| 53 | 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 |
---|
| 54 | echo $wget https://esgf.extra.cea.fr/thredds/fileServer/store_thredds/aidel/LMDZOR/DEVT/clim/$sim/ATM/Analyse/SE/EXTR/$file |
---|
| 55 | $wget https://esgf.extra.cea.fr/thredds/fileServer/store_thredds/aidel/LMDZOR/DEVT/clim/$sim/ATM/Analyse/SE/EXTR/$file |
---|
| 56 | else |
---|
| 57 | echo $wget http://esgf.extra.cea.fr/thredds/fileServer/store/aidel/LMDZOR/DEVT/clim//$sim/ATM/Analyse/SE/EXTR/$file |
---|
| 58 | $wget $wget http://esgf.extra.cea.fr/thredds/fileServer/store/aidel/LMDZOR/DEVT/clim//$sim/ATM/Analyse/SE/EXTR/$file |
---|
| 59 | fi |
---|
| 60 | elif [ "${sim:0:4}" = "LMDZ" ] ; then |
---|
| 61 | echo $wget https://esgf.extra.cea.fr/thredds/fileServer/store_thredds/aidel/LMDZOR/DEVT/clim/$sim/ATM/Analyse/SE/EXTR/$file |
---|
| 62 | $wget https://esgf.extra.cea.fr/thredds/fileServer/store_thredds/aidel/LMDZOR/DEVT/clim/$sim/ATM/Analyse/SE/EXTR/$file |
---|
| 63 | # $wget http://dods.extra.cea.fr/store/aidel/LMDZOR/DEVT/clim/$sim/ATM/Analyse/SE/$file |
---|
| 64 | #$wget https://esgf.extra.cea.fr/thredds/fileServer/store/aidel/LMDZOR/DEVT/clim/$sim/ATM/Analyse/SE/$file |
---|
| 65 | #$wget https://esgf.extra.cea.fr/thredds/fileServer/store_thredds/aidel/LMDZOR/DEVT/clim/$sim/ATM/Analyse/SE/EXTR/$file |
---|
| 66 | elif [ "${sim:0:7}" = "NPv4.12" ] ; then |
---|
| 67 | $wget http://dodsp.idris.fr/rlmd093/IGCM_OUT/LMDZOR/DEVT/clim/$sim/ATM/Analyse/SE/$file |
---|
| 68 | elif [ "${sim:0:8}" = "AR4.0ada" -o "${sim:0:9}" = "NPv3.1ada" ] ; then |
---|
| 69 | $wget http://dodsp.idris.fr/rlmd093/IGCM_OUT/LMDZOR/DEVT/CLIM/$sim/ATM/Analyse/SE/$file |
---|
| 70 | elif [ "${sim:0:6}" = "CPL6v5" ] ; then |
---|
| 71 | $wget http://dods.extra.cea.fr/store/p86fair/IPSLCM6/PROD/piControl/$sim/ATM/Analyse/SE/$file |
---|
| 72 | elif [ "${sim:0:16}" = "v5.5pftXORCA1V01" ] ; then |
---|
| 73 | $wget http://dods.extra.cea.fr/store/p86fair/IPSLCM6/PROD/piControl/${sim}_tmp/ATM/Analyse/SE/$file |
---|
| 74 | elif [ "${sim:0:18}" = "CL5.CWRR90mSu.3607" ] ; then |
---|
| 75 | $wget http://esgf.extra.cea.fr/thredds/fileServer/store/p86ghatt/LMDZOR/PROD/ref3607/${sim}/ATM/Analyse/SE/$file |
---|
| 76 | elif [ "${sim:0:22}" = "CL5.CWRR90msnowSu.3607" ] ; then |
---|
| 77 | $wget http://esgf.extra.cea.fr/thredds/fileServer/store/p86ghatt/LMDZOR/PROD/ref3607/${sim}/ATM/Analyse/SE/$file |
---|
| 78 | elif [ "${sim:0:16}" = "CL5.CWRRcSu.3607" ] ; then |
---|
| 79 | $wget http://esgf.extra.cea.fr/thredds/fileServer/store/p86ghatt/LMDZOR/PROD/ref3607/${sim}/ATM/Analyse/SE/$file |
---|
| 80 | elif [ "${sim:0:22}" = "CL5.CWRR90msnowZ0.3607" ] ; then |
---|
| 81 | $wget http://esgf.extra.cea.fr/thredds/fileServer/store/p86ghatt/LMDZOR/PROD/ref3607/${sim}/ATM/Analyse/SE/$file |
---|
| 82 | elif [ "${sim:0:18}" = "CL5.CWRR90mZ0.3607" ] ; then |
---|
| 83 | $wget http://esgf.extra.cea.fr/thredds/fileServer/store/p86ghatt/LMDZOR/PROD/ref3607/${sim}/ATM/Analyse/SE/$file |
---|
| 84 | #elif [ "${sim:0:18}" = "CL5.CWRR90mSu.3525" ] ; then |
---|
| 85 | # $wget http://dods.extra.cea.fr/store/p86ghatt/LMDZOR/PROD/ref3525/${run}/ATM/Analyse/SE/$file |
---|
| 86 | #echo OK c est la ; exit |
---|
| 87 | elif [ "${sim:0:12}" = "v5.5XORCA1V01" ] ; then |
---|
| 88 | $wget http://dods.extra.cea.fr/store/p86fair/IPSLCM6/PROD/piControl/${sim}/ATM/Analyse/SE/$file |
---|
| 89 | elif [ "${sim:0:12}" = "v5.63XORCA1T" ] ; then |
---|
| 90 | $wget http://dods.extra.cea.fr/store/p86fair/IPSLCM6/PROD/piControl/${sim}_temp/ATM/Analyse/SE/$file |
---|
| 91 | elif [ "${sim:0:5}" = "v5.5X" ] ; then |
---|
| 92 | $wget http://dods.extra.cea.fr/store/p86fair/IPSLCM6/PROD/piControl/$sim/ATM/Analyse/SE/$file |
---|
| 93 | elif [ "${sim:0:4}" = "AMIP" ] ; then |
---|
| 94 | $wget http://dods.extra.cea.fr/store/mellull/LMDZOR/PROD/amip/$sim/ATM/Analyse/SE/$file |
---|
| 95 | elif [ "${sim:2:12}" = ".historical1" ] ; then |
---|
| 96 | $wget http://dods.extra.cea.fr/store/p86denv/IPSLCM5A/PROD/historical/v3.historical1/ATM/Analyse/SE/$file |
---|
| 97 | elif [ "${sim:2:8}" = ".histNP1" ] ; then |
---|
| 98 | $wget http://dods.extra.cea.fr/store/p86fair/IPSLCM5B/PROD/historical/v5.histNP1/ATM/Analyse/SE/$file |
---|
| 99 | elif [ "${sim:2:15}" = ".historicalCMR5" ] ; then |
---|
| 100 | $wget http://dods.extra.cea.fr/store/p86maf/IPSLCM5A-MR/PROD/historical/v5.historicalCMR5/ATM/Analyse/SE/$file |
---|
| 101 | elif [ "${sim:0:11}" = "ADA2016COMP" ] ; then |
---|
| 102 | $wget http://dods.idris.fr/rlmd007/LMDZOR/PROD/clim/$sim/ATM/Analyse/SE/$file |
---|
| 103 | elif [ "${sim:0:7}" = "MP65vd2" ] ; then |
---|
| 104 | $wget http://dods.extra.cea.fr/store/p86musat/Tuning_runs/tun141479_svn2574_xios2/$sim/$file |
---|
| 105 | elif [ "${sim:0:7}" = "MP68vd2" ] ; then |
---|
| 106 | $wget http://dods.extra.cea.fr/store/p86musat/Tuning_runs/tun141479_svn2574_xios2/$sim/$file |
---|
| 107 | elif [ "${sim:0:2}" = "T0" ] ; then |
---|
| 108 | fileb=`echo $file | sed -e 's/T0//'` |
---|
| 109 | simb=`echo $sim | sed -e 's/T0//'` |
---|
| 110 | echo FILEB $fileb |
---|
| 111 | $wget http://dods.extra.cea.fr/store/p86musat/Tuning_runs/tun141479_svn2468/$simb/$fileb |
---|
| 112 | \mv -f $fileb $file |
---|
| 113 | else |
---|
| 114 | echo Cas non prevu |
---|
| 115 | exit |
---|
| 116 | fi |
---|
| 117 | |
---|
| 118 | fi |
---|
| 119 | |
---|
| 120 | runstxt=/home/fabric/LMDZ/MultiSimu/runs.txt |
---|
| 121 | simdir=`grep -w "$sim" $runstxt | awk ' { print $2 } '` |
---|
| 122 | |
---|
| 123 | echo simdir $simdir |
---|
| 124 | |
---|
| 125 | if [ ! -d $simdir/ATM/Analyse/SE ] ; then |
---|
| 126 | mkdir -p $simdir/ATM/Analyse/SE |
---|
| 127 | fi |
---|
| 128 | |
---|
| 129 | if [ -f $file -a ! -f $simdir/ATM/Analyse/SE/$file ] ; then |
---|
| 130 | chmod +x $file |
---|
| 131 | var=`ncdump -h $file | \\ |
---|
| 132 | grep float | sed -e 's/(/ /' -e 's/float.//' -e '/OD550_STRAT/d' | \\ |
---|
| 133 | awk ' BEGIN{ liste="" } { liste=liste","$1 } END { print liste } '` |
---|
| 134 | echo $var |
---|
| 135 | cdo selvar,$var $file $simdir/ATM/Analyse/SE/$file |
---|
| 136 | # \rm -r $file |
---|
| 137 | else |
---|
| 138 | echo $file not found |
---|
| 139 | fi |
---|
| 140 | |
---|
| 141 | done |
---|