source: branches/libIGCM_MPI_OpenMP/AA_create_multi_se @ 494

Last change on this file since 494 was 461, checked in by mafoipsl, 13 years ago

Add IPSLCM5B configuration for atlas submission.

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