source: trunk/libIGCM/AA_create_se @ 221

Last change on this file since 221 was 220, checked in by sdipsl, 14 years ago

Use ulam's largest class for potentially heavy 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 Date Author Revision
File size: 19.0 KB
Line 
1#-Q- platine #!/usr/bin/ksh
2#-Q- platine ###################
3#-Q- platine ## PLATINE   CEA ##
4#-Q- platine ###################
5#-Q- platine #BSUB -J SE                     # Nom du job
6#-Q- platine #BSUB -N                        # message a la fin du job
7#-Q- platine #BSUB -n 1                      # reservation des processeurs pour le job
8#-Q- platine #BSUB -W 1:00                   # Limite temps
9#-Q- platine #BSUB -q post              # Passage en queue post
10#-Q- sx8brodie #!/bin/ksh
11#-Q- sx8brodie #######################
12#-Q- sx8brodie ## SX8BRODIE   IDRIS ##
13#-Q- sx8brodie #######################
14#-Q- sx8brodie # Temps Elapsed max. d'une requete hh:mm:ss
15#-Q- sx8brodie # @ wall_clock_limit = 20:00:00
16#-Q- sx8brodie # Nom du travail LoadLeveler
17#-Q- sx8brodie # @ job_name   = SE
18#-Q- sx8brodie # Fichier de sortie standard du travail       
19#-Q- sx8brodie # @ output     = $(job_name).$(jobid)
20#-Q- sx8brodie # Fichier de sortie d'erreur du travail
21#-Q- sx8brodie # @ error      =  $(job_name).$(jobid)
22#-Q- sx8brodie # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.)
23#-Q- sx8brodie # @ notification = error
24#-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
25#-Q- sx8brodie # @ queue
26#-Q- aix6 #!/bin/ksh
27#-Q- aix6 #######################
28#-Q- aix6 ##   VARGAS   IDRIS  ##
29#-Q- aix6 #######################
30#-Q- aix6 # Temps Elapsed max. d'une requete hh:mm:ss
31#-Q- aix6 # @ wall_clock_limit = 20:00:00
32#-Q- aix6 # Nom du travail LoadLeveler
33#-Q- aix6 # @ job_name   = SE
34#-Q- aix6 # Fichier de sortie standard du travail       
35#-Q- aix6 # @ output     = $(job_name).$(jobid)
36#-Q- aix6 # Fichier de sortie d'erreur du travail
37#-Q- aix6 # @ error      =  $(job_name).$(jobid)
38#-Q- aix6 # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.)
39#-Q- aix6 # @ notification = error
40#-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
41#-Q- aix6 # @ queue
42#-Q- sx8mercure #!/bin/ksh
43#-Q- sx8mercure ######################
44#-Q- sx8mercure ## SX8MERCURE   CEA ##
45#-Q- sx8mercure ######################
46#-Q- sx8mercure #PBS -N SE                   # Nom du job
47#-Q- sx8mercure #PBS -j o                    # regroupement des stdout et stderr
48#-Q- sx8mercure #PBS -S /usr/bin/ksh         # shell de soumission
49#-Q- sx8mercure #PBS -l memsz_job=1gb        # Limite memoire a 1 Go
50#-Q- sx8mercure #PBS -l cputim_job=1:00:00   # Limite temps a 1 heures
51#-Q- sx8mercure #PBS -q scalaire
52#-Q- sx9mercure #!/bin/ksh
53#-Q- sx9mercure ######################
54#-Q- sx9mercure ## SX9MERCURE   CEA ##
55#-Q- sx9mercure ######################
56#-Q- sx9mercure #MSUB -r SE             # Nom du job               
57#-Q- sx9mercure #MSUB -N 1              # Reservation du noeud
58#-Q- sx9mercure #MSUB -n 1              # Reservation du processus
59#-Q- sx9mercure #MSUB -T 86400          # Limite de temps elapsed du job
60#-Q- sx9mercure #MSUB -E "-j o"
61#-Q- sx9mercure #MSUB -E "-S /bin/ksh"
62#-Q- sx9mercure ##MSUB -e nco.out        # Sortie standard
63#-Q- sx9mercure ##MSUB -o nco.out        # Sortie standard
64#-Q- default #!/bin/ksh
65#-Q- default ##################
66#-Q- default ## DEFAULT HOST ##
67#-Q- default ##################
68
69# $Date$
70# $Author$
71# $Revision$
72# IPSL (2006)
73#  This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC
74
75#set -eu
76#set -vx
77
78date
79
80#-Q- sx8brodie export OMP_NUM_THREADS=1
81#-Q- aix6 export OMP_NUM_THREADS=1
82
83########################################################################
84
85#D- Flag to determine if this job in a standalone mode
86#D- Default : value from AA_job if any
87StandAlone=${StandAlone:=true}
88
89#D- Low level debug : to bypass lib test checks and stack construction
90#D- Default : value from AA_job if any
91libIGCM=${libIGCM:=/path/to/your/libIGCM}
92
93#D- Flag to determine if rebuild process has been performed asynchronously
94#D- Possible value true or false.
95#D- If true raw files has allready been patched by rebuild job
96#D- If false create_ts will patch the raw files
97#D- Default : Value from AA_job if any. Usefull in StandAlone case.
98RebuildFrequency=${RebuildFrequency:=true}
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}}
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- TEMPORARY Flag to determine ocean resolution
117#D- Default : value from ocean driver if any
118RESOL_OCE=${RESOL_OCE:=ORCA2}
119
120#D- TEMPORARY Flag to determine ice resolution
121#D- Default : value from ice driver if any
122RESOL_ICE=${RESOL_ICE:=ORCA2}
123
124#D- TEMPORARY Flag to determine marine biogeochemistry resolution
125#D- Default : value from ice driver if any
126RESOL_MBG=${RESOL_MBG:=ORCA2}
127
128#D- Flag to determine surface resolution
129#D- Default : value from surface driver if any
130RESOL_SRF=ALL
131
132#D- Flag to determine surface resolution
133#D- Default : value from surface driver if any
134RESOL_SBG=ALL
135
136########################################################################
137
138. ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh
139      ( ${DEBUG_debug} ) && IGCM_debug_Check
140. ${libIGCM}/libIGCM_card/libIGCM_card.ksh
141     ( ${DEBUG_debug} ) && IGCM_card_Check
142. ${libIGCM}/libIGCM_date/libIGCM_date.ksh
143     ( ${DEBUG_debug} ) && IGCM_date_Check
144#-------
145. ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh
146
147########################################################################
148
149#set -vx
150
151IGCM_sys_MkdirWork ${RUN_DIR_PATH}
152IGCM_sys_Cd ${RUN_DIR_PATH}
153
154if [ ${StandAlone} = true ] ; then
155    CARD_DIR=${SUBMIT_DIR}
156else
157    CARD_DIR=${RUN_DIR_PATH}/$( basename ${SUBMIT_DIR} )
158    IGCM_sys_Get_Master ${SUBMIT_DIR} ${RUN_DIR_PATH}
159fi
160
161#
162# First of all
163#
164IGCM_card_DefineArrayFromSection   ${CARD_DIR}/config.card UserChoices
165typeset option
166for option in ${config_UserChoices[*]} ; do
167    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card UserChoices ${option}
168done
169#
170echo
171IGCM_debug_Print 1 "DefineArrayFromOption  : config_UserChoices"
172IGCM_debug_PrintVariables 3 config_UserChoices_JobName
173IGCM_debug_PrintVariables 3 config_UserChoices_LongName
174IGCM_debug_PrintVariables 3 config_UserChoices_TagName
175IGCM_debug_PrintVariables 3 config_UserChoices_CalendarType
176IGCM_debug_PrintVariables 3 config_UserChoices_DateBegin
177IGCM_debug_PrintVariables 3 config_UserChoices_DateEnd
178IGCM_debug_PrintVariables 3 config_UserChoices_PeriodLength
179echo
180
181#==================================
182
183R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
184#
185IGCM_card_DefineArrayFromSection   ${CARD_DIR}/config.card ListOfComponents
186#
187IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card Post SeasonalFrequency
188#
189# Determine period for seasonnal average. Default : value from AA_job if any
190#
191DateBegin=${DateBegin:=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} )}
192#
193PeriodDateEnd=${PeriodDateEnd:=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd} )}
194#
195freq=$( echo ${config_Post_SeasonalFrequency} |  sed -e "s/[yY]//" )
196#
197an_fin=$(( $( IGCM_date_ConvertGregorianDateToJulian ${PeriodDateEnd} ) / 1000 ))
198an_deb=$( IGCM_date_YearDigit $(( an_fin - freq + 1 )) )
199an_fin=$( IGCM_date_YearDigit ${an_fin} )
200#
201# For each component selected determine which files need post-processing
202#
203for comp in ${config_ListOfComponents[*]} ; do
204    #
205    IGCM_card_DefineArrayFromOption ${CARD_DIR}/config.card ListOfComponents ${comp}
206    eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1
207    #
208    card=${CARD_DIR}/COMP/${compname}.card
209    IGCM_card_DefineArrayFromOption ${card} OutputFiles List
210    #
211    ListFilesName=${compname}_OutputFiles_List
212    eval FileName0=\${${ListFilesName}[0]} > /dev/null 2>&1
213    #
214    if [ X${FileName0} != X${NULL_STR} ] ; then
215        #
216        #IGCM_debug_Print 1 "Component      : ${compname}"
217        #
218        # INITIALISATION
219        #
220        eval NbFiles=\${#${ListFilesName}[@]} > /dev/null 2>&1
221        typeset i=0
222        #
223        until [ $i -eq $NbFiles ]; do
224            #
225            eval file_in_=\${${ListFilesName}[$i]} > /dev/null 2>&1
226            eval file_in=${file_in_}
227            let $(( i_ = i+2 ))
228            eval flag_post_=\${${ListFilesName}[$i_]} > /dev/null 2>&1
229            eval flag_post=${flag_post_}
230            #
231            if [ X${flag_post} != XNONE ] ; then
232                #
233                # Initialize ${flag_post}_${compname}_${post_freq}
234                #
235                eval export ${flag_post}_${compname}_SeasonalFrequency=true
236            fi
237            let $(( i=i+3 ))
238        done
239    fi
240
241    for element in $( env | grep Post_ | grep ${compname}_SeasonalFrequency | grep -i "=true" ) ; do
242        #
243        FILE=$( echo ${element} | awk -F "_${compname}_SeasonalFrequency" '{print $1}' | awk "-FPost_" '{print $2}' )
244        #
245        # CREATE LIST
246        #
247        DIRECTORY=${R_SAVE}/${comp}/Analyse/SE
248        #
249        TestedFile=${config_UserChoices_JobName}_SE_${an_deb}_${an_fin}_${FILE}.nc
250        #
251        IGCM_sys_TestFileArchive ${DIRECTORY}/${TestedFile}
252        if [ ! $? = 0 ] ; then
253            eval set +A LISTE_FILE_${comp} \$\{LISTE_FILE_${comp}[*]} ${FILE}
254            if [ ! ${RebuildFrequency} = true ] ; then
255                IGCM_card_DefineArrayFromOption ${card} Post_${FILE} Patches
256                eval set +A LISTE_PATCHES_${FILE} \$\{${compname}_Post_${FILE}_Patches[*]}
257                if [ X$( eval echo \${LISTE_PATCHES_${FILE}[0]} ) !=  X${NULL_STR} ]; then
258                    for Patch in $( eval echo \${LISTE_PATCHES_${FILE}[*]} ); do
259                        if [ Xload${Patch} != X ] ; then
260                            . ${libIGCM}/libIGCM_post/IGCM_${Patch}.ksh
261                            eval load${Patch}=loaded
262                        fi
263                    done
264                fi
265            fi
266        fi
267             #
268    done     # for element
269done         # for comp
270
271for comp in ${config_ListOfComponents[*]} ; do
272    #
273    eval R_OUT_${comp}=${R_SAVE}/${comp}
274    #
275    i=0
276    for file in $( eval echo \${LISTE_FILE_${comp}[*]} ); do
277        #
278        # Determine in which output can we find file
279        # IE : Output/MO or Output/DA or ...
280        #
281        FlagDir=$( echo ${file} | awk -F "_" '{print $1}' )
282        case ${FlagDir} in
283            1Y)    FreqDir=YE  ;;
284            1M)    FreqDir=MO  ;;
285            5D|1D) FreqDir=DA  ;;
286            HF)    FreqDir=HF  ;;
287            INS)   FreqDir=INS ;;
288        esac
289        #
290        RESULT_SE=${config_UserChoices_JobName}_SE_${an_deb}_${an_fin}_${file}.nc
291        # Do not redoo an existing SE
292        IGCM_sys_TestFileArchive ${R_SAVE}/${comp}/Analyse/SE/${RESULT_SE}
293        if [ $? = 0 ] ; then
294            continue
295        fi
296        #
297        eval file_path=\${R_OUT_${comp}}/Output/${FreqDir}/
298        #
299        case ${config_UserChoices_PeriodLength} in
300        # For Yearly simulation :
301        1Y|1y)
302          (( an = an_deb ))
303          # Initialize array
304          #set -A liste_file_se
305          #set -A liste_file_se_tmp
306          unset liste_file_se
307          unset liste_file_se_tmp
308          while [ ${an} -le ${an_fin} ] ; do
309              moisL=$( IGCM_date_DaysInMonth ${an} ${mois} )
310              #
311              an4=$(printf "%04i\n" ${an} )
312              #
313              diy=$( IGCM_date_DaysInYear $an4 )
314              afin=$( IGCM_date_AddDaysToGregorianDate ${an4}0101 $(( diy - 1 )) )
315              date=${an4}0101_${afin}
316              #set +A liste_file_se ${liste_file_se[*]} ${file_path}${config_UserChoices_JobName}_${date}_${file}.nc
317              #set +A liste_file_se_tmp ${liste_file_se_tmp[*]} ${config_UserChoices_JobName}_${date}_${file}.nc
318              liste_file_se[${#liste_file_se[*]}]=${file_path}${config_UserChoices_JobName}_${date}_${file}.nc
319              liste_file_se_tmp[${#liste_file_se_tmp[*]}]=${config_UserChoices_JobName}_${date}_${file}.nc
320              (( an = an + 1 ))
321          done
322          #
323          IGCM_sys_Get /l liste_file_se[*] ${RUN_DIR_PATH}
324          eval ExitFlag=false
325          IGCM_debug_Verif_Exit_Post
326         
327          # Apply IGCM_Patch if needed
328          if [ ! ${RebuildFrequency} = true ] ; then
329              if [ X$( eval echo \${LISTE_PATCHES_${file}[0]} ) !=  X${NULL_STR} ]; then
330                  for file_t in $( eval echo ${liste_file_se_tmp[*]} ); do
331                      for Patch in $( eval echo \${LISTE_PATCHES_${file}[*]} ); do
332                          IGCM_${Patch} ${file_t}
333                      done
334                  done
335              fi
336          fi
337
338          for mois in  01 02 03 04 05 06 07 08 09 10 11 12 ; do
339          #
340              (( nb = ${mois} - 1 ))
341          #
342              OUT_SE[${nb}]=${config_UserChoices_JobName}_SE${mois}_${an_deb}_${an_fin}_${file}.nc
343              IGCM_sys_ncra -O -d time_counter,${nb},,12 ${liste_file_se_tmp[*]} ${OUT_SE[${nb}]}
344          done
345          IGCM_sys_Rm ${liste_file_se_tmp[*]}
346          eval ExitFlag=false
347          IGCM_debug_Verif_Exit_Post
348          ;;
349        # For Monthly simulation :
350        1M|1m)
351          for mois in  01 02 03 04 05 06 07 08 09 10 11 12 ; do
352              #
353              (( nb = ${mois} - 1 ))
354              #
355              OUT_SE[${nb}]=${config_UserChoices_JobName}_SE${mois}_${an_deb}_${an_fin}_${file}.nc
356              #
357              (( an = an_deb ))
358              # Initialize array
359              #set -A liste_file_se
360              #set -A liste_file_se_tmp
361              unset liste_file_se
362              unset liste_file_se_tmp
363              while [ ${an} -le ${an_fin} ] ; do
364                  moisL=$( IGCM_date_DaysInMonth ${an} ${mois} )
365                  #
366                  an4=$(printf "%04i\n" ${an} )
367                  #
368                  date=${an4}${mois}01_${an4}${mois}${moisL}
369                  #set +A liste_file_se ${liste_file_se[*]} ${file_path}${config_UserChoices_JobName}_${date}_${file}.nc
370                  #set +A liste_file_se_tmp ${liste_file_se_tmp[*]} ${config_UserChoices_JobName}_${date}_${file}.nc
371                  liste_file_se[${#liste_file_se[*]}]=${file_path}${config_UserChoices_JobName}_${date}_${file}.nc
372                  liste_file_se_tmp[${#liste_file_se_tmp[*]}]=${config_UserChoices_JobName}_${date}_${file}.nc
373
374                  (( an = an + 1 ))
375              done
376              #
377              IGCM_sys_Get /l liste_file_se[*] ${RUN_DIR_PATH}
378              eval ExitFlag=false
379              IGCM_debug_Verif_Exit_Post
380             
381              # Apply IGCM_Patch if needed
382              if [ ! ${RebuildFrequency} = true ] ; then
383                  if [ X$( eval echo \${LISTE_PATCHES_${file}[0]} ) !=  X${NULL_STR} ]; then
384                      for file_t in $( eval echo ${liste_file_se_tmp[*]} ); do
385                          for Patch in $( eval echo \${LISTE_PATCHES_${file}[*]} ); do
386                              IGCM_${Patch} ${file_t}
387                          done
388                      done
389                  fi
390              fi
391             
392              IGCM_sys_ncra -O ${liste_file_se_tmp[*]} ${OUT_SE[${nb}]}
393              IGCM_sys_Rm ${liste_file_se_tmp[*]}
394              eval ExitFlag=false
395              IGCM_debug_Verif_Exit_Post
396          done
397          ;;
398        *D|*d)
399          for mois in  01 02 03 04 05 06 07 08 09 10 11 12 ; do
400              #
401              (( nb = ${mois} - 1 ))
402              #
403              OUT_SE[${nb}]=${config_UserChoices_JobName}_SE${mois}_${an_deb}_${an_fin}_${file}.nc
404              #
405              (( an = an_deb ))
406              # Initialize array
407              #set -A liste_file_se
408              #set -A liste_file_se_tmp
409              unset liste_file_se
410              unset liste_file_se_tmp
411              while [ ${an} -le ${an_fin} ] ; do
412                  moisL=$( IGCM_date_DaysInMonth ${an} ${mois} )
413                  #
414                  an4=$(printf "%04i\n" ${an} )
415                  #
416                  length_d=$(( ${config_UserChoices_PeriodLength} - 1 ))
417                  # for one day
418                  if [ ${length_d} -eq 1 ] ; then
419                      (( length_d = 0 ))
420                  fi
421                  (( day  = 1 ))
422                  while [ ${day} -le ${moisL} ] ; do
423                      day2=$(printf "%02i\n" ${day} )
424                      day_beg=${an4}${mois}${day2}
425                      day_end=$( IGCM_date_AddDaysToGregorianDate ${day_beg} ${length_d} )
426                      date=${an4}${mois}${day_beg}_${an4}${mois}${day_end}
427                      #set +A liste_file_se ${liste_file_se[*]} ${file_path}${config_UserChoices_JobName}_${date}_${file}.nc
428                      #set +A liste_file_se_tmp ${liste_file_se_tmp[*]} ${config_UserChoices_JobName}_${date}_${file}.nc
429                      liste_file_se[${#liste_file_se[*]}]=${file_path}${config_UserChoices_JobName}_${date}_${file}.nc
430                      liste_file_se_tmp[${#liste_file_se_tmp[*]}]=${config_UserChoices_JobName}_${date}_${file}.nc
431                      (( day = day + 1 ))
432                  done
433                  (( an = an + 1 ))
434              done
435              #
436              IGCM_sys_Get /l liste_file_se[*] ${RUN_DIR_PATH}
437              eval ExitFlag=false
438              IGCM_debug_Verif_Exit_Post
439             
440              # Apply IGCM_Patch if needed
441              if [ ! ${RebuildFrequency} = true ] ; then
442                  if [ X$( eval echo \${LISTE_PATCHES_${file}[0]} ) !=  X${NULL_STR} ]; then
443                      for file_t in $( eval echo ${liste_file_se_tmp[*]} ); do
444                          for Patch in $( eval echo \${LISTE_PATCHES_${file}[*]} ); do
445                              IGCM_${Patch} ${file_t}
446                          done
447                      done
448                  fi
449              fi
450
451              IGCM_sys_ncra -O ${liste_file_se_tmp[*]} ${OUT_SE[${nb}]}
452              IGCM_sys_Rm ${liste_file_se_tmp[*]}
453              eval ExitFlag=false
454              IGCM_debug_Verif_Exit_Post
455          done
456          ;;
457        esac
458        #
459        IGCM_sys_ncrcat -O ${OUT_SE[*]} ${RESULT_SE}
460        #
461        IGCM_sys_Rm ${OUT_SE[*]}
462        #
463        ${ncatted} -a modulo,time_counter,c,c," " ${RESULT_SE}
464        #
465        eval IGCM_sys_Put_Out ${RESULT_SE} \${R_OUT_${comp}}/Analyse/SE/${RESULT_SE}
466        IGCM_sys_Rm ${RESULT_SE}
467        #
468        eval ExitFlag=false
469        IGCM_debug_Verif_Exit_Post
470    done
471done
472
473# DODS copy
474for comp in ${config_ListOfComponents[*]} ; do
475    IGCM_sys_TestDirArchive ${R_SAVE}/${comp}/Analyse/SE
476    [ $? = 0 ] && IGCM_sys_Put_Dods ${comp}/Analyse/SE
477done
478
479YEARS=${an_deb}_${an_fin}
480
481export POST_DIR; export SUBMIT_DIR; export libIGCM; export R_INIT; export R_BC; export StandAlone
482export RESOL_ATM; export RESOL_OCE ; export RESOL_ICE ; export RESOL_MBG ; export RESOL_SRF ; export RESOL_SBG
483export R_SAVE; export config_UserChoices_JobName; export config_UserChoices_TagName; export YEARS;
484listVarEnv="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"
485export listVarEnv;
486
487#D-
488# --------------------------------------------------------------------
489#D- Test if all was right before ATLAS
490# --------------------------------------------------------------------
491IGCM_debug_Verif_Exit_Post
492
493if [ ${config_UserChoices_TagName} = "IPSLCM4_v1_OASIS3" ] || \
494   [ ${config_UserChoices_TagName} = "IPSLCM4_v2" ]        || \
495   [ ${config_UserChoices_TagName} = "IPSL_ESM_V1" ] ; then
496    #
497    IGCM_sys_QsubPost atlas_ORCHIDEE     ;
498    IGCM_sys_QsubPost atlas_LMDZ         ;
499    IGCM_sys_QsubPost atlas_ORCA_LIM     ;
500    IGCM_sys_QsubPost additionnal        ;
501    #
502elif [ ${config_UserChoices_TagName} = "IPSLCM5" ] ; then
503    IGCM_sys_QsubPost atlas_ORCHIDEE     ;
504    IGCM_sys_QsubPost atlas_LMDZ         ;
505    IGCM_sys_QsubPost atlas_ORCA_LIM     ;
506    #
507elif [ ${config_UserChoices_TagName} = "LMDZ4OR" ]  || \
508     [ ${config_UserChoices_TagName} = "LMDZOR" ]   || \
509     [ ${config_UserChoices_TagName} = "LMDZ4OR_v2" ] ; then
510    #
511    IGCM_sys_QsubPost atlas_LMDZ         ;
512    IGCM_sys_QsubPost atlas_ORCHIDEE     ;
513    #
514elif [ ${config_UserChoices_TagName} = "LMDZ" ] ; then
515    #
516    IGCM_sys_QsubPost atlas_LMDZ         ;
517    #
518elif [ ${config_UserChoices_TagName} = "OL" ]      || \
519     [ ${config_UserChoices_TagName} = "OL2" ] ; then
520    #
521    IGCM_sys_QsubPost atlas_ORCHIDEE     ;
522    #
523elif [ ${config_UserChoices_TagName} = "ORCA2_LIM" ]       ||
524     [ ${config_UserChoices_TagName} = "ORCA2_LIM2" ]      ||
525     [ ${config_UserChoices_TagName} = "ORCA2_LIM2_PISCES" ] ; then
526    #
527    IGCM_sys_QsubPost atlas_ORCA_LIM     ;
528#    IGCM_sys_QsubPost additionnal        ;
529    #
530fi
531
532# Clean RUN_DIR_PATH (necessary for cesium)
533IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH}
Note: See TracBrowser for help on using the repository browser.