Changeset 4308


Ignore:
Timestamp:
Oct 26, 2022, 1:09:34 PM (19 months ago)
Author:
musat
Message:

Suite de la fusion entre la version commune (compte fabric) et la version perso
IonelaMusat?

Location:
BOL/Multi_atlas/Utils
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • BOL/Multi_atlas/Utils/atlas0.sh

    r3915 r4308  
    1 # Definitions en fonction de la machine
    2 # CICLAD
    3 hostname=`hostname`
    4 if [ ${hostname:0:5} = cicla ] ; then
    5 ########################################################################################################
     1###########################################################################
    62# Environnement
    7 module purge
    8 module load netcdf4/4.3.3.1-ifort cdo/1.6.8 nco/4.5.2  ncl/6.3.0
    9 ulimit -s unlimited
    10 export PYTHONPATH=:/opt/canopy-1.3.0/Canopy_64bit/User/bin/python:/home/igcmg/prodiguer-client:/home/fabric/users/denvil/climaf:/home/fabric/users/denvil/climaf
    11 export PATH=$PATH:/home/fabric/users/denvil/climaf/bin
    12 STORAGE=$DODSDIR/$login/lmdz/STORE
    13 if [ ! -d $DODSDIR/$login/climafCache ] ; then mkdir -p $DODSDIR/$login/climafCache ; fi
    14 export CLIMAF_CACHE=$DODSDIR/$login/climafCache
    15 echo CLIMAF_CACHE $DODSDIR/$login/climafCache
    16 MULTIDIR=$DODSDIR/$login/lmdz/MultiSimu
    17 DIRATLAS=$DODSDIR/$login/lmdz/atlas
    18 ########################################################################################################
    19 ATLAS_DIR=$DODSDIR/$login/lmdz/atlas/Atlas$$
    20 if [ ! -d $DODSDIR/$login/lmdz/atlas/Atlas$$ ] ; then mkdir -p $DODSDIR/$login/lmdz/atlas/Atlas$$ ; fi
    21 fi
    223local=`pwd -P`
    234
    24 date
     5module list
     6which python
     7ulimit -s unlimited
     8ATLAS_DIR=${DODSDIR}/${login}/lmdz/atlas/Atlas$$ ; mkdir -p $ATLAS_DIR
     9STORAGE=${DODSDIR}/${login}/lmdz/STORE
     10dirpng=${DODSDIR}/${login}/lmdz/VLR
    2511
     12export PYTHONPATH=$PYTHONPATH:/home/fabric/users/denvil/climaf
     13export PATH=$PATH:/home/fabric/users/denvil/climaf/bin
     14
     15\rm -rf $DODSDIR/$login/climafCache$$
     16mkdir -p $DODSDIR/$login/climafCache$$
     17export CLIMAF_CACHE=$DODSDIR/$login/climafCache$$
     18echo CLIMAF_CACHE $DODSDIR/$login/climafCache$$
     19###########################################################################
    2620vars=""
    2721vars="sst"
    28 #runstxt=$local/../runs.txt
     22#runstxt=/home/fabric/LMDZ/multi/runs.txt
    2923
    3024if [ $# = 1 ] ; then
     
    4135       if [ "$key" = "OUTDIR" ] ; then OUT_D=$val ; fi
    4236       if [ "$key" = "RUNSTXT" ] ; then runstxt=$val ; fi
    43        if [ "$key" = "VARS" ] ; then vars="`echo $val | sed -e 's/+/,/g'`" ; fi
     37       if [ "$key" = "VARS" ] ; then vars="`echo $val | sed -e 's/+/ /g'`" ; fi
     38       if [ "$key" = "lonmin" ] ; then lonmin=$val ; fi
     39       if [ "$key" = "lonmax" ] ; then lonmax=$val ; fi
     40       if [ "$key" = "latmin" ] ; then latmin=$val ; fi
     41       if [ "$key" = "latmax" ] ; then latmax=$val ; fi
     42       if [ "$key" = "pmin" ] ; then pmin=$val ; fi
    4443   done
    4544elif [ $# = 0 ] ; then
     
    5049   OUT_D=$OUTDIR
    5150   runstxt=$RUNSTXT
    52    vars=`echo $VARS | sed -e 's/+/,/g'`
     51   vars=`echo $VARS | sed -e 's/+/ /g'`
     52   lonmin=$lonmin
     53   lonmax=$lonmax
     54   latmin=$latmin
     55   latmax=$latmax
     56   pmin=$pmin
     57   echo lonmin=$lonmin lonmax=$lonmax
     58   echo latmin=$latmin latmax=$latmax
     59   echo pmin=$pmin
    5360else
    5461  echo USE
    5562  echo Job mode :
    56   echo $submit -v RUN=NPv5.3_1982_1989,SEASON=YEAR,PROJ=GLOB,OUTDIR=$MULTIDIR/V5/ATLAS,VARS=pr+tas atlas.sh
     63  echo qsub -v RUN=NPv5.3_1982_1989,SEASON=YEAR,PROJ=GLOB,OUTDIR=$MULTIDIR/V5/ATLAS,VARS=pr+tas atlas.sh
    5764  echo interactif :
    5865  echo ./atlas.sh RUN=NPv5.3_1982_1989,SEASON=YEAR,PROJ=GLOB,OUTDIR=$MULTIDIR/V5/ATLAS,VARS=pr+tas
     
    6168
    6269if [ "$vars" = "" ] ; then
    63    vars=pr,tas,hurs,hfls,hfss,albt,albtcs,albs,rldscs,rlds,rlus,rsdscs,rsds,rsuscs,rsus,rsutcs,rsut,rlut,rlutcs,psl,prw,sst,pme,tasmax,tasmin
     70   vars="pr tas hurs hfls hfss albt albtcs albs rldscs rlds rlus rsdscs rsds rsuscs rsus rsutcs rsut rlut rlutcs psl prw sst pme tasmax tasmin"
    6471fi
    6572
    66 #,ua850,va850,ta850,ua500,va500,ta500,ua200,va200,ta200
     73if [ "$sim" != "OBS" ]; then
    6774echo sim $sim
    6875srun=`echo $sim | sed -e 's/_[0-9][0-9][0-9][0-9]_[0-9][0-9][0-9][0-9]//'`
    6976echo srun $srun
    70 simdir=`grep -w "^$srun" $runstxt | awk ' { print $2 } '`
     77simdir=`grep -w "^$srun " $runstxt | awk ' { print $2 } '`
    7178run=`basename $simdir `
    7279years=`echo $sim | sed -e 's/'$srun'//' | sed -e 's/_//'`
    7380sim=${run}_${years}
     81
    7482echo $run $years $sim $ref
    7583echo ENTREES : $run, $years, $seas, $vars, $ref
     
    7987echo sim $sim
    8088echo simdir $simdir
     89fi
    8190
    8291keys_strgv=$sim$seas$proj$vars$ref
     
    98107echo sim $sim seas $seas > atlas.sh.log
    99108
    100 ###########################################################################
    101 # Boucle pour construire l'atlas en plusieurs passages
    102 echo IL FAUT FAIRE L ATLAS EN PLUSIEURS PASSAGE SINON CA PLANTE ...
    103 ###########################################################################
    104 
    105109case "$proj" in
    106110   "SH"|"NH") pyatlas="atlas_SH.py --projection $proj" ;;
    107111   "GLOB") Var3D=,ua,va,ta,hus,hur ; pyatlas=atlas_none.py ;;
     112   *) Var3D=,ua,va,ta,hus,hur ; pyatlas=atlas_none.py ;;
    108113esac
    109114
    110 
    111 npass=1
    112 ipass=1
    113 
    114 while [ $ipass -le $npass ] ; do
    115 
    116    echo Nettoyage des fichiers corrompus du cache
    117    $local/clean_cache.sh $DIRATLAS
    118    echo passage $ipass >> atlas.sh.log
    119115   html=index_example_"$seas"_"$sim".html
    120116   htmlopt=index_"${proj}"_"$seas"_"$sim".html
    121    rm -f $html
     117   echo rm -f $htmlopt
     118#
     119   for var in $vars; do
     120   datevar=`date`
     121   echo Creation repertoires *MAP* et check variables 3D
     122   mkdir -p ${dirpng}/${seas}/${sim}/MAP
     123   mkdir -p ${dirpng}/${seas}/${sim}/MAP/${proj}
     124#
     125   mkdir -p ${dirpng}/${seas}/${ref}/MAP
     126   mkdir -p ${dirpng}/${seas}/${ref}/MAP/${proj}
     127#
     128   mkdir -p ${dirpng}/${seas}/${sim}/DMAP_${ref}
     129   mkdir -p ${dirpng}/${seas}/${sim}/DMAP_${ref}/${proj}
    122130
    123    INDIR=$simdir/ATM/Analyse/SE
    124    file=${INDIR}/`basename $simdir`_SE_$years_1M_histmth.nc
    125    if [ ! -f ${file} ]; then
    126       echo PB fichier $file inexistant
    127       INDIR=$DODSDIR/$login/lmdz/SE/ORIG
    128       file=$INDIR/`basename $simdir`_SE_$years_1M_histmth.nc
    129    fi
     131   mapok=${dirpng}/${seas}/${sim}/MAP/${proj}/${var}.pdf
     132   dmapok=${dirpng}/${seas}/${sim}/DMAP_${ref}/${proj}/${var}.pdf
     133#
     134    datevar=`date`
     135#
     136# for var3D check if pres exist
     137#   echo ~/LMDZ/check/make_check_var3D_SE.sh $dirpng $seas $sim $ref $var
     138#   ~/LMDZ/check/make_check_var3D_SE.sh $dirpng $seas $sim $ref $var > out_check_var3D_SE.log
    130139
    131    #echo python $local/$pyatlas -v $vars -s `basename $simdir`_$years -t $ref -p $seas --root $INDIR
    132    #python $local/$pyatlas -v $vars -s `basename $simdir`_$years -t $ref -p $seas --root $INDIR
    133    echo python $local/$pyatlas -v $vars -s `basename $simdir`_$years -t $ref -p $seas
    134    python $local/$pyatlas -v $vars -s `basename $simdir`_$years -t $ref -p $seas
     140 if [ "$var" == "ua" ] || [ "$var" == "va" ] || [ "$var" == "ta" ] || [ "$var" == "hur" ] || [ "$var" == "hus" ]; then
     141    echo python ${local}/$pyatlas -v $var -s $sim -t $ref -p $seas -r $proj --dirpng ${dirpng}
     142    python ${local}/$pyatlas -v $var -s $sim -t $ref -p $seas -r $proj --dirpng ${dirpng}
     143 else
     144    echo python ${local}/$pyatlas -v $var -s $sim -t $ref -p $seas -r $proj --dirpng ${dirpng} --lonmin ${lonmin} --lonmax ${lonmax} --latmin ${latmin} --latmax ${latmax}
     145    python ${local}/$pyatlas -v $var -s $sim -t $ref -p $seas -r $proj --dirpng ${dirpng} --lonmin ${lonmin} --lonmax ${lonmax} --latmin ${latmin} --latmax ${latmax}
     146 fi
     147#
     148   echo Creation graphes png
     149   ~/LMDZ/atlas/make_pdf2png.sh $dirpng $seas $proj $sim $ref $var > out_pdf2png.log
     150#
     151   done
    135152
    136    #if [ ! -f "$html"  -o "`wc -l $html | awk ' { print $1 } '`" = "0" ] ; then
    137153   if [ ! -f "$htmlopt"  -o "`wc -l $htmlopt | awk ' { print $1 } '`" = "0" ] ; then
    138154      echo ECHEC ATLAS : $htmlopt inexistant ou vide | tee >>  atlas.sh.log
    139155      echo ECHEC ATLAS : $htmlopt inexistant ou vide
    140156   else
    141       #echo cp -f $html tmp$$.$passage
    142       #cp -f $html tmp$$.$passage
    143157      pwd
    144       #echo tmp$$.$passage
    145       #echo LS  LS
    146       #ls -lrt | tail
    147 # A ADAPTER en fonction de la machine
    148       #sed -e "s:/modfs/ipslfs/dods/:/thredds/fileServer/IPSLFS/:g" tmp$$.$passage >| $htmlopt
    149158      \cp -f $htmlopt $OUT_D/
    150       sed -i -e "s:thredds\/ipsl:thredds\/fileServer\/IPSLFS:g" $OUT_D/$htmlopt
    151       #PathHtml=`echo $OUT_D/$htmlopt | sed -e 's:/modfs/ipslfs/dods/:http\://vesg.ipsl.upmc.fr/thredds/fileServer/IPSLFS/:'`
     159      sed -i -e "s:thredds\/IPSLFS:thredds\/fileServer\/ipsl_thredds:g" $OUT_D/$htmlopt
     160
    152161      echo NOUVEL ATLAS DISPONIBLE SUR $PathHtml | tee >>  atlas.sh.log
    153162      echo NOUVEL ATLAS DISPONIBLE SUR $PathHtml
    154       #echo $keys_strgv >> $OUT_D/atlas_OK
    155       #echo ${sim}+${seas}+${proj}+$vars >> $OUT_D/atlas_OK
    156163   fi
    157    (( ipass = $ipass + 1 ))
    158 
    159 done
    160164
    161165\rm -f $OUT_D/$keys_strg.ENCOURS
     166
     167\rm -rf $DODSDIR/$login/climafCache$$
  • BOL/Multi_atlas/Utils/lmdz_SE0.py

    r3743 r4308  
    3232# Saisons gérées et leur traduction CDO
    3333#########################################################################################
    34 seasons={ 'YEAR':"", 'DJF' : "-timavg -selmon,1,2,12", 'JJA' : "-timavg -selmon,6,7,8" , 'JJAS' : "-timavg -selmon,6,7,8,9" }
    3534#seasons={ 'YEAR':"", 'DJF' : " selmon,1,2,12", 'JJA' : " selmon,6,7,8" , 'JJAS' : "-timavg -selmon,6,7,8,9" }
    36 
     35#seasons={ 'YEAR':"", 'DJF' : "-timavg -selmon,1,2,12", 'JJA' : "-timavg -selmon,6,7,8" , 'JJAS' : "-timavg -selmon,6,7,8,9" }
     36seasons={ 'YEAR':"", 'DJF' : "-timavg -selmon,1,2,12", 'JJA' : "-timavg -selmon,6,7,8" , 'JJAS' : "-timavg -selmon,6,7,8,9", 'MAM' : "-timavg -selmon,3,4,5", 'SON' : "-timavg -selmon,9,10,11" }
    3737
    3838
     
    101101derive('OBS','dtr','minus','tasmax','tasmin')
    102102
     103calias('OBS', 'hflsevap', 'hfls', scale=1./2.5e6)
    103104
    104105#########################################################################################
     
    164165calias('SE','hur','rhum', scale=100.)
    165166calias('SE','clt','cldt', scale=100.)
    166 calias('SE','cltcalipso', scale=100.)
    167 calias('SE','clhcalipso', scale=100.)
    168 calias('SE','clmcalipso', scale=100.)
    169 calias('SE','cllcalipso', scale=100.)
     167calias('SE','cltcalipso','cltcalipso', scale=100.)
     168calias('SE','clhcalipso','clhcalipso', scale=100.)
     169calias('SE','clmcalipso','clmcalipso', scale=100.)
     170calias('SE','cllcalipso','cllcalipso', scale=100.)
    170171
    171172# Variables dérivées
  • BOL/Multi_atlas/Utils/multi.sh

    r3917 r4308  
    1414html=1
    1515atlas=1
    16 newatlas=1
     16#newatlas=0
    1717atlas_cesmep=0
    1818get=0
     
    2424axe4=0
    2525esmval2=0
    26 refld_histo=0
     26reflcld_histo=0
    2727vertcld_calipso=0
    2828stations_day=0
    2929stations_mth=0
    30 qsub=0
     30qsub=1
    3131mjo=0
    3232river=0
     
    3535ref=OBS
    3636echo $ref
     37
     38lonmin=-180
     39lonmax=180
     40latmin=-90
     41latmax=90
     42pmin=1
     43
    3744# ./job_multi.sh -1D 0 -get 0 -atlas 0 -pcmdi 0 -tuning 0 -lma 0 -trmm 0
    3845runstxt=$local/runs.txt
     
    5764      -stations_day) stations_day=$2 ; shift ;;
    5865      -stations_mth) stations_mth=$2 ; shift ;;
    59       -refld_histo) refld_histo=$2 ; shift ;;
     66      -reflcld_histo) refld_histo=$2 ; shift ;;
    6067      -vertcld_calipso) vertcld_calipso=$2 ; shift ;;
    6168      -mjo) mjo=$2 ; shift ;;
    6269      -river) river=$2 ; shift ;;
    6370      -dataref) dataref=$2 ; shift ;;
     71      -lonmin) lonmin=$2 ; shift ;;
     72      -lonmax) lonmax=$2 ; shift ;;
     73      -latmin) latmin=$2 ; shift ;;
     74      -latmax) latmax=$2 ; shift ;;
     75      -pmin) pmin=$2 ; shift ;;
    6476      *) comp=$1 ;;
    6577   esac
     
    6779done
    6880
     81echo multi=$comp region: lonmin=$lonmin lonmax=$lonmax latmin=$latmin latmax=$latmax
     82echo multi=$comp pmin: pmin=$pmin
    6983rm -f out.com$$
    7084runstxt=$local/runs.txt
     
    8498COMP_D=$MULTIDIR/$comp
    8599DEF_FILE=$COMP_D/def.txt ; if [ ! -f $DEF_FILE ] ; then echo renseigner $DEF_FILE ; exit ; fi
     100LOGD=$COMP_D/log ; mkdir -p $LOGD
     101outfile=$LOGD/out$$ ; if [ -f ${outfile} ] ; then \rm -f $outfile ; fi
     102echo Ecriture des logs dans $outfile
     103
     104###
     105#~/LMDZ/check/make_warning.sh $COMP_D
     106### nom2
     107listsims=""  ; for s  in `awk ' {print $1} ' $DEF_FILE | uniq`          ; do listsims="$listsims $s"    ; done
     108#echo listsims $listsims
    86109
    87110listsims=""  ; for s  in `awk ' {print $1} ' $DEF_FILE | uniq`          ; do listsims="$listsims $s"    ; done
    88111echo listsims $listsims
     112### nom1, simdir
     113for s in $listsims ; do
     114### simdir
     115simdir=`grep -w "^$s "  $runstxt | awk ' { print $2 } '`
     116### nom1
     117ss=`basename $simdir `
     118for year in `grep -w "^$s" $DEF_FILE | awk ' { print $2 } '` ; do
     119#file=${MAIN_SE}/ORIG/${s}_SE_${year}_1M_histmth.nc
     120file=${MAIN_SE}/ORIG/${ss}_SE_${year}_1M_histmth.nc
     121
     122echo $file $year
     123
     124if [ ! -f ${file} ]; then
     125 if [ -f ${simdir}/ATM/Analyse/SE/${ss}_SE_${year}_1M_histmth.nc ]; then
     126  ln -s ${simdir}/ATM/Analyse/SE/${ss}_SE_${year}_1M_histmth.nc $file
     127 elif [ "${ss}" == "UQLMDZ6A1000" ]; then
     128  echo NO need to ln -s; the *1M_histmth.nc does not exist anymore
     129 else
     130  ln -s ${simdir}/ATM/Output/MO/${ss}_${year}0101_${year}1230_1M_histmth.nc $file
     131 fi
     132fi
     133
     134\rm ${MAIN_SE}/ORIG/UQLMDZ6AW1000_SE_1979_1988_1M_histmth.nc
     135done
     136done
     137#${local}/../check/mk_check-avail-data.sh ${comp}
    89138
    90139echo ### On supprime dans def.txt les lignes vides ########
     
    96145srun=`grep -w "^$s "  $runstxt | awk ' { print $1 } '`
    97146echo 's='"$s" '    srun='  "$srun"
    98 if [ "$s" = "$srun" ] ; then
    99    echo Meme nom de la simulation dans def.txt et $runstxt 's=' "$s" '    srun='  "$srun"
    100 else
    101    echo ATTENTION : la simulation "$s" de votre def.txt n est pas repertoriee dans $runstxt
    102    echo             ou le meme nom est attribue a plusieures simulations
    103    echo Il faut la rajouter dans $runstxt
    104    echo avec le chemin vers les SE et TS dans ciclad : /modfs/$login/IGCM_OUT
    105    echo             ou renomer votre simulation
     147if [ "$s" != "$srun" ] ; then
     148   #echo Meme nom de la simulation dans def.txt et $runstxt 's=' "$s" '    srun='  "$srun"
     149#else
     150   echo ATTENTION : la simulation "$s" de votre def.txt n est pas repertoriee dans $runstxt >${LOGD}/error_${comp}
     151   echo             ou le meme nom est attribue a plusieures simulations >> ${LOGD}/error_${comp}
     152   echo Il faut la rajouter dans $runstxt >> ${LOGD}/error_${comp}
     153   echo avec le chemin vers les SE et TS dans ciclad : /thredds/ipsl/fabric/IGCM_OUT >> ${LOGD}/error_${comp}
     154   echo             ou renomer votre simulation >> ${LOGD}/error_${comp}
     155   more ${LOGD}/error_${comp}
    106156exit
     157fi
     158echo Checking if $s simulation is referenced many times in runs.txt
     159#nrun=`./how_many_times_run.sh $s`
     160#nrun=`./how_many_times_run.sh $srun`
     161nrun=1
     162
     163if [ "$nrun" != "1" ]; then
     164 echo Simulation $s est repertoriee ${nrun} fois dans $runstxt >> ${LOGD}/error_${comp}
     165 echo STOPping here >> ${LOGD}/error_${comp}
     166 more ${LOGD}/error_${comp}
     167 exit
    107168fi
    108169done
     
    124185done
    125186done
    126 echo listruns = $listruns
    127 echo listrunss= $listrunss
    128 echo listrune= $listrune
    129 echo ================================================================
    130 echo la commande suivante
    131 echo ls -lrt $MAIN_SE/ORIG
    132 echo peut prendre beaucoup de temps lorsque
    133 echo l acces aux espaces du CCRT et/ou de l IDRIS thredds est lent ou si
    134 echo les espaces /thredds/tgcc et/ou /thredds/idris ne sont pas montes sur ciclad.
    135 echo On ne l utilise plus !!!
    136 echo ================================================================
    137 ###ls -lrt $MAIN_SE/ORIG
     187#echo listruns = $listruns
     188#echo listrunss= $listrunss
     189#echo listrune= $listrune
     190#ls -lrt $MAIN_SE/ORIG # Eviter de laisser des ls qui rendent la sortire illisible FH
     191#listsimss="" ; for ss in `awk ' {print $1"_"$2 } ' $DEF_FILE`    ; do listsimss="$listsimss $ss" ; done
    138192
    139193ns=0
     
    172226
    173227if [ $get = 1 ] ; then
    174  cd $MAIN_SE
    175  for sim in $listsimss ; do echo ./getun.sh ${sim} >> $local/out.com$$ ; ./getun.sh ${sim} ; done
    176  cd $TS_DA ; pwd
    177  for sim in $listsimss ; do echo ./getun.sh ${sim} >> $local/out.com$$ ; ./getun.sh ${sim} ; done
    178  cd $TS_MO ; pwd
    179  for sim in $listsimss ; do echo ./getun.sh ${sim} >> $local/out.com$$ ; ./getun.sh ${sim} ; done
    180 fi
     228
     229cd $MAIN_SE
     230for sim in $listsimss ; do echo ./getun.sh ${sim} >> $outfile 2>&1 ; ./getun.sh ${sim} ; done
     231cd $TS_DA
     232for sim in $listsimss ; do echo ./getun.sh ${sim} >> $outfile 2>&1 ; ./getun.sh ${sim} ; done
     233cd $TS_MO
     234for sim in $listsimss ; do echo ./getun.sh ${sim} >> $outfile 2>&1 ; ./getun.sh ${sim} ; done
     235
     236fi
     237
     238echo '########################################################################'
     239echo  1.1/ Check des fichiers input et des variables demandees pour l atlas avec
     240echo       des exit si un des fichiers ou des variables ne sont pas accessibles
     241echo '########################################################################'
     242#IM TBC ${local}/../check/make_check_fin.sh $comp ${LOGD}/check_finput$$ 2>&1
    181243
    182244if [ $cmor = 1 ] ; then
     
    190252#########################################################################
    191253# Deux lignes suivantes modif FH 2016/11/09
    192 # Files are taken from /modfs/ipslfs/dods/fabric/lmdz/SE/ORIG and
    193 # results are in /modfs/ipslfs/dods/fabric/lmdz/SE/CMOR
     254# Files are taken from /thredds/ipsl/fabric/lmdz/SE/ORIG and
     255# results are in /thredds/ipsl/fabric/lmdz/SE/CMOR
    194256#########################################################################
    195  ./cmor.sh -runsfile $runstxt $comp
     257
     258echo cmor.sh : output dans ${LOGD}/cmor$$
     259./cmor.sh -runsfile $runstxt $comp > ${LOGD}/cmor$$ 2>&1
    196260if [ $? != 0 ] ; then exit ; fi # Probleme de histmth non present. On arrete tout
    197261
     
    201265#     average in time "YEAR", "JJA" ...
    202266#     Results are put on
    203 #     /modfs/ipslfs/dods/fabric/lmdz/VLR/YEAR/[SIMU_NAME]_[period]/NC
     267#     /thredds/ipsl/fabric/lmdz/VLR/YEAR/[SIMU_NAME]_[period]/NC
    204268#     If wanting to rerun season.sh for observations :
    205269#     ./season.sh -s OBS
    206270#########################################################################
    207  ./season.sh -comp $comp
    208  cd $local
     271
     272cd $MAIN_SE
     273echo season.sh : output dans ${LOGD}/season$$
     274./season.sh -comp $comp > ${LOGD}/season$$ 2>&1
     275cd $local
     276
    209277fi
    210278
     
    216284
    217285if [ $atlas = 1 ] ; then
    218 if [ $newatlas = 1 ]; then
    219 sed -e 's/COMPAR/'${comp}'/' ${local}/atlas/make_atlas.sh > ${local}/atlas/make_atlas_${comp}.sh
    220 $submit -v COMP=${comp},DATAREF=${dataref} ${local}/atlas/make_atlas_${comp}.sh
    221 
    222 ./make_timecount.sh ${comp}
    223 
    224 else
     286#if [ $newatlas = 1 ]; then
     287#sed -e 's/COMPAR/'${comp}'/' ${local}/atlas/make_atlas.sh > ${local}/atlas/make_atlas_${comp}.sh
     288#$submit -v COMP=${comp},DATAREF=${dataref} ${local}/atlas/make_atlas_${comp}.sh
     289
     290#./make_timecount.sh ${comp}
     291
     292#else
    225293
    226294for sim in $listsimss ; do
     
    237305      vars=`echo $line | awk ' { print $3 } '`
    238306      atlas=${sim}+${seas}+${proj}+$vars
    239       echo AAAAAAAAAAAAAAAAAAAAAAAA $atlas
    240       #grep $atlas $COMP_D/ATLAS/atlas_OK
    241       echo BBBBBB
    242       #if [ "`grep $atlas $COMP_D/ATLAS/atlas_OK`" = "" ] ; then
    243          cd $local/atlas ; pwd ; ls -l atlas.sh
    244          varg=`echo $vars | sed -e 's/,/+/g'`
    245          echo Atlas $atlas a creer
    246          if [ $qsub = 0 ] ; then
    247             ./atlas.sh RUN=$sim,SEASON=$seas,PROJ=$proj,OUTDIR=$COMP_D/ATLAS,REF=$ref,VARS="$varg",RUNSTXT=$runstxt
    248          else
    249             $submit -v RUN=$sim,SEASON=$seas,PROJ=$proj,OUTDIR=$COMP_D/ATLAS,REF=$ref,VARS="$varg",RUNSTXT=$runstxt atlas.sh
     307      cd ${local}/atlas
     308      varg=`echo $vars | sed -e 's/,/+/g'`
     309      echo Atlas $atlas a creer
     310      if [ $qsub = 0 ] ; then
     311         ${local}/atlas/atlas.sh RUN=$sim,SEASON=$seas,PROJ=$proj,OUTDIR=$COMP_D/ATLAS,REF=$ref,VARS="$varg",RUNSTXT=$runstxt,lonmin=$lonmin,lonmax=$lonmax,latmin=$latmin,latmax=$latmax,pmin=$pmin >> $outfile
     312      else
     313         echo $submit -v RUN=$sim,SEASON=$seas,PROJ=$proj,OUTDIR=$COMP_D/ATLAS,REF=$ref,VARS="$varg",RUNSTXT=$runstxt,lonmin=$lonmin,lonmax=$lonmax,latmin=$latmin,latmax=$latmax,pmin=$pmin atlas.sh >> ${LOGD}/ATLAS$$ 2>&1
     314         $submit -v RUN=$sim,SEASON=$seas,PROJ=$proj,OUTDIR=$COMP_D/ATLAS,REF=$ref,VARS="$varg",RUNSTXT=$runstxt,lonmin=$lonmin,lonmax=$lonmax,latmin=$latmin,latmax=$latmax,pmin=$pmin atlas.sh
     315         if [ "$ref" != "OBS" ]; then
     316            echo $submit -v RUN=$sim,SEASON=$seas,PROJ=$proj,OUTDIR=$COMP_D/ATLAS,REF=OBS,VARS="$varg",RUNSTXT=$runstxt,lonmin=$lonmin,lonmax=$lonmax,latmin=$latmin,latmax=$latmax,pmin=$pmin atlas.sh >> ${LOGD}/ATLAS$$ 2>&1
     317            $submit -v RUN=$sim,SEASON=$seas,PROJ=$proj,OUTDIR=$COMP_D/ATLAS,REF=OBS,VARS="$varg",RUNSTXT=$runstxt,lonmin=$lonmin,lonmax=$lonmax,latmin=$latmin,latmax=$latmax,pmin=$pmin atlas.sh
    250318         fi
    251          echo $submit -v RUN=$sim,SEASON=$seas,PROJ=$proj,OUTDIR=$COMP_D/ATLAS,REF=$ref,VARS="$varg" atlas.sh >> out.com$$
    252          echo $submit -v RUN=$sim,SEASON=$seas,PROJ=$proj,OUTDIR=$COMP_D/ATLAS,REF=$ref,VARS="$varg" atlas.sh
    253          (( count_atlas = $count_atlas + 1 ))
     319      fi
     320      (( count_atlas = $count_atlas + 1 ))
    254321      (( il = $il + 1 ))
    255322   done
     
    263330fi
    264331
    265 fi #newatlas
     332#fi #newatlas
    266333fi #atlas
    267334
    268335# atlas_cesmep : cles pour activer les nouveau atlas (C-ESM-EP)
     336# AI avril 2020 : Passage a la version v2 de C-ESM-EP
     337# FH Juin 2022 : Passage a la version v3 de C-ESM-EP (changement de prodigfs en thredds)
    269338if [ $atlas_cesmep = 1 ] ; then
    270339   cd ~/LMDZ/C-ESM-EP
    271    ./AtlasLMDZ.sh -runsfile $runstxt $comp
     340   ./AtlasLMDZ.sh -runsfile $runstxt $comp >> ${LOGD}/CESMEP$$ 2>&1
    272341fi # atlas_cesmep
    273342
    274343echo '########################################################################'
    275344echo  3/ Calcul des moyennes zonales nco
    276 echo '########################################################################'
     345echo '#####################################################################'
    277346
    278347
     
    282351   mkdir -p $COMP_D/ZON
    283352   for sim in $listsimse OBS ; do
     353      echo make_MOY for simulation $sim, log in ${LOGD}/MOY$$
    284354      years=`echo $sim | sed -e 's/_SE_/ /' | awk ' { print $2 } '`
    285355      run=`echo $sim | sed -e 's/_SE_/ /' | awk ' { print $1 } '`
    286       ./make_MOY.sh "$years" YEAR "$run" GLOB
    287       ./make_MOY.sh "$years" YEAR "$run" ZON
    288       ./make_MOY.sh "$years" JJA "$run"  ZON
    289       ./make_MOY.sh "$years" DJF "$run"  ZON
    290       ./make_MOY.sh "$years" JJAS "$run" AMMACROSS
     356      ./make_MOY.sh "$years" YEAR "$run" GLOB      >> ${LOGD}/MOY$$ 2>&1
     357      ./make_MOY.sh "$years" YEAR "$run" ZON       >> ${LOGD}/MOY$$ 2>&1
     358      ./make_MOY.sh "$years" JJA "$run"  ZON       >> ${LOGD}/MOY$$ 2>&1
     359      ./make_MOY.sh "$years" DJF "$run"  ZON       >> ${LOGD}/MOY$$ 2>&1
     360      ./make_MOY.sh "$years" JJAS "$run" AMMACROSS >> ${LOGD}/MOY$$ 2>&1
     361      ./make_MOY.sh "$years" MAM "$run"  ZON       >> ${LOGD}/MOY$$ 2>&1
     362      ./make_MOY.sh "$years" SON "$run"  ZON       >> ${LOGD}/MOY$$ 2>&1
    291363   done
    292364   cd $local
    293365### ajout nuages LMDZ dans la compa et doit faire des liens symbol. sur
    294366#### les OBS calipso toujurs pour le moment
    295    ./mk_clouds_NOcalipso.sh YEAR ZON
    296    ./mk_clouds_NOcalipso.sh DJF ZON
    297    ./mk_clouds_NOcalipso.sh JJA ZON
    298    ./mk_clouds_NOcalipso.sh JJAS AMMACROSS
    299 #
    300    pwd
    301    ./multi_ZONE.sh YEAR $comp ZON -runsfile $runstxt
    302    ./multi_ZONE.sh JJA $comp ZON -runsfile $runstxt
    303    ./multi_ZONE.sh DJF $comp ZON -runsfile $runstxt
    304    ./multi_ZONE.sh JJAS $comp AMMACROSS -runsfile $runstxt
    305 
    306 fi
    307 
    308 echo '########################################################################'
    309 echo 4/ Lancement du 1D si necessaire
    310 echo '########################################################################'
     367   echo mk_clouds_NOcalipso.sh, log in  ${LOGD}/calipso$$
     368   ./mk_clouds_NOcalipso.sh YEAR ZON       >> ${LOGD}/calipso$$ 2>&1
     369   ./mk_clouds_NOcalipso.sh DJF ZON        >> ${LOGD}/calipso$$ 2>&1
     370   ./mk_clouds_NOcalipso.sh JJA ZON        >> ${LOGD}/calipso$$ 2>&1
     371   ./mk_clouds_NOcalipso.sh JJAS AMMACROSS >> ${LOGD}/calipso$$ 2>&1
     372   ./mk_clouds_NOcalipso.sh MAM ZON        >> ${LOGD}/calipso$$ 2>&1
     373   ./mk_clouds_NOcalipso.sh SON ZON        >> ${LOGD}/calipso$$ 2>&1
     374
     375   echo multi_ZONE.sh, log in ${LOGD}/Z$$
     376   ./multi_ZONE.sh YEAR $comp ZON -runsfile $runstxt >> ${LOGD}/Z$$ 2>&1
     377   ./multi_ZONE.sh JJA $comp ZON -runsfile $runstxt  >> ${LOGD}/Z$$ 2>&1
     378   ./multi_ZONE.sh DJF $comp ZON -runsfile $runstxt  >> ${LOGD}/Z$$ 2>&1
     379   ./multi_ZONE.sh JJAS $comp AMMACROSS -runsfile $runstxt >> ${LOGD}/Z$$ 2>&1
     380   ./multi_ZONE.sh MAM $comp ZON -runsfile $runstxt  >> ${LOGD}/Z$$ 2>&1
     381   ./multi_ZONE.sh SON $comp ZON -runsfile $runstxt  >> ${LOGD}/Z$$ 2>&1
     382fi
     383
    311384if [ ! -f $COMP_D/1D/1D.html -a $und = 1  ] ; then
     385echo '#####################################################################'
     386echo 4/ Lancement du 1D
     387echo '#####################################################################'
    312388    cd $COMP_D
    313     ~/LMDZ/1D/serie1d.sh $comp
     389    echo log in ${LOGD}/1D$$
     390    ~/LMDZ/1D/serie1d.sh $comp  > ${LOGD}/1D$$ 2>&1
    314391    cd $local
    315392fi
    316393
    317 echo '########################################################################'
    318 echo 5/ Métriques
    319 echo '########################################################################'
    320394if [ $tuning_metrics = 1 -a ! -d $COMP_D/METRICS ] ; then
    321    echo metrics.sh
     395echo '#####################################################################'
     396echo 5.1/ Metriques LMD : $tuning_metrics
     397echo '#####################################################################'
     398   echo metrics.sh, log in ${LOGD}/METRICS$$
    322399   cd $local/METRICS
    323    ./metrics.sh $comp
     400   #./metrics.sh -runsfile $runstxt $comp
     401   ./metrics.sh $comp > ${LOGD}/METRICS$$ 2>&1
     402fi
     403
     404if [ $pcmdi_metrics = 1 ] ; then
     405echo '#####################################################################'
     406echo 5.2/ Metriques PCMDI : $pcmdi_metrics
     407echo '#####################################################################'
     408cd $local
     409   ./make_pcmdi.sh $comp
    324410fi
    325411
    326412if [ $regdyn = 1 ]; then
     413echo '#####################################################################'
     414echo 6/ Sorting by dynamical regimes : $regdyn
     415echo '#####################################################################'
    327416   cd ~/users/musat/regdyn/clean_regdyn
    328    ./mk_all_regdyn.sh $comp 0
     417   ./mk_all_regdyn.sh $comp 0 > ${LOGD}/REGDYN$$ 2>&1
    329418   cd $local
    330419fi
    331420
    332421if [ $esmval2 = 1 ]; then
     422echo '#####################################################################'
     423echo 7/ ESMvalTool : $esmval2
     424echo '#####################################################################'
    333425   cd $local
    334426   ./cvdp4atlas.sh $comp
     
    337429
    338430if [ $mjo = 1 ]; then
     431echo '#####################################################################'
     432echo 8.1/ Rainfall variability / MJO diagnostics : $mjo
     433echo '#####################################################################'
    339434   cd ~/users/idelkadi/MJO
    340435   ./make_diagnosMJO.sh $comp
     
    347442
    348443if [ $lma = 1 ]; then
    349    cd $local
    350    ./make_lma.sh $comp
    351 fi
     444echo '#####################################################################'
     445echo 8.2/ Rainfall variability / LMA analysis of the MJO : $lma
     446echo '#####################################################################'
     447   #IM150722 cd $local
     448   #IM120722 ./make_lma.sh $comp
     449   cd ~/users/musat/d_AXE2_LMA/
     450   ./make_LMA.sh $comp >  ${LOGD}/LMA$$ 2>&1
     451   cd ${local}
     452fi
     453
    352454if [ $axe2 = 1 ]; then
    353    cd $local
    354    ./make_axe2.sh -runstxt $runstxt $comp
    355 fi
     455echo '#####################################################################'
     456echo 8.3/ Rainfall variability / metrics
     457echo '#####################################################################'
     458   cd $local
     459   bash  make_axe2.sh -runstxt $runstxt $comp    >  ${LOGD}/axe2_$$ 2>&1
     460   echo  make_axe2.sh -runstxt $runstxt $comp '-->' ${LOGD}/axe2_$$
     461fi
     462
    356463if [ $trmm = 1 ]; then
    357    cd ~/users/mbonaz/
     464echo '#####################################################################'
     465echo 8.4/ Rainfall variability / Marine Bonazzola : $trmm
     466echo '#####################################################################'
     467   cd ~/users/musat/atlas/d_AXE2
    358468   ./Axe2_Marine.sh $comp
    359469   cd $local
    360470fi
    361 cd $local
    362 if [ $pcmdi_metrics = 1 ] ; then
    363    ./make_pcmdi.sh $comp
    364 fi
     471
     472if [ $river = 1 ]; then
     473echo '#####################################################################'
     474echo 9/ River discharges
     475echo '#####################################################################'
     476   cd ~/users/idelkadi/AXE1/River
     477   ./make_diagnoRiver.sh $comp
     478fi 
     479
    365480if [ $axe4 = 1 ]; then
     481echo '#####################################################################'
     482echo 10/ Poles
     483echo '#####################################################################'
    366484  cd $local
    367485   ./make_axe4.sh $comp
     
    369487
    370488if [ "$reflcld_histo" = "1" ] ; then
    371    cd ~/users/idelkadi/AXE3/
     489echo '#####################################################################'
     490echo 11/ reflcld_histo : $reflcld_histo
     491echo '#####################################################################'
     492   cd ~/users/idelkadi/AXE3/CldReflCldFrac
    372493   ./make_scatReflCld.sh $comp
    373494   cd $local
     
    375496
    376497if [ $vertcld_calipso = 1 ] ; then
     498echo '#####################################################################'
     499echo 12/ Calipso : $vertcld_calipso
     500echo '#####################################################################'
    377501   cd ~/users/idelkadi/AXE3/Calipso/CoupeVerticale/DJF
    378502   ./make_VerticalMzCldCalipso.sh $comp
    379503   cd ~/users/idelkadi/AXE3/Calipso/CoupeVerticale/JJA
    380504   ./make_VerticalMzCldCalipso.sh $comp
     505   cd ~/users/idelkadi/AXE3/Calipso/CoupeVerticale/MAM
     506   ./make_VerticalMzCldCalipso.sh $comp
     507   cd ~/users/idelkadi/AXE3/Calipso/CoupeVerticale/SON
     508   ./make_VerticalMzCldCalipso.sh $comp
    381509   cd ~/users/idelkadi/AXE3/Calipso/Stratos
    382510   ./make_StratosCalipso.sh $comp
     
    384512
    385513
    386 echo '########################################################################'
    387 echo 6/ Stations
    388 echo '########################################################################'
    389 
    390514if [ $stations_day = 1 ] ; then
     515echo '#####################################################################'
     516echo 13/ Stations
     517echo '#####################################################################'
    391518   ~/users/Binta/bibi.sh $comp
    392519   ~/users/cheruy/bibi.sh $comp
     
    397524fi
    398525
    399 echo '########################################################################'
    400 echo 7/ generation des pages html
    401 echo '########################################################################'
    402 
    403526if [ $html = 1 ] ; then
    404    echo ./make_html_libigcm_ai.sh --comp $comp
    405    ./make_html_libigcm.sh --comp $comp
    406    cd $local
    407    ./html_entete.sh ${comp} ${dataref}
    408    ./make_index_html.sh ${comp} ${dataref}
    409    ./html_tuning.sh  $comp
    410    ./html_tuning_min.sh  $comp
    411    ./html_accueil.sh  $comp
    412    ./html_1D.sh  $comp
    413    ./html_lma.sh $comp
    414    ./html_pcmdi.sh $comp
     527echo '#####################################################################'
     528echo 14/ generation des pages html
     529echo '#####################################################################'
     530   cd ${local}
     531   echo ./make_html_libigcm.sh --comp $comp --runstxt $runstxt
     532   ./make_html_libigcm.sh --comp $comp --runstxt $runstxt > ${LOGD}/html$$ 2>&1
     533   echo log in ${LOGD}/html$$
     534   ./html_entete.sh $comp ${dataref} >> ${LOGD}/html$$ 2>&1
     535   cd ${local}/html
     536   ./make_index_html.sh ${comp} ${dataref} >> ${LOGD}/html$$ 2>&1
     537   cd $local
     538   ./html_tuning.sh  $comp           >> ${LOGD}/html$$ 2>&1
     539   ./html_tuning_min.sh  $comp       >> ${LOGD}/html$$ 2>&1
     540   ./html_accueil.sh  $comp          >> ${LOGD}/html$$ 2>&1
     541   ./html_1D.sh  $comp               >> ${LOGD}/html$$ 2>&1
     542   ./html_lma.sh $comp               >> ${LOGD}/html_LMA$$ 2>&1
     543   ./html_pcmdi.sh $comp             >> ${LOGD}/html$$ 2>&1
    415544   ./html_all.sh >| $MULTIDIR/all.html
    416545
     
    425554#   cat $COMP_D/metrics-CMIP5-AMIP-as-ref.html >> $COMP_D/PCMDI.html
    426555   for i in 1 2 3 4 5 6 7 ; do
    427         ./html_axe$i.sh  $comp
     556        ./html_axe$i.sh  $comp >> ${LOGD}/html$$ 2>&1
    428557   done
     558
     559   echo Multi atlas, log in ${LOGD}/multiatlas$$
     560#  for proj in GLOB SH NH ; do
     561#  for proj in ATLTN GLOB SH NH ; do
    429562   for proj in GLOB SH NH ; do
    430563   for bias in BIAS MAPS ; do
    431        for season in YEAR DJF JJA ; do
    432         echo ./multi_atlas.sh $comp $bias $season $proj $RUNS 
    433         ./multi_atlas.sh $comp $bias $season $proj $RUNS  >> out.com$$
     564       for season in YEAR DJF JJA MAM SON ; do
     565        ./multi_atlas.sh $comp $bias $season $proj $RUNS  >> ${LOGD}/multiatlas$$ 2>&1
    434566       done
    435567   done
     
    441573cd $local
    442574./webpage_multi.sh $comp
    443 
    444 fi
     575fi
     576
     577echo UN NOVEL MULTI ATLAS EST DISPONIBLE sur $COMP_D/ACCUEIL.html
Note: See TracChangeset for help on using the changeset viewer.