source: branches/libIGCM_CESMEP/AA_create_multi_se

Last change on this file was 1585, checked in by ssenesi, 12 months ago

merge branch libIGCM_CESMEP with trunk that handles RedHat8 on Irene

  • Property licence set to
    The following licence information concerns ONLY the libIGCM tools
    ==================================================================

    Copyright © Centre National de la Recherche Scientifique CNRS
    Commissariat à l'Énergie Atomique CEA

    libIGCM : Library for Portable Models Computation of IGCM Group.

    IGCM Group is the french IPSL Global Climate Model Group.

    This library is a set of shell scripts and functions whose purpose is
    the management of the initialization, the launch, the transfer of
    output files, the post-processing and the monitoring of datas produce
    by any numerical program on any plateforme.

    This software is governed by the CeCILL license under French law and
    abiding by the rules of distribution of free software. You can use,
    modify and/ or redistribute the software under the terms of the CeCILL
    license as circulated by CEA, CNRS and INRIA at the following URL
    "http://www.cecill.info".

    As a counterpart to the access to the source code and rights to copy,
    modify and redistribute granted by the license, users are provided only
    with a limited warranty and the software's author, the holder of the
    economic rights, and the successive licensors have only limited
    liability.

    In this respect, the user's attention is drawn to the risks associated
    with loading, using, modifying and/or developing or reproducing the
    software by the user in light of its specific status of free software,
    that may mean that it is complicated to manipulate, and that also
    therefore means that it is reserved for developers and experienced
    professionals having in-depth computer knowledge. Users are therefore
    encouraged to load and test the software's suitability as regards their
    requirements in conditions enabling the security of their systems and/or
    data to be ensured and, more generally, to use and operate it in the
    same conditions as regards security.

    The fact that you are presently reading this means that you have had
    knowledge of the CeCILL license and that you accept its terms.
  • Property svn:keywords set to Revision Author Date
File size: 20.7 KB
Line 
1#-Q- curie ######################
2#-Q- curie ## CURIE   TGCC/CEA ##
3#-Q- curie ######################
4#-Q- curie #MSUB -r MULTISE        # Nom du job
5#-Q- curie #MSUB -o MULTISE.out_%I
6#-Q- curie #MSUB -e MULTISE.out_%I
7#-Q- curie #MSUB -n 1              # Reservation du processus
8#-Q- curie #MSUB -T 36000          # Limite de temps elapsed du job
9#-Q- curie #MSUB -q ::default_node::
10#-Q- curie #MSUB -c ::default_core::
11#-Q- curie #MSUB -Q normal
12#-Q- curie #MSUB -A ::default_project::
13#-Q- curie set +x
14#-Q- irene ######################
15#-Q- irene ## IRENE   TGCC/CEA ##
16#-Q- irene ######################
17#-Q- irene #MSUB -r MULTISE      # Job name
18#-Q- irene #MSUB -o MULTISE.out_%I
19#-Q- irene #MSUB -e MULTISE.out_%I
20#-Q- irene #MSUB -n 1
21#-Q- irene #MSUB -T 7200         # Maximum elapsed time
22#-Q- irene #MSUB -q ::default_node::
23#-Q- irene #MSUB -c ::default_core::
24#-Q- irene #MSUB -Q normal
25#-Q- irene #MSUB -A ::default_post_project::
26#-Q- irene #MSUB -m store,work,scratch
27#-Q- irene set +x
28#-Q- irene-amd ######################
29#-Q- irene-amd ## IRENE   TGCC/CEA ##
30#-Q- irene-amd ######################
31#-Q- irene-amd #MSUB -r MULTISE     # Job name
32#-Q- irene-amd #MSUB -o MULTISE.out_%I
33#-Q- irene-amd #MSUB -e MULTISE.out_%I
34#-Q- irene-amd #MSUB -n 1              # Number of cores
35#-Q- irene-amd #MSUB -T 7200          # Maximum elapsed time
36#-Q- irene-amd #MSUB -q ::default_node::
37#-Q- irene-amd #MSUB -c ::default_core::
38#-Q- irene-amd #MSUB -Q normal
39#-Q- irene-amd #MSUB -A ::default_post_project::
40#-Q- irene-amd #MSUB -m store,work,scratch
41#-Q- irene-amd set +x
42#-Q- ada #!/bin/ksh
43#-Q- ada #######################
44#-Q- ada ## ADA         IDRIS ##
45#-Q- ada #######################
46#-Q- ada # @ job_type = mpich
47#-Q- ada # @ requirements = (Feature == "prepost")
48#-Q- ada # Temps Elapsed max. d'une requete hh:mm:ss
49#-Q- ada # @ wall_clock_limit = 1:00:00
50#-Q- ada # Nom du travail LoadLeveler
51#-Q- ada # @ job_name   = MULTISE
52#-Q- ada # Fichier de sortie standard du travail
53#-Q- ada # @ output     = $(job_name).$(jobid)
54#-Q- ada # Fichier de sortie d'erreur du travail
55#-Q- ada # @ error      =  $(job_name).$(jobid)
56#-Q- ada # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.)
57#-Q- ada # @ notification = error
58#-Q- ada # @ environment  = $DEBUG_debug ; $BigBrother ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $POST_DIR ; $Script_Post_Output ; $MASTER ; $DateBegin ; $PeriodDateEnd ; $StandAlone ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_MBG ; $RESOL_SRF ; $RESOL_SBG ; wall_clock_limit=$(wall_clock_limit)
59#-Q- ada # @ queue
60#-Q- obelix ######################
61#-Q- obelix ## OBELIX      LSCE ##
62#-Q- obelix ######################
63#-Q- obelix #PBS -N MULTISE
64#-Q- obelix #PBS -m a
65#-Q- obelix #PBS -j oe
66#-Q- obelix #PBS -q medium
67#-Q- obelix #PBS -o MULTISE.$$
68#-Q- obelix #PBS -S /bin/ksh
69#-Q- ifort_CICLAD ######################
70#-Q- ifort_CICLAD ##   CICLAD    IPSL ##
71#-Q- ifort_CICLAD ######################
72#-Q- ifort_CICLAD #PBS -N MULTISE
73#-Q- ifort_CICLAD #PBS -m a
74#-Q- ifort_CICLAD #PBS -j oe
75#-Q- ifort_CICLAD ###PBS -q h12       # Queue for 12 hours at ciclad only
76#-Q- ifort_CICLAD #PBS -S /bin/ksh
77#-Q- default #!/bin/ksh
78#-Q- default ##################
79#-Q- default ## DEFAULT HOST ##
80#-Q- default ##################
81
82#**************************************************************
83# Author: Marie-Alice Foujols
84# Contact: Marie-Alice.Foujols__at__ipsl.jussieu.fr
85# $Revision::                                          $ Revision of last commit
86# $Author::                                            $ Author of last commit
87# $Date::                                              $ Date of last commit
88# IPSL (2006)
89#  This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC
90#
91#**************************************************************
92# ID of your genci project. Curie only : post-processing jobs need it to run properly
93#-Q- curie export BRIDGE_MSUB_PROJECT=::default_project::
94
95#set -eu
96#set -vx
97
98date
99
100#-Q- ada export OMP_NUM_THREADS=1
101
102#D- Task type DO NOT CHANGE (computing, post-processing or checking)
103TaskType=post-processing
104
105########################################################################
106
107#D- Flag to determine if this job in a standalone mode
108#D- Default : value from AA_job if any
109StandAlone=${StandAlone:=true}
110
111#D- Path to libIGCM
112#D- Default : value from AA_job if any
113libIGCM=${libIGCM:=::modipsl::/libIGCM}
114
115#D- Flag to determine atlas job's output directory
116#D- Default : value from libIGCM_post.ksh if any
117POST_DIR=${POST_DIR:=${PBS_O_WORKDIR:=$(pwd)}}
118
119#D- Increased verbosity (1, 2, 3)
120#D- Default : value from AA_job if any
121Verbosity=${Verbosity:=3}
122
123#D- Low level debug : to bypass lib test checks and stack construction
124#D- Default : value from AA_job if any
125DEBUG_debug=${DEBUG_debug:=false}
126
127#D- TEMPORARY Flag to determine atmospheric resolution
128#D- Default : value from atmospheric driver if any
129RESOL_ATM=${RESOL_ATM:=ALL}
130
131#D- Flag to determine surface resolution
132#D- Default : value from surface driver if any
133RESOL_SRF=ALL
134
135#D- Flag to determine surface resolution
136#D- Default : value from surface driver if any
137RESOL_SBG=ALL
138
139#D- TEMPORARY Flag to determine ocean resolution
140#D- Default : value from ocean driver if any
141RESOL_OCE=${RESOL_OCE:=ORCA2}
142
143#D- TEMPORARY Flag to determine ice resolution
144#D- Default : value from ice driver if any
145RESOL_ICE=${RESOL_OCE:=ORCA2}
146
147#D- TEMPORARY Flag to determine marine biogeochemistry resolution
148#D- Default : value from ice driver if any
149RESOL_MBG=${RESOL_OCE:=ORCA2}
150
151########################################################################
152
153. ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh
154. ${libIGCM}/libIGCM_card/libIGCM_card.ksh
155. ${libIGCM}/libIGCM_date/libIGCM_date.ksh
156#-------
157. ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh
158. ${libIGCM}/libIGCM_config/libIGCM_config.ksh
159#-------
160IGCM_sys_MkdirWork ${RUN_DIR_PATH}
161IGCM_sys_Cd ${RUN_DIR_PATH}
162#-------
163( ${DEBUG_debug} ) && IGCM_debug_Check
164( ${DEBUG_debug} ) && IGCM_card_Check
165( ${DEBUG_debug} ) && IGCM_date_Check
166
167########################################################################
168
169#set -vx
170
171# ------------------------------------------------------------------
172# Test if all was right before proceeding further
173# ------------------------------------------------------------------
174IGCM_debug_Verif_Exit
175
176if [ ${StandAlone} = true ] ; then
177  CARD_DIR=${SUBMIT_DIR}
178else
179  CARD_DIR=${RUN_DIR_PATH}
180  IGCM_sys_Get_Master ${SUBMIT_DIR}/config.card ${RUN_DIR_PATH}
181  IGCM_sys_Get_Master ${SUBMIT_DIR}/run.card    ${RUN_DIR_PATH}
182  IGCM_sys_Get_Master ${SUBMIT_DIR}/COMP        ${RUN_DIR_PATH}
183  IGCM_sys_Get_Master ${SUBMIT_DIR}/POST        ${RUN_DIR_PATH}
184fi
185
186#==================================
187# First of all
188#
189# Read libIGCM compatibility version in config.card
190# Read UserChoices section
191# Read Ensemble section
192# Read Post section
193# Define all netcdf output directories
194#==================================
195IGCM_config_CommonConfiguration ${CARD_DIR}/config.card
196
197# ------------------------------------------------------------------
198# Activate BigBrother so as to supervise this job
199# ------------------------------------------------------------------
200IGCM_debug_BigBro_Initialize
201
202#==================================
203# Read ListOfComponents section:
204IGCM_card_DefineArrayFromSection   ${CARD_DIR}/config.card ListOfComponents
205
206#==================================
207# Read SeasonalFrequency:
208IGCM_card_DefineArrayFromSection   ${CARD_DIR}/config.card Post
209
210#
211# If option MultiSeasonalFrequency is not found (optionnal) put MultiSeasonalFrequency=50Y
212#
213FoundMultiSeasonal=false
214for option in ${config_Post[*]} ; do
215  if [ ${option} = MultiSeasonalFrequency ] ; then
216    FoundMultiSeasonal=true
217    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card Post MultiSeasonalFrequency
218  fi
219done
220if [ ! X${FoundMultiSeasonal} = Xtrue ] ; then
221  config_Post_MultiSeasonalFrequency=50Y
222fi
223#
224IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card Post SeasonalFrequency
225#
226# Determine period for seasonnal average. Default : value from AA_job if any
227#
228DateBegin=${DateBegin:=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} )}
229#
230PeriodDateEnd=${PeriodDateEnd:=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd} )}
231#
232IGCM_debug_Print 1 "DefineVariableFromOption : Post "
233IGCM_debug_PrintVariables 3 config_Post_SeasonalFrequency
234IGCM_debug_PrintVariables 3 config_Post_MultiSeasonalFrequency
235echo
236
237#
238freq=$( echo ${config_Post_SeasonalFrequency} |  sed -e "s/[yY]//" )
239#
240multifreq=$( echo ${config_Post_MultiSeasonalFrequency} |  sed -e "s/[yY]//" )
241#
242DIR_OUT=SE_${multifreq}Y
243#
244an_multi_fin=$(( $( IGCM_date_ConvertGregorianDateToJulian ${PeriodDateEnd} ) / 1000 ))
245an_multi_deb=$( IGCM_date_YearDigit $(( an_multi_fin - multifreq + 1 )) )
246an_multi_fin=$( IGCM_date_YearDigit ${an_multi_fin} )
247#
248# For each component selected determine which files need post-processing
249#
250for comp in ${config_ListOfComponents[*]} ; do
251  #
252  IGCM_card_DefineArrayFromOption ${CARD_DIR}/config.card ListOfComponents ${comp}
253  eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1
254  #
255  card=${CARD_DIR}/COMP/${compname}.card
256  IGCM_card_DefineArrayFromOption ${card} OutputFiles List
257  #
258  ListFilesName=${compname}_OutputFiles_List
259  eval FileName0=\${${ListFilesName}[0]} > /dev/null 2>&1
260  #
261  if [ X${FileName0} != X${NULL_STR} ] ; then
262    #
263    # INITIALISATION
264    #
265    eval NbFiles=\${#${ListFilesName}[@]} > /dev/null 2>&1
266    typeset i=2
267    #
268    until [ $i -gt $NbFiles ]; do
269      #
270      eval flag_post=\${${ListFilesName}[$i]} > /dev/null 2>&1
271      #
272      if [ X${flag_post} != XNONE ] ; then
273        #
274        # Check if seasonal is required for this file
275        #
276        IGCM_card_DefineArrayFromSection ${card} ${flag_post}
277        #
278        # Seasonal case : If option Seasonal is not found (old cards) put SEASONAL ON by default
279        #
280        # variable option allready typeset above
281        for option in $( eval echo \${${compname}_${flag_post}[*]} ) ; do
282          if [ ${option} = Seasonal ] ; then
283            FoundSeasonal=true
284            IGCM_card_DefineVariableFromOption ${card} ${flag_post} Seasonal
285          fi
286        done
287        #
288        if [ ! X${FoundSeasonal} = Xtrue ] ; then
289          eval ${compname}_${flag_post}_Seasonal=ON
290        fi
291        #
292        if [ ! X$( eval echo \${${compname}_${flag_post}_Seasonal} ) = XON ] ; then
293          (( i=i+3 ))
294          continue
295        fi
296        #
297        # CREATE LIST
298        #
299        FILE=$( echo ${flag_post} | awk "-FPost_" '{print $2}' )
300        #
301        DIRECTORY=${R_SAVE}/${comp}/Analyse/SE
302        #
303        MULTI_DIRECTORY=${R_SAVE}/${comp}/Analyse/${DIR_OUT}
304        #
305        TestedFile=${config_UserChoices_JobName}_SE_${an_multi_deb}_${an_multi_fin}_${FILE}.nc
306        #
307        IGCM_sys_TestFileArchive ${MULTI_DIRECTORY}/${TestedFile}
308        if [ ! $? = 0 ] ; then
309          eval set +A LISTE_FILE_${comp} \$\{LISTE_FILE_${comp}[*]} ${FILE}
310        fi
311      fi
312      (( i=i+3 ))
313    done # until [ $i -eq $NbFiles ]
314  fi
315done         # for comp
316
317for comp in ${config_ListOfComponents[*]} ; do
318  #
319  eval R_OUT_${comp}=${R_SAVE}/${comp}
320  #
321  i=0
322  for file in $( eval echo \${LISTE_FILE_${comp}[*]} ); do
323    #
324    RESULT_MULTI_SE=${config_UserChoices_JobName}_SE_${an_multi_deb}_${an_multi_fin}_${file}.nc
325    # Do not redo an existing SE
326    IGCM_sys_TestFileArchive ${R_SAVE}/${comp}/Analyse/${DIR_OUT}/${RESULT_MULTI_SE}
327    if [ $? = 0 ] ; then
328      continue
329    fi
330    #
331    eval file_path=\${R_OUT_${comp}}/Analyse/SE/
332    #
333    (( an = an_multi_deb ))
334    # Initialize array
335    unset liste_file_se
336    unset liste_file_se_tmp
337    while [ ${an} -le ${an_multi_fin} ] ; do
338      #
339      an_deb=$(printf "%04i\n" ${an} )
340      #
341      (( an_fin = an_deb + freq - 1 ))
342      date=${an_deb}_${an_fin}
343      #
344      liste_file_se[${#liste_file_se[*]}]=${file_path}${config_UserChoices_JobName}_SE_${date}_${file}.nc
345      liste_file_se_tmp[${#liste_file_se_tmp[*]}]=${config_UserChoices_JobName}_SE_${date}_${file}.nc
346      (( an = an + freq ))
347    done
348    #
349    IGCM_sys_Get /l liste_file_se[*] ${RUN_DIR_PATH}
350    IGCM_debug_Verif_Exit
351    # Search of common list of variables to be treated
352    nbfile=0
353    for file_common_var in ${liste_file_se_tmp[*]} ; do
354      ncdump -h ${file_common_var} | grep -E 'float|double' | cut -f 1 -d '(' | cut -f 2 -d ' ' >> tmpfile_ncra
355      (( nbfile = nbfile + 1 ))
356    done
357    list_var_final_ncra=`cat tmpfile_ncra | sort | uniq -c | awk -v nbfile=$nbfile '{if ($1 == nbfile) {print $2}}' | paste -s -d ','`
358    IGCM_sys_Rm tmpfile_ncra
359
360    # detect time counter : time or time_counter ie unlimited variable
361    var_unlim=$(ncdump -h ${liste_file_se_tmp[1]}|grep UNLIMITED|awk '{print $1}')
362
363    for mois in  01 02 03 04 05 06 07 08 09 10 11 12 ; do
364      #
365      (( nb = ${mois} - 1 ))
366      #
367      OUT_SE[${nb}]=${config_UserChoices_JobName}_SE${mois}_${an_deb}_${an_fin}_${file}.nc
368      IGCM_sys_ncra -O -v ${list_var_final_ncra} -d ${var_unlim},${nb},,12 ${liste_file_se_tmp[*]} ${OUT_SE[${nb}]}
369    done
370    IGCM_sys_Rm ${liste_file_se_tmp[*]}
371    #
372
373    # Search of common list of variables to be treated
374    nbfile=0
375    for file_common_var in ${OUT_SE[*]} ; do
376      ncdump -h ${file_common_var} | grep -E 'float|double' | cut -f 1 -d '(' | cut -f 2 -d ' ' >> tmpfile_ncrcat
377      (( nbfile = nbfile + 1 ))
378    done
379    list_var_final_ncrcat=`cat tmpfile_ncrcat | sort | uniq -c | awk -v nbfile=$nbfile '{if ($1 == nbfile) {print $2}}' | paste -s -d ','`
380    IGCM_sys_Rm tmpfile_ncrcat
381
382    IGCM_sys_ncrcat -O -v ${list_var_final_ncrcat} ${OUT_SE[*]} ${RESULT_MULTI_SE}
383    #
384    IGCM_sys_Rm ${OUT_SE[*]}
385
386    # Put correct climatological axis following calendar
387    case ${config_UserChoices_CalendarType} in
388      360d|360_day)
389      # 360 days
390        ncap2cmd="'defdim(\"tbnds\",2) ; ${var_unlim}[${var_unlim}]={15, 45, 75, 105, 135, 165, 195, 225, 255, 285, 315, 345.} ; ${var_unlim}_bnds[${var_unlim},tbnds]={0, 30, 30, 60, 60, 90, 90, 120, 120, 150, 150, 180, 180, 210, 210, 240, 240, 270, 270, 300, 300, 330, 330, 360.} ; ${var_unlim}@units=\"days since 0000-01-01 00:00:00\" ; ${var_unlim}@time_origin=\"01-JAN-0000 00:00:00\" ; ${var_unlim}@calendar=\"360_day\" ; ${var_unlim}@bounds=\"${var_unlim}_bnds\"'"
391        ;;
392      noleap|365_day)
393      # 365 days
394        ncap2cmd="'defdim(\"tbnds\",2) ; ${var_unlim}[${var_unlim}]={15.5, 45, 74.5, 105, 135.5, 166, 196.5, 227.5, 258, 288.5, 319, 349.5} ; ${var_unlim}_bnds[${var_unlim},tbnds]={0, 31, 31, 59, 59, 90, 90, 120, 120, 151, 151, 181, 181, 212, 212, 243, 243, 273, 273, 304, 304, 334, 334, 365.} ; ${var_unlim}@units=\"days since 0000-01-01 00:00:00\" ; ${var_unlim}@time_origin=\"01-JAN-0000 00:00:00\" ; ${var_unlim}@calendar=\"365_day\" ; ${var_unlim}@bounds=\"${var_unlim}_bnds\"'"
395        ;;
396      all_leap|366_day)
397      # 366 days
398        ncap2cmd="'defdim(\"tbnds\",2) ; ${var_unlim}[${var_unlim}]={15.5, 45.5, 75.5, 106, 136.5, 167, 197.5, 228.5, 259, 289.5, 320, 350.5} ; ${var_unlim}_bnds[${var_unlim},tbnds]={0, 31, 31, 60, 60, 91, 91, 121, 121, 152, 152, 182, 182, 213, 213, 244, 244, 274, 274, 305, 305, 335, 335, 366.} ; ${var_unlim}@units=\"days since 0000-01-01 00:00:00\" ; ${var_unlim}@time_origin=\"01-JAN-0000 00:00:00\" ; ${var_unlim}@calendar=\"366_day\" ; ${var_unlim}@bounds=\"${var_unlim}_bnds\"'"
399        ;;
400      leap|gregorian|standard)
401      # 365.2425 days
402        ncap2cmd="'defdim(\"tbnds\",2) ; ${var_unlim}[${var_unlim}]={15.5, 45.12125, 74.7425, 105.2425, 135.7425, 166.2425, 196.7425, 227.7425, 258.2425, 288.7425, 319.2425, 349.7425} ; ${var_unlim}_bnds[${var_unlim},tbnds]={0, 31, 31, 59.2425, 59.2425, 90.2425, 90.2425, 120.2425, 120.2425, 151.2425, 151.2425, 181.2425, 181.2425, 212.2425, 212.2425, 243.2425, 243.2425, 273.2425, 273.2425, 304.2425, 304.2425, 334.2425, 334.2425, 365.2425} ; ${var_unlim}@units=\"days since 0000-01-01 00:00:00\" ; ${var_unlim}@time_origin=\"01-JAN-0000 00:00:00\" ; ${var_unlim}@calendar=\"gregorian\" ; ${var_unlim}@bounds=\"${var_unlim}_bnds\"'"
403        ;;
404    esac
405    eval IGCM_sys_ncap2 -Oh -s $ncap2cmd ${RESULT_MULTI_SE} tmp.nc
406    IGCM_sys_Rm ${RESULT_MULTI_SE}
407    IGCM_sys_Mv tmp.nc ${RESULT_MULTI_SE}
408    #
409    eval IGCM_sys_Put_Out ${RESULT_MULTI_SE} \${R_OUT_${comp}}/Analyse/${DIR_OUT}/${RESULT_MULTI_SE}
410    IGCM_sys_Rm ${RESULT_MULTI_SE}
411    #
412  done
413done
414
415# DODS copy
416if [ X${config_Post_DodsCopy} = XTRUE ]  ; then
417  for comp in ${config_ListOfComponents[*]} ; do
418    IGCM_sys_TestDirArchive ${R_SAVE}/${comp}/Analyse/${DIR_OUT}
419    [ $? = 0 ] && IGCM_sys_Put_Dods ${comp}/Analyse/${DIR_OUT}
420  done
421fi
422
423# Temporal coverage id for atlas
424YEARS=${an_multi_deb}_${an_multi_fin}
425
426export DEBUG_debug; export BigBrother ; export libIGCM; export SUBMIT_DIR; export POST_DIR; export Script_Output ;
427export StandAlone ; export RESOL_ATM; export RESOL_OCE ; export RESOL_ICE ; export RESOL_MBG ; export RESOL_SRF ;
428export RESOL_SBG ; export YEARS; export DIR_OUT
429listVarEnv="DEBUG_debug,BigBrother,libIGCM,SUBMIT_DIR,POST_DIR,Script_Post_Output,StandAlone,RESOL_ATM,RESOL_OCE,RESOL_ICE,RESOL_MBG,RESOL_SRF,RESOL_SBG,YEARS,DIR_OUT"
430export listVarEnv;
431
432#D-
433# --------------------------------------------------------------------
434#D- Test if all was right before ATLAS
435# --------------------------------------------------------------------
436IGCM_debug_Verif_Exit
437
438if [ ${config_UserChoices_TagName} = "IPSLCM4_v1_OASIS3" ] || \
439   [ ${config_UserChoices_TagName} = "IPSLCM4_v2" ]        || \
440   [ ${config_UserChoices_TagName} = "IPSL_ESM_V1" ] ; then
441  #
442  export Script_Post_Output=atlas_ORCHIDEE.${PeriodDateEnd} ;
443  IGCM_sys_QsubPost atlas_ORCHIDEE                          ;
444  export Script_Post_Output=atlas_LDMZ.${PeriodDateEnd}     ;
445  IGCM_sys_QsubPost atlas_LMDZ                              ;
446  export Script_Post_Output=atlas_ORCA_LIM.${PeriodDateEnd} ;
447  IGCM_sys_QsubPost atlas_ORCA_LIM                          ;
448  export Script_Post_Output=additionnal.${PeriodDateEnd}    ;
449  IGCM_sys_QsubPost additionnal                             ;
450  #
451elif [ ${config_UserChoices_TagName} = "IPSLCM5" ]         || \
452     [ ${config_UserChoices_TagName} = "IPSLCM5A" ]        || \
453     [ ${config_UserChoices_TagName} = "IPSLCM5B" ]        || \
454     [ ${config_UserChoices_TagName} = "IPSLCM5A-MR" ]     || \
455     [ ${config_UserChoices_TagName} = "IPSLCM5A2" ]       || \
456     [ ${config_UserChoices_TagName} = "IPSLCM6" ] ; then
457  export Script_Post_Output=atlas_ORCHIDEE.${PeriodDateEnd} ;
458  IGCM_sys_QsubPost atlas_ORCHIDEE                          ;
459  export Script_Post_Output=atlas_LDMZ.${PeriodDateEnd}     ;
460  IGCM_sys_QsubPost atlas_LMDZ                              ;
461  export Script_Post_Output=atlas_ORCA_LIM.${PeriodDateEnd} ;
462  IGCM_sys_QsubPost atlas_ORCA_LIM                          ;
463  export Script_Post_Output=atlas_PISCES.${PeriodDateEnd}   ;
464  IGCM_sys_QsubPost atlas_PISCES                            ;
465  #
466elif [ ${config_UserChoices_TagName} = "LMDZ4OR" ]         || \
467     [ ${config_UserChoices_TagName} = "LMDZOR" ]          || \
468     [ ${config_UserChoices_TagName} = "LMDZ4OR_v2" ] ; then
469  #
470  export Script_Post_Output=atlas_LDMZ.${PeriodDateEnd}     ;
471  IGCM_sys_QsubPost atlas_LMDZ                              ;
472  export Script_Post_Output=atlas_ORCHIDEE.${PeriodDateEnd} ;
473  IGCM_sys_QsubPost atlas_ORCHIDEE                          ;
474  #
475elif [ ${config_UserChoices_TagName} = "LMDZ" ] ; then
476  #
477  export Script_Post_Output=atlas_LDMZ.${PeriodDateEnd}     ;
478  IGCM_sys_QsubPost atlas_LMDZ                              ;
479  #
480elif [ ${config_UserChoices_TagName} = "OL" ]              || \
481     [ ${config_UserChoices_TagName} = "OL2" ] ; then
482  #
483  export Script_Post_Output=atlas_ORCHIDEE.${PeriodDateEnd} ;
484  IGCM_sys_QsubPost atlas_ORCHIDEE                          ;
485  #
486elif [ ${config_UserChoices_TagName} = "ORCA2_LIM" ]       || \
487     [ ${config_UserChoices_TagName} = "ORCA2_LIM2" ]      || \
488     [ ${config_UserChoices_TagName} = "ORCA2_LIM3" ] ; then
489  #
490  export Script_Post_Output=atlas_ORCA_LIM.${PeriodDateEnd} ;
491  IGCM_sys_QsubPost atlas_ORCA_LIM                          ;
492  #
493elif [ ${config_UserChoices_TagName} = "ORCA2_LIM2_PISCES" ] || \
494     [ ${config_UserChoices_TagName} = "ORCA2_LIM3_PISCES" ] ; then
495  #
496  export Script_Post_Output=atlas_ORCA_LIM.${PeriodDateEnd} ;
497  IGCM_sys_QsubPost atlas_ORCA_LIM                          ;
498  export Script_Post_Output=atlas_PISCES.${PeriodDateEnd}   ;
499  IGCM_sys_QsubPost atlas_PISCES                            ;
500  #
501elif [ ${config_UserChoices_TagName} = "ORCA2_OFF_PISCES" ] ; then
502  #
503  export Script_Post_Output=atlas_PISCES.${PeriodDateEnd}   ;
504  IGCM_sys_QsubPost atlas_PISCES                            ;
505  #
506fi
507
508# Clean RUN_DIR_PATH (necessary for cesium and titane only)
509IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH}
510
511# ------------------------------------------------------------------
512# Finalize BigBrother to inform that the jobs end
513# ------------------------------------------------------------------
514IGCM_debug_BigBro_Finalize
Note: See TracBrowser for help on using the repository browser.