source: trunk/libIGCM/AA_create_se @ 206

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