source: trunk/libIGCM/AA_create_multi_se @ 1451

Last change on this file since 1451 was 1448, checked in by jgipsl, 6 years ago

Change in headers at irene : temporary remove option -m and use a workaround given by the TGCC. This change is done to avoid problems with resubmitting from job when submitting the main job from workdir.

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