Ignore:
Timestamp:
03/17/09 18:53:16 (15 years ago)
Author:
sdipsl
Message:
  • Adaptation to ulam. Need to handle array in a different way
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/AA_create_se

    r59 r66  
    1515#-Q- sx8brodie # @ wall_clock_limit = 10:00:00 
    1616#-Q- sx8brodie # Nom du travail LoadLeveler 
    17 #-Q- sx8brodie # @ job_name   = Sortie    
     17#-Q- sx8brodie # @ job_name   = SE 
    1818#-Q- sx8brodie # Fichier de sortie standard du travail        
    1919#-Q- sx8brodie # @ output     = $(job_name).$(jobid) 
     
    2222#-Q- sx8brodie # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.) 
    2323#-Q- sx8brodie # @ notification = error 
    24 #-Q- sx8brodie # @ environment  = COPY_ALL 
     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 
    2525#-Q- sx8brodie # @ queue 
    2626#-Q- sx8mercure #!/bin/ksh 
     
    187187                # Initialize ${flag_post}_${compname}_${post_freq} 
    188188                # 
    189                 eval ${flag_post}_${compname}_SeasonalFrequency=true 
     189                eval export ${flag_post}_${compname}_SeasonalFrequency=true 
    190190            fi 
    191191            let $(( i=i+3 )) 
     
    193193    fi 
    194194 
    195     for element in $( set | grep Post_ | grep ${compname}_SeasonalFrequency | grep -i "=true" ) ; do 
     195    for element in $( env | grep Post_ | grep ${compname}_SeasonalFrequency | grep -i "=true" ) ; do 
    196196        # 
    197197        FILE=$( echo ${element} | awk -F "_${compname}" '{print $1}' | awk "-FPost_" '{print $2}' ) 
     
    205205        TestedFile=${config_UserChoices_JobName}_SE_${an_deb}_${an_fin}_${FILE}.nc 
    206206        # 
    207         if [ ! -f ${DIRECTORY}/${TestedFile} ] ; then 
     207        IGCM_sys_TestFileArchive ${DIRECTORY}/${TestedFile} 
     208        if [ ! $? = 0 ] ; then 
    208209            eval set +A LISTE_FILE_${comp} \$\{LISTE_FILE_${comp}[*]} ${FILE} 
    209210            eval set +A LISTE_PATCHES_${FILE} \$\{${compname}_Post_${FILE}_Patches[*]} 
     
    242243        RESULT_SE=${config_UserChoices_JobName}_SE_${an_deb}_${an_fin}_${file}.nc 
    243244        # Do not redoo an existing SE 
    244         if [ -f ${R_SAVE}/${comp}/Analyse/SE/${RESULT_SE} ] ; then 
     245        IGCM_sys_TestFileArchive ${R_SAVE}/${comp}/Analyse/SE/${RESULT_SE} 
     246        if [ $? = 0 ] ; then 
    245247            continue 
    246248        fi 
     
    253255          (( an = an_deb )) 
    254256          # Initialize array 
    255           set -A liste_file_se 
    256           set -A liste_file_se_tmp 
     257          #set -A liste_file_se 
     258          #set -A liste_file_se_tmp 
     259          unset liste_file_se 
     260          unset liste_file_se_tmp 
    257261          while [ ${an} -le ${an_fin} ] ; do 
    258262              moisL=$( IGCM_date_DaysInMonth ${an} ${mois} ) 
     
    263267              afin=$( IGCM_date_AddDaysToGregorianDate ${an4}0101 $(( diy - 1 )) ) 
    264268              date=${an4}0101_${afin} 
    265               set +A liste_file_se ${liste_file_se[*]} ${file_path}${config_UserChoices_JobName}_${date}_${file}.nc 
    266               set +A liste_file_se_tmp ${liste_file_se_tmp[*]} ${config_UserChoices_JobName}_${date}_${file}.nc 
     269              #set +A liste_file_se ${liste_file_se[*]} ${file_path}${config_UserChoices_JobName}_${date}_${file}.nc 
     270              #set +A liste_file_se_tmp ${liste_file_se_tmp[*]} ${config_UserChoices_JobName}_${date}_${file}.nc 
     271              liste_file_se[${#liste_file_se[*]}]=${file_path}${config_UserChoices_JobName}_${date}_${file}.nc 
     272              liste_file_se_tmp[${#liste_file_se_tmp[*]}]=${config_UserChoices_JobName}_${date}_${file}.nc 
    267273              (( an = an + 1 )) 
    268274          done 
     
    302308              (( an = an_deb )) 
    303309              # Initialize array 
    304               set -A liste_file_se 
    305               set -A liste_file_se_tmp 
     310              #set -A liste_file_se 
     311              #set -A liste_file_se_tmp 
     312              unset liste_file_se 
     313              unset liste_file_se_tmp 
    306314              while [ ${an} -le ${an_fin} ] ; do 
    307315                  moisL=$( IGCM_date_DaysInMonth ${an} ${mois} ) 
     
    310318                  # 
    311319                  date=${an4}${mois}01_${an4}${mois}${moisL} 
    312                   set +A liste_file_se ${liste_file_se[*]} ${file_path}${config_UserChoices_JobName}_${date}_${file}.nc 
    313                   set +A liste_file_se_tmp ${liste_file_se_tmp[*]} ${config_UserChoices_JobName}_${date}_${file}.nc 
     320                  #set +A liste_file_se ${liste_file_se[*]} ${file_path}${config_UserChoices_JobName}_${date}_${file}.nc 
     321                  #set +A liste_file_se_tmp ${liste_file_se_tmp[*]} ${config_UserChoices_JobName}_${date}_${file}.nc 
     322                  liste_file_se[${#liste_file_se[*]}]=${file_path}${config_UserChoices_JobName}_${date}_${file}.nc 
     323                  liste_file_se_tmp[${#liste_file_se_tmp[*]}]=${config_UserChoices_JobName}_${date}_${file}.nc 
     324 
    314325                  (( an = an + 1 )) 
    315326              done 
     
    343354              (( an = an_deb )) 
    344355              # Initialize array 
    345               set -A liste_file_se 
    346               set -A liste_file_se_tmp 
     356              #set -A liste_file_se 
     357              #set -A liste_file_se_tmp 
     358              unset liste_file_se 
     359              unset liste_file_se_tmp 
    347360              while [ ${an} -le ${an_fin} ] ; do 
    348361                  moisL=$( IGCM_date_DaysInMonth ${an} ${mois} ) 
     
    361374                      day_end=$( IGCM_date_AddDaysToGregorianDate ${day_beg} ${length_d} ) 
    362375                      date=${an4}${mois}${day_beg}_${an4}${mois}${day_end} 
    363                       set +A liste_file_se ${liste_file_se[*]} ${file_path}${config_UserChoices_JobName}_${date}_${file}.nc 
    364                       set +A liste_file_se_tmp ${liste_file_se_tmp[*]} ${config_UserChoices_JobName}_${date}_${file}.nc 
     376                      #set +A liste_file_se ${liste_file_se[*]} ${file_path}${config_UserChoices_JobName}_${date}_${file}.nc 
     377                      #set +A liste_file_se_tmp ${liste_file_se_tmp[*]} ${config_UserChoices_JobName}_${date}_${file}.nc 
     378                      liste_file_se[${#liste_file_se[*]}]=${file_path}${config_UserChoices_JobName}_${date}_${file}.nc 
     379                      liste_file_se_tmp[${#liste_file_se_tmp[*]}]=${config_UserChoices_JobName}_${date}_${file}.nc 
    365380                      (( day = day + 1 )) 
    366381                  done 
Note: See TracChangeset for help on using the changeset viewer.