source: trunk/libIGCM/AA_create_multi_se @ 1441

Last change on this file since 1441 was 1437, checked in by jgipsl, 6 years ago

For Irene:

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