source: trunk/libIGCM/AA_create_se @ 135

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