source: trunk/libIGCM/AA_create_se @ 200

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