source: trunk/libIGCM/AA_create_se @ 222

Last change on this file since 222 was 222, checked in by aclsce, 14 years ago
  • Added titane (CCRT Xeon machine) as target machine :

for the moment, post-treatment will be done on cesium.

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