source: trunk/libIGCM/AA_create_multi_se

Last change on this file was 1603, checked in by aclsce, 6 months ago
  • Changed libIGCM behaviour in case of pb in pack_output.job : now, we exit from the job if there is any problem, whatever we are in PROD, DEVT, TEST mode.
  • Specification of pack frequency per file :

In order to reduce the number of inodes, it is possible to specify by file the frequency of packing. The syntax to do that is in the 4th column of OutputFiles? section of the component.card, for example as follows in lmdz.card :
[OutputFiles?]
List= (histmth.nc, ${R_OUT_ATM_O_M}/${PREFIX}_1M_histmth.nc, Post_1M_histmth, 100Y), \

(histday.nc, ${R_OUT_ATM_O_D}/${PREFIX}_1D_histday.nc, Post_1D_histday, 10Y), \

...

In this example, histmth files will be packed every 100 years and histday files will be packed every 10 years.
The pack frequency you defined in config.card is the frequency of pack by default, that means if a specific frequency of pack is specified for a file in a component.card, this file will be packed at the specific frequency whereas all other files will be packed at global pack frequency (specified in config.card) and in this case, the frequency pack (from the config.card) is the frequency the pack_output job will be launched at.
There is a constraint to use this fonctionality : the Packfrequency you defined in config.card must be greater or equal to the pack frequencies you specified for each type of file in component.card, otherwise the computing job will be stopped (with an explicit error message).
Surpack mode :
A surpack mode functionality is available through the use of pack_output.job. To enable this functionality, you have to put "surpack_mode=y" (default value is n). The way to use is similar to restart post-processing pack_output jobs, as indicated here : http://forge.ipsl.jussieu.fr/igcmg_doc/wiki/Doc/CheckDebug#RestartPack_output. You can either use a global pack frequency in config.card or specific pack frequency per file, as explained above.

  • 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: 21.1 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+1 ))
294            eval Testvar_=\${${ListFilesName}[$i_]} > /dev/null 2>&1
295            eval Testvar=${Testvar_}
296            if [[ ${Testvar} =~ [0-9][DMY]$ ]] ; then
297                (( i = i+4 ))
298            else
299          (( i=i+3 ))
300            fi
301          continue
302        fi
303        #
304        # CREATE LIST
305        #
306        FILE=$( echo ${flag_post} | awk "-FPost_" '{print $2}' )
307        #
308        DIRECTORY=${R_SAVE}/${comp}/Analyse/SE
309        #
310        MULTI_DIRECTORY=${R_SAVE}/${comp}/Analyse/${DIR_OUT}
311        #
312        TestedFile=${config_UserChoices_JobName}_SE_${an_multi_deb}_${an_multi_fin}_${FILE}.nc
313        #
314        IGCM_sys_TestFileArchive ${MULTI_DIRECTORY}/${TestedFile}
315        if [ ! $? = 0 ] ; then
316          eval set +A LISTE_FILE_${comp} \$\{LISTE_FILE_${comp}[*]} ${FILE}
317        fi
318      fi
319      (( i_ = i+1 )) # to explore file list
320      eval Testvar_=\${${ListFilesName}[$i_]} > /dev/null 2>&1
321      eval Testvar=${Testvar_}
322      if [[ ${Testvar} =~ [0-9][DMY]$ ]] ; then
323          (( i = i+4 ))
324      else
325      (( i=i+3 ))
326      fi
327    done # until [ $i -eq $NbFiles ]
328  fi
329done         # for comp
330
331for comp in ${config_ListOfComponents[*]} ; do
332  #
333  eval R_OUT_${comp}=${R_SAVE}/${comp}
334  #
335  i=0
336  for file in $( eval echo \${LISTE_FILE_${comp}[*]} ); do
337    #
338    RESULT_MULTI_SE=${config_UserChoices_JobName}_SE_${an_multi_deb}_${an_multi_fin}_${file}.nc
339    # Do not redo an existing SE
340    IGCM_sys_TestFileArchive ${R_SAVE}/${comp}/Analyse/${DIR_OUT}/${RESULT_MULTI_SE}
341    if [ $? = 0 ] ; then
342      continue
343    fi
344    #
345    eval file_path=\${R_OUT_${comp}}/Analyse/SE/
346    #
347    (( an = an_multi_deb ))
348    # Initialize array
349    unset liste_file_se
350    unset liste_file_se_tmp
351    while [ ${an} -le ${an_multi_fin} ] ; do
352      #
353      an_deb=$(printf "%04i\n" ${an} )
354      #
355      (( an_fin = an_deb + freq - 1 ))
356      date=${an_deb}_${an_fin}
357      #
358      liste_file_se[${#liste_file_se[*]}]=${file_path}${config_UserChoices_JobName}_SE_${date}_${file}.nc
359      liste_file_se_tmp[${#liste_file_se_tmp[*]}]=${config_UserChoices_JobName}_SE_${date}_${file}.nc
360      (( an = an + freq ))
361    done
362    #
363    IGCM_sys_Get /l liste_file_se[*] ${RUN_DIR_PATH}
364    IGCM_debug_Verif_Exit
365    # Search of common list of variables to be treated
366    nbfile=0
367    for file_common_var in ${liste_file_se_tmp[*]} ; do
368      ncdump -h ${file_common_var} | grep -E 'float|double' | cut -f 1 -d '(' | cut -f 2 -d ' ' >> tmpfile_ncra
369      (( nbfile = nbfile + 1 ))
370    done
371    list_var_final_ncra=`cat tmpfile_ncra | sort | uniq -c | awk -v nbfile=$nbfile '{if ($1 == nbfile) {print $2}}' | paste -s -d ','`
372    IGCM_sys_Rm tmpfile_ncra
373
374    # detect time counter : time or time_counter ie unlimited variable
375    var_unlim=$(ncdump -h ${liste_file_se_tmp[1]}|grep UNLIMITED|awk '{print $1}')
376
377    for mois in  01 02 03 04 05 06 07 08 09 10 11 12 ; do
378      #
379      (( nb = ${mois} - 1 ))
380      #
381      OUT_SE[${nb}]=${config_UserChoices_JobName}_SE${mois}_${an_deb}_${an_fin}_${file}.nc
382      IGCM_sys_ncra -O -v ${list_var_final_ncra} -d ${var_unlim},${nb},,12 ${liste_file_se_tmp[*]} ${OUT_SE[${nb}]}
383    done
384    IGCM_sys_Rm ${liste_file_se_tmp[*]}
385    #
386
387    # Search of common list of variables to be treated
388    nbfile=0
389    for file_common_var in ${OUT_SE[*]} ; do
390      ncdump -h ${file_common_var} | grep -E 'float|double' | cut -f 1 -d '(' | cut -f 2 -d ' ' >> tmpfile_ncrcat
391      (( nbfile = nbfile + 1 ))
392    done
393    list_var_final_ncrcat=`cat tmpfile_ncrcat | sort | uniq -c | awk -v nbfile=$nbfile '{if ($1 == nbfile) {print $2}}' | paste -s -d ','`
394    IGCM_sys_Rm tmpfile_ncrcat
395
396    IGCM_sys_ncrcat -O -v ${list_var_final_ncrcat} ${OUT_SE[*]} ${RESULT_MULTI_SE}
397    #
398    IGCM_sys_Rm ${OUT_SE[*]}
399
400    # Put correct climatological axis following calendar
401    case ${config_UserChoices_CalendarType} in
402      360d|360_day)
403      # 360 days
404        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\"'"
405        ;;
406      noleap|365_day)
407      # 365 days
408        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\"'"
409        ;;
410      all_leap|366_day)
411      # 366 days
412        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\"'"
413        ;;
414      leap|gregorian|standard)
415      # 365.2425 days
416        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\"'"
417        ;;
418    esac
419    eval IGCM_sys_ncap2 -Oh -s $ncap2cmd ${RESULT_MULTI_SE} tmp.nc
420    IGCM_sys_Rm ${RESULT_MULTI_SE}
421    IGCM_sys_Mv tmp.nc ${RESULT_MULTI_SE}
422    #
423    eval IGCM_sys_Put_Out ${RESULT_MULTI_SE} \${R_OUT_${comp}}/Analyse/${DIR_OUT}/${RESULT_MULTI_SE}
424    IGCM_sys_Rm ${RESULT_MULTI_SE}
425    #
426  done
427done
428
429# DODS copy
430if [ X${config_Post_DodsCopy} = XTRUE ]  ; then
431  for comp in ${config_ListOfComponents[*]} ; do
432    IGCM_sys_TestDirArchive ${R_SAVE}/${comp}/Analyse/${DIR_OUT}
433    [ $? = 0 ] && IGCM_sys_Put_Dods ${comp}/Analyse/${DIR_OUT}
434  done
435fi
436
437# Temporal coverage id for atlas
438YEARS=${an_multi_deb}_${an_multi_fin}
439
440export DEBUG_debug; export BigBrother ; export libIGCM; export SUBMIT_DIR; export POST_DIR; export Script_Output ;
441export StandAlone ; export RESOL_ATM; export RESOL_OCE ; export RESOL_ICE ; export RESOL_MBG ; export RESOL_SRF ;
442export RESOL_SBG ; export YEARS; export DIR_OUT
443listVarEnv="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"
444export listVarEnv;
445
446#D-
447# --------------------------------------------------------------------
448#D- Test if all was right before ATLAS
449# --------------------------------------------------------------------
450IGCM_debug_Verif_Exit
451
452if [ ${config_UserChoices_TagName} = "IPSLCM4_v1_OASIS3" ] || \
453   [ ${config_UserChoices_TagName} = "IPSLCM4_v2" ]        || \
454   [ ${config_UserChoices_TagName} = "IPSL_ESM_V1" ] ; then
455  #
456  export Script_Post_Output=atlas_ORCHIDEE.${PeriodDateEnd} ;
457  IGCM_sys_QsubPost atlas_ORCHIDEE                          ;
458  export Script_Post_Output=atlas_LDMZ.${PeriodDateEnd}     ;
459  IGCM_sys_QsubPost atlas_LMDZ                              ;
460  export Script_Post_Output=atlas_ORCA_LIM.${PeriodDateEnd} ;
461  IGCM_sys_QsubPost atlas_ORCA_LIM                          ;
462  export Script_Post_Output=additionnal.${PeriodDateEnd}    ;
463  IGCM_sys_QsubPost additionnal                             ;
464  #
465elif [ ${config_UserChoices_TagName} = "IPSLCM5" ]         || \
466     [ ${config_UserChoices_TagName} = "IPSLCM5A" ]        || \
467     [ ${config_UserChoices_TagName} = "IPSLCM5B" ]        || \
468     [ ${config_UserChoices_TagName} = "IPSLCM5A-MR" ]     || \
469     [ ${config_UserChoices_TagName} = "IPSLCM5A2" ]       || \
470     [ ${config_UserChoices_TagName} = "IPSLCM6" ] ; then
471  export Script_Post_Output=atlas_ORCHIDEE.${PeriodDateEnd} ;
472  IGCM_sys_QsubPost atlas_ORCHIDEE                          ;
473  export Script_Post_Output=atlas_LDMZ.${PeriodDateEnd}     ;
474  IGCM_sys_QsubPost atlas_LMDZ                              ;
475  export Script_Post_Output=atlas_ORCA_LIM.${PeriodDateEnd} ;
476  IGCM_sys_QsubPost atlas_ORCA_LIM                          ;
477  export Script_Post_Output=atlas_PISCES.${PeriodDateEnd}   ;
478  IGCM_sys_QsubPost atlas_PISCES                            ;
479  #
480elif [ ${config_UserChoices_TagName} = "LMDZ4OR" ]         || \
481     [ ${config_UserChoices_TagName} = "LMDZOR" ]          || \
482     [ ${config_UserChoices_TagName} = "LMDZ4OR_v2" ] ; then
483  #
484  export Script_Post_Output=atlas_LDMZ.${PeriodDateEnd}     ;
485  IGCM_sys_QsubPost atlas_LMDZ                              ;
486  export Script_Post_Output=atlas_ORCHIDEE.${PeriodDateEnd} ;
487  IGCM_sys_QsubPost atlas_ORCHIDEE                          ;
488  #
489elif [ ${config_UserChoices_TagName} = "LMDZ" ] ; then
490  #
491  export Script_Post_Output=atlas_LDMZ.${PeriodDateEnd}     ;
492  IGCM_sys_QsubPost atlas_LMDZ                              ;
493  #
494elif [ ${config_UserChoices_TagName} = "OL" ]              || \
495     [ ${config_UserChoices_TagName} = "OL2" ] ; then
496  #
497  export Script_Post_Output=atlas_ORCHIDEE.${PeriodDateEnd} ;
498  IGCM_sys_QsubPost atlas_ORCHIDEE                          ;
499  #
500elif [ ${config_UserChoices_TagName} = "ORCA2_LIM" ]       || \
501     [ ${config_UserChoices_TagName} = "ORCA2_LIM2" ]      || \
502     [ ${config_UserChoices_TagName} = "ORCA2_LIM3" ] ; then
503  #
504  export Script_Post_Output=atlas_ORCA_LIM.${PeriodDateEnd} ;
505  IGCM_sys_QsubPost atlas_ORCA_LIM                          ;
506  #
507elif [ ${config_UserChoices_TagName} = "ORCA2_LIM2_PISCES" ] || \
508     [ ${config_UserChoices_TagName} = "ORCA2_LIM3_PISCES" ] ; then
509  #
510  export Script_Post_Output=atlas_ORCA_LIM.${PeriodDateEnd} ;
511  IGCM_sys_QsubPost atlas_ORCA_LIM                          ;
512  export Script_Post_Output=atlas_PISCES.${PeriodDateEnd}   ;
513  IGCM_sys_QsubPost atlas_PISCES                            ;
514  #
515elif [ ${config_UserChoices_TagName} = "ORCA2_OFF_PISCES" ] ; then
516  #
517  export Script_Post_Output=atlas_PISCES.${PeriodDateEnd}   ;
518  IGCM_sys_QsubPost atlas_PISCES                            ;
519  #
520fi
521
522# Clean RUN_DIR_PATH (necessary for cesium and titane only)
523IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH}
524
525# ------------------------------------------------------------------
526# Finalize BigBrother to inform that the jobs end
527# ------------------------------------------------------------------
528IGCM_debug_BigBro_Finalize
Note: See TracBrowser for help on using the repository browser.