Changeset 1603


Ignore:
Timestamp:
10/25/23 14:34:02 (6 months ago)
Author:
aclsce
Message:
  • Changed libIGCM behaviour in case of pb in pack_output.job : now, we exit from the job if there is any problem, whatever we are in PROD, DEVT, TEST mode.
  • Specification of pack frequency per file :

In order to reduce the number of inodes, it is possible to specify by file the frequency of packing. The syntax to do that is in the 4th column of OutputFiles? section of the component.card, for example as follows in lmdz.card :
[OutputFiles?]
List= (histmth.nc, ${R_OUT_ATM_O_M}/${PREFIX}_1M_histmth.nc, Post_1M_histmth, 100Y), \

(histday.nc, ${R_OUT_ATM_O_D}/${PREFIX}_1D_histday.nc, Post_1D_histday, 10Y), \

...

In this example, histmth files will be packed every 100 years and histday files will be packed every 10 years.
The pack frequency you defined in config.card is the frequency of pack by default, that means if a specific frequency of pack is specified for a file in a component.card, this file will be packed at the specific frequency whereas all other files will be packed at global pack frequency (specified in config.card) and in this case, the frequency pack (from the config.card) is the frequency the pack_output job will be launched at.
There is a constraint to use this fonctionality : the Packfrequency you defined in config.card must be greater or equal to the pack frequencies you specified for each type of file in component.card, otherwise the computing job will be stopped (with an explicit error message).
Surpack mode :
A surpack mode functionality is available through the use of pack_output.job. To enable this functionality, you have to put "surpack_mode=y" (default value is n). The way to use is similar to restart post-processing pack_output jobs, as indicated here : http://forge.ipsl.jussieu.fr/igcmg_doc/wiki/Doc/CheckDebug#RestartPack_output. You can either use a global pack frequency in config.card or specific pack frequency per file, as explained above.

Location:
trunk/libIGCM
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/AA_SE_Checker

    r1525 r1603  
    212212          # 
    213213          if [ ! X$( eval echo \${${compname}_${flag_post}_Seasonal} ) = XON ] ; then 
     214              (( i_ = i+1 )) 
     215              eval Testvar_=\${${ListFilesName}[$i_]} > /dev/null 2>&1 
     216              eval Testvar=${Testvar_} 
     217              if [[ ${Testvar} =~ [0-9][DMY]$ ]] ; then 
     218                  (( i = i+4 )) 
     219              else 
    214220            (( i=i+3 )) 
     221              fi 
    215222            continue 
    216223          fi 
     
    234241          fi 
    235242        fi 
    236         (( i=i+3 )) # to explore file list 
     243      (( i_ = i+1 )) # to explore file list 
     244      eval Testvar_=\${${ListFilesName}[$i_]} > /dev/null 2>&1 
     245      eval Testvar=${Testvar_} 
     246      if [[ ${Testvar} =~ [0-9][DMY]$ ]] ; then 
     247          (( i = i+4 )) 
     248      else 
     249          (( i=i+3 )) 
     250      fi 
    237251      done            # until [ $i -eq $NbFiles ] 
    238252    fi                  # [ X${FileName0} != X${NULL_STR} ] 
  • trunk/libIGCM/AA_TimeSeries_Checker

    r1525 r1603  
    218218              #IGCM_debug_Print 2 "Empty TS : ${compname}_Post_${FILE}_TimeSeriesVars${Dimension}" 
    219219              #(( i=i+3 )) 
     220                (( i_ = i+1 )) 
     221                eval Testvar_=\${${ListFilesName}[$i_]} > /dev/null 2>&1 
     222                eval Testvar=${Testvar_} 
     223                if [[ ${Testvar} =~ [0-9][DMY]$ ]] ; then 
     224                    (( i = i+4 )) 
     225                else 
     226                    (( i = i+3 )) 
     227                fi           
    220228              continue 
    221229            fi 
     
    447455        fi 
    448456      fi 
     457      (( i_ = i+1 )) 
     458      eval Testvar_=\${${ListFilesName}[$i_]} > /dev/null 2>&1 
     459      eval Testvar=${Testvar_} 
     460      if [[ ${Testvar} =~ [0-9][DMY]$ ]] ; then 
     461          (( i = i+4 )) 
     462      else 
    449463      (( i=i+3 )) 
     464      fi 
    450465    done 
    451466  fi 
  • trunk/libIGCM/AA_create_multi_se

    r1568 r1603  
    291291        # 
    292292        if [ ! X$( eval echo \${${compname}_${flag_post}_Seasonal} ) = XON ] ; then 
     293            (( i_ = i+1 )) 
     294            eval Testvar_=\${${ListFilesName}[$i_]} > /dev/null 2>&1 
     295            eval Testvar=${Testvar_} 
     296            if [[ ${Testvar} =~ [0-9][DMY]$ ]] ; then 
     297                (( i = i+4 )) 
     298            else 
    293299          (( i=i+3 )) 
     300            fi 
    294301          continue 
    295302        fi 
     
    310317        fi 
    311318      fi 
     319      (( i_ = i+1 )) # to explore file list 
     320      eval Testvar_=\${${ListFilesName}[$i_]} > /dev/null 2>&1 
     321      eval Testvar=${Testvar_} 
     322      if [[ ${Testvar} =~ [0-9][DMY]$ ]] ; then 
     323          (( i = i+4 )) 
     324      else 
    312325      (( i=i+3 )) 
     326      fi 
    313327    done # until [ $i -eq $NbFiles ] 
    314328  fi 
  • trunk/libIGCM/AA_create_se

    r1598 r1603  
    308308        # 
    309309        if [ ! X$( eval echo \${${compname}_${flag_post}_Seasonal} ) = XON ] ; then 
     310            (( i_ = i+1 )) 
     311            eval Testvar_=\${${ListFilesName}[$i_]} > /dev/null 2>&1 
     312            eval Testvar=${Testvar_} 
     313            if [[ ${Testvar} =~ [0-9][DMY]$ ]] ; then 
     314                (( i = i+4 )) 
     315            else 
    310316          (( i=i+3 )) 
     317            fi 
    311318          continue 
    312319        fi 
     
    323330        if [ ! $? = 0 ] ; then 
    324331          eval set +A LISTE_FILE_${comp} \$\{LISTE_FILE_${comp}[*]} ${FILE} 
     332          (( i_ = i+1 )) 
     333          eval Testvar_=\${${ListFilesName}[$i_]} > /dev/null 2>&1 
     334          eval Testvar=${Testvar_} 
     335          if [[ ${Testvar} =~ [0-9][DMY]$ ]] ; then 
     336              eval PeriodPack_FileType=${Testvar} 
     337          else 
     338              PeriodPack_FileType=${config_Post_PackFrequency} 
     339          fi 
     340          eval set +A LISTE_PACKFREQUENCY_${comp} \${LISTE_PACKFREQUENCY_${comp}[*]} ${PeriodPack_FileType} 
    325341          if [ ! ${RebuildFrequency} = true ] ; then 
    326342            IGCM_card_DefineArrayFromOption ${card} Post_${FILE} Patches 
     
    337353        fi 
    338354      fi 
     355      (( i_ = i+1 )) 
     356      eval Testvar_=\${${ListFilesName}[$i_]} > /dev/null 2>&1 
     357      eval Testvar=${Testvar_} 
     358      if [[ ${Testvar} =~ [0-9][DMY]$ ]] ; then 
     359          (( i = i+4 )) 
     360      else 
    339361      (( i=i+3 )) 
     362      fi 
    340363    done # until [ $i -eq $NbFiles ] 
    341364  fi 
     
    348371  i=0 
    349372  for file in $( eval echo \${LISTE_FILE_${comp}[*]} ); do 
     373  config_UserChoices_PeriodLength=$( eval echo \${LISTE_PACKFREQUENCY_${comp}[$i]} )  
    350374    # 
    351375    # Determine in which output can we find file 
     
    588612    [ -f ${RESULT_SE} ] && IGCM_sys_Rm ${RESULT_SE} 
    589613    # 
     614    (( i = i + 1 )) 
    590615  done 
    591616done 
  • trunk/libIGCM/AA_create_ts

    r1598 r1603  
    354354          IGCM_debug_Print 3 "Nothing to do for ${FILE} according to ${card}" 
    355355          IGCM_debug_Print 3 "TimeSeriesVars${Dimension} for ${FILE} is empty" 
     356          (( i_ = i+1 )) 
     357          eval Testvar_=\${${ListFilesName}[$i_]} > /dev/null 2>&1 
     358          eval Testvar=${Testvar_} 
     359          if [[ ${Testvar} =~ [0-9][DMY]$ ]] ; then 
     360              (( i = i+4 )) 
     361          else 
    356362          (( i=i+3 )) 
     363          fi           
    357364          continue 
    358365          # 
     
    364371          IGCM_debug_Print 3 "Nothing to do for ${FILE} according to ${card}" 
    365372          IGCM_debug_Print 3 "ChunckJob${Dimension}=OFF for ${FILE} so it has been switched off" 
     373          (( i_ = i+1 )) 
     374          eval Testvar_=\${${ListFilesName}[$i_]} > /dev/null 2>&1 
     375          eval Testvar=${Testvar_} 
     376          if [[ ${Testvar} =~ [0-9][DMY]$ ]] ; then 
     377              (( i = i+4 )) 
     378          else 
    366379          (( i=i+3 )) 
     380          fi            
    367381          continue 
    368382        fi 
     
    374388            IGCM_debug_Print 3 "Nothing to do for ${FILE} TimeSeriesVars${Dimension} according to ${card}" 
    375389            IGCM_debug_Print 3 "Let another chunck task do the job $( eval echo \${${compname}_Post_${FILE}_ChunckJob${Dimension}} )" 
     390          (( i_ = i+1 )) 
     391          eval Testvar_=\${${ListFilesName}[$i_]} > /dev/null 2>&1 
     392          eval Testvar=${Testvar_} 
     393          if [[ ${Testvar} =~ [0-9][DMY]$ ]] ; then 
     394              (( i = i+4 )) 
     395          else 
    376396            (( i=i+3 )) 
     397          fi 
    377398            continue 
    378399          fi 
     
    391412          IGCM_debug_Print 1 "ERROR !! We miss coordinate axis for ${FILE} according to ${card}" 
    392413          IGCM_debug_Print 1 "So no time series will be produced for ${FILE} !!" 
     414          (( i_ = i+1 )) 
     415          eval Testvar_=\${${ListFilesName}[$i_]} > /dev/null 2>&1 
     416          eval Testvar=${Testvar_} 
     417          if [[ ${Testvar} =~ [0-9][DMY]$ ]] ; then 
     418              (( i = i+4 )) 
     419          else 
    393420          (( i=i+3 )) 
     421          fi           
    394422          continue 
    395423          # 
     
    426454          eval set +A LISTE_FILE_${comp} \${LISTE_FILE_${comp}[*]} ${FILE} 
    427455          eval set +A LISTE_AXIS_${FILE} \${${compname}_Post_${FILE}_GatherWithInternal[*]} 
     456          (( i_ = i+1 )) 
     457          eval Testvar_=\${${ListFilesName}[$i_]} > /dev/null 2>&1 
     458          eval Testvar=${Testvar_} 
     459          if [[ ${Testvar} =~ [0-9][DMY]$ ]] ; then 
     460              eval PeriodPack_FileType=${Testvar} 
     461          else 
     462              PeriodPack_FileType=${config_Post_PackFrequency} 
     463          fi 
     464          eval set +A LISTE_PACKFREQUENCY_${comp} \${LISTE_PACKFREQUENCY_${comp}[*]} ${PeriodPack_FileType} 
    428465          # 
    429466          if [ ! X${RebuildFrequency} = Xtrue ] ; then 
     
    441478        fi 
    442479      fi 
     480      (( i_ = i+1 )) 
     481      eval Testvar_=\${${ListFilesName}[$i_]} > /dev/null 2>&1 
     482      eval Testvar=${Testvar_} 
     483      if [[ ${Testvar} =~ [0-9][DMY]$ ]] ; then 
     484          (( i = i+4 )) 
     485      else 
    443486      (( i=i+3 )) 
     487      fi           
    444488    done 
    445489  fi 
     
    497541  # First Time Series Submission 
    498542  FIRST_PASS=TRUE 
    499   Length=$( IGCM_date_DaysInPreviousPeriod ${DateBegin} ${config_UserChoices_PeriodLength} begin) 
    500   DATE_FIN_JOB_B=$( IGCM_date_AddDaysToGregorianDate ${DateBegin} $(( Length - 1 )) ) 
    501543else 
    502544  # Last Completed Time Series 
     
    559601######################################################################## 
    560602 
     603( [ -n "${LEVEL}" ] && [ ${LEVEL} -eq 0 ] ) && NBRE_FILE_TOT=0 || NBRE_FILE_TOT=1 
     604 
     605# THEN FOR EACH FILE TYPE WE LOOP BETWEEN DATE_COURANTE AND DATE_FIN. 
     606for comp in ${config_ListOfComponents[*]} ; do 
     607    # 
     608    IGCM_sys_Mkdir ${RUN_DIR_PATH}/${comp} 
     609      # 
     610    IGCM_sys_Cd ${RUN_DIR_PATH}/${comp} 
     611    # 
     612    eval R_OUT_${comp}=${R_SAVE}/${comp} 
     613    # 
     614    i=0 
     615    # 
     616    for file in $( eval echo \${LISTE_FILE_${comp}[*]} ); do 
     617        config_UserChoices_PeriodLength=$( eval echo \${LISTE_PACKFREQUENCY_${comp}[$i]} ) 
     618        if [ ${FIRST_PASS} = TRUE ] ; then 
     619            Length=$( IGCM_date_DaysInPreviousPeriod ${DateBegin} ${config_UserChoices_PeriodLength} begin)  
     620            DATE_FIN_JOB_B=$( IGCM_date_AddDaysToGregorianDate ${DateBegin} $(( Length - 1 )) ) 
     621        fi 
    561622DATE_COUNT=${DATE_FIN_JOB_B} 
    562623DATE_FIN_JOB_B_LOOP=${DATE_FIN_JOB_B} 
    563  
    564 ( [ -n "${LEVEL}" ] && [ ${LEVEL} -eq 0 ] ) && NBRE_FILE_TOT=0 || NBRE_FILE_TOT=1 
    565  
    566624if [ ${DoJob} = true ] ; then 
    567625  while [ ${DATE_COUNT} -lt ${PeriodDateEnd} ] ; do 
     
    658716 
    659717  # THEN FOR EACH FILE TYPE WE LOOP BETWEEN DATE_COURANTE AND DATE_FIN. 
    660   for comp in ${config_ListOfComponents[*]} ; do 
    661     # 
    662     IGCM_sys_Mkdir ${RUN_DIR_PATH}/${comp} 
    663       # 
    664     IGCM_sys_Cd ${RUN_DIR_PATH}/${comp} 
    665     # 
    666     eval R_OUT_${comp}=${R_SAVE}/${comp} 
    667     # 
    668     i=0 
    669     # 
    670     for file in $( eval echo \${LISTE_FILE_${comp}[*]} ); do 
    671718      # 
    672719      # Determine in which output we can find file 
     
    717764      if [ "${MissingFile}" = "TRUE" ] ; then 
    718765        IGCM_debug_Print 1 "WARNING We skip ${file} type processing" 
    719         continue 
     766                continue 2 
    720767      fi 
    721768 
     
    802849      done                              # for var in ${liste_var} ; do 
    803850      IGCM_sys_Rm ${liste_file_tmp[*]} 
     851            (( CURRENT_LOOP = CURRENT_LOOP + 1 )) 
     852      (( i = i + 1 )) 
    804853    done                                # for file in ${liste_file_brut} do 
    805854  done                                  # for comp in ${config_ListOfComponents[*]} ; do 
    806855  # GO AHEAD IN DEEPEST LOOP 
    807   (( CURRENT_LOOP = CURRENT_LOOP + 1 )) 
    808856done                                    # while [ ${CURRENT_LOOP} -le  ${NBRE_TOUR} ] do 
    809857# FINISH 
  • trunk/libIGCM/AA_pack_output

    r1598 r1603  
    155155DEBUG_debug=${DEBUG_debug:=false} 
    156156 
     157#D- Surpack_mode : to pack existing packs output files  
     158#D- Default : n 
     159surpack_mode=n 
     160 
    157161######################################################################## 
    158162 
     
    231235IGCM_debug_Verif_Exit 
    232236 
    233 IGCM_debug_Print 1 "Check coherence between PackFrequency and PeriodLength" 
    234 IGCM_post_CheckModuloFrequency PeriodPack config_UserChoices_PeriodLength NbPeriodPerFrequency 
    235 # ------------------------------------------------------------------ 
    236 # Test if all was right before proceeding further 
    237 # ------------------------------------------------------------------ 
    238 IGCM_debug_Verif_Exit 
    239  
    240 IGCM_debug_Print 1 "We must process ${NbPeriodPerFrequency} files for each pack" 
    241  
    242237# Init loop 
    243238date_begin_pack=${DateBegin} 
     
    248243IGCM_debug_PrintVariables 3 date_end_simulation 
    249244 
    250 while [ ${date_begin_pack} -le ${date_end_simulation} ] ; do 
    251  
    252   IGCM_debug_PrintVariables 3 number_pack 
    253   DaysTemp=$( IGCM_date_DaysInCurrentPeriod ${date_begin_pack} ${PeriodPack} ) 
    254   date_end_pack=$( IGCM_date_AddDaysToGregorianDate ${date_begin_pack} $(( ${DaysTemp} - 1 )) ) 
    255  
    256   for comp in ${config_ListOfComponents[*]} ; do 
     245# Loop over components 
     246for comp in ${config_ListOfComponents[*]} ; do 
     247 
     248    IGCM_card_DefineArrayFromOption ${SUBMIT_DIR}/config.card ListOfComponents ${comp} 
     249    eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1 
     250    card=${SUBMIT_DIR}/COMP/${compname}.card 
     251    #      
     252    if [ X${surpack_mode} = Xy ] ; then 
     253        dirList=$( find ${R_SAVE}/${comp}/Output -maxdepth 1 -mindepth 1 -type d )   
     254    else 
    257255    dirList=$( find ${R_BUFR}/${comp}/Output -maxdepth 1 -mindepth 1 -type d ) 
     256    fi 
     257    # Loop over directories containing output files 
    258258    for dir in ${dirList} ; do 
    259259      # dirID is like ATM.Output.MO 
     
    266266      # Loop over the file type and pack them when in between date_begin_pack and date_end_pack 
    267267      for myType in ${fileType} ; do 
     268                # Read comp.card and find specific pack period for each type of file 
     269                IGCM_card_DefineArrayFromOption ${card} OutputFiles List 
     270                ListFilesName=${compname}_OutputFiles_List 
     271                eval FileName0=\${${ListFilesName}[0]} > /dev/null 2>&1 
     272 
     273                if [ X${FileName0} != X${NULL_STR} ] ; then 
     274                    eval NbFiles=\${#${ListFilesName}[@]} > /dev/null 2>&1 
     275                     
     276                    (( i=0 )) 
     277                    until [ $i -ge $NbFiles ]; do 
     278                        (( i_ = i+1 )) 
     279                        eval file_out_=\${${ListFilesName}[$i_]} > /dev/null 2>&1 
     280                        eval file_out=${file_out_} 
     281                        (( i_ = i+3 )) 
     282                        eval Testvar_=\${${ListFilesName}[$i_]} > /dev/null 2>&1 
     283                        eval Testvar=${Testvar_} 
     284                        if [[ ${Testvar} =~ [0-9][DMY]$ ]] ; then 
     285                            eval PeriodPack_FileType=${Testvar} 
     286                            ((i = i+4)) 
     287                        else 
     288                            PeriodPack_FileType=${PeriodPack} 
     289                            ((i = i+3)) 
     290                        fi 
     291                        if [[ ${file_out} =~ ${myType} ]] ; then 
     292                            break 
     293                        fi 
     294                    done 
     295                fi 
     296                IGCM_debug_Print 1 "Check coherence between PackFrequency and PeriodLength" 
     297                IGCM_post_CheckModuloFrequency PeriodPack_FileType config_UserChoices_PeriodLength NbPeriodPerFrequency 
     298                # ------------------------------------------------------------------ 
     299                # Test if all was right before proceeding further 
     300                # ------------------------------------------------------------------ 
     301                IGCM_debug_Verif_Exit 
     302                # Initialize date_begin_pack 
     303                date_begin_pack=${DateBegin} 
     304                # Loop over period pack 
     305                while [ ${date_begin_pack} -le ${date_end_simulation} ] ; do 
     306                    DaysTemp=$( IGCM_date_DaysInCurrentPeriod ${date_begin_pack} ${PeriodPack_FileType} ) 
     307                    date_end_pack=$( IGCM_date_AddDaysToGregorianDate ${date_begin_pack} $(( ${DaysTemp} - 1 )) )                    
     308                    # 
    268309        grep ${myType} liste_files.${dirID}.txt > liste_files.${dirID}.${myType}.txt 
    269310        nbfile=0 
     311                    # If no surpack, no need to demigrate. 
     312                    if [ X${surpack_mode} = Xn ] ; then 
    270313        for file in $( gawk '{print $11}' liste_files.${dirID}.${myType}.txt ); do 
    271314          extract_date_file=$( echo ${file}  | sed -e "s/.*${JobName}_[0-9]*_//" ) 
    272315          date_file=$( echo ${extract_date_file} | sed 's/\([0-9]\{8\}\)_.*$/\1/g' ) 
    273316          # echo pack n°${number_pack}  ${date_file} ${date_begin_pack} ${date_end_pack} 
     317                        # Ajouter un test sur la date 
    274318          if [ ${date_file} -le ${date_end_pack} ] && [ ${date_file} -ge ${date_begin_pack} ] ; then 
    275319            echo ${file} >> liste_pack_${myType}_${date_begin_pack}_${date_end_pack}.txt 
     
    278322          fi 
    279323        done 
     324                    else 
     325                        for file in $( gawk '{print $11}' liste_files.${dirID}.${myType}.txt ); do 
     326                            extract_date_file=$( echo ${file}  | sed -e "s/.*${JobName}_[0-9]*_//" ) 
     327                            date_file=$( echo ${extract_date_file} | sed 's/\([0-9]\{8\}\)_.*$/\1/g' ) 
     328                        # echo pack n°${number_pack}  ${date_file} ${date_begin_pack} ${date_end_pack} 
     329                        # Ajouter un test sur la date 
     330                            if [ ${date_file} -le ${date_end_pack} ] && [ ${date_file} -ge ${date_begin_pack} ] ; then 
     331                                echo ${file} >> liste_pack_${myType}_${date_begin_pack}_${date_end_pack}.txt 
     332                                (( nbfile = nbfile + 1 )) 
     333                            fi 
     334                        done 
     335                        # If surpack_mode, archive demigration is needed on TGCC 
     336#-Q- irene-amd ccc_hsm get $( cat liste_pack_${myType}_${date_begin_pack}_${date_end_pack}.txt ) 
     337#-Q- irene ccc_hsm get $( cat liste_pack_${myType}_${date_begin_pack}_${date_end_pack}.txt ) 
     338                        for file in $( gawk '{print $11}' liste_files.${dirID}.${myType}.txt ); do 
     339                            extract_date_file=$( echo ${file}  | sed -e "s/.*${JobName}_[0-9]*_//" ) 
     340                            date_file=$( echo ${extract_date_file} | sed 's/\([0-9]\{8\}\)_.*$/\1/g' ) 
     341                        # echo pack n°${number_pack}  ${date_file} ${date_begin_pack} ${date_end_pack} 
     342                        # Ajouter un test sur la date 
     343                            if [ ${date_file} -le ${date_end_pack} ] && [ ${date_file} -ge ${date_begin_pack} ] ; then 
     344                                ncdump -h ${file} | grep -E 'float|double' | cut -f 1 -d '(' | cut -f 2 -d ' ' >> liste_variables_${myType}_${date_begin_pack}_${date_end_pack}.txt 
     345                            fi 
     346                        done 
     347                    fi 
    280348 
    281349        if [ ${nbfile} = 0 ] ; then 
     
    283351          IGCM_debug_Print 1 "We should have found ${NbPeriodPerFrequency} files" 
    284352          IGCM_debug_Print 1 "As some files can be produced only for some selected period we consider we can move to the next file type" 
     353                        date_begin_pack=$( IGCM_date_AddDaysToGregorianDate ${date_end_pack} 1 ) 
     354                        continue 
     355                    fi 
     356                    if [ X${surpack_mode} = Xy ] &&  [ ${nbfile} = 1 ] ; then 
     357                        IGCM_debug_Print 1 "Only 1 file to pack in surpack mode, nothing to be done" 
     358                        date_begin_pack=$( IGCM_date_AddDaysToGregorianDate ${date_end_pack} 1 ) 
    285359          continue 
    286360        fi 
    287  
    288361        # Select list of variables to work with 
    289362        list_var=$( cat liste_variables_${myType}_${date_begin_pack}_${date_end_pack}.txt | sort | uniq -c | awk -v nbfile=$nbfile '{if ($1 != nbfile) {print $2}}' | paste -s -d ',' ) 
     
    291364        # Create packed files 
    292365        IGCM_debug_Print 1 "Ncrcat ongoing for ${dir} and ${myType}" 
     366                    if [ X${surpack_mode} = Xn ] ; then 
    293367        if [ ! ${nbfile} = ${NbPeriodPerFrequency} ] ; then 
    294368          IGCM_debug_Print 1 "Number of files to process is not equal to what it should be" 
     
    296370          IGCM_debug_Exit "ERROR in number of files to process. STOP HERE INCLUDING THE COMPUTING JOB" 
    297371          IGCM_debug_Verif_Exit 
     372        fi 
    298373        fi 
    299374        output=${JobName}_${date_begin_pack}_${date_end_pack}_${myType} 
     
    309384        IGCM_debug_Verif_Exit 
    310385        # Save it 
     386                    if [ X${surpack_mode} = Xy ] ; then 
     387                        IGCM_sys_Put_Out ${output} ${R_SAVE}/$( echo $dir | sed "s:${R_SAVE}/::" )/${output} 
     388                    else 
    311389        IGCM_sys_Put_Out ${output} ${R_SAVE}/$( echo $dir | sed "s:${R_BUFR}/::" )/${output} 
     390                    fi 
    312391        # Clean file produced by ncrcat 
    313392        IGCM_sys_Rm ${output} 
     
    322401        IGCM_debug_Print 1 "Ncrcat and cleaning done for ${dir} and ${myType}" 
    323402        echo 
     403                    # Add 1 day to date_end_pack to have the new date_begin_pack 
     404                    date_begin_pack=$( IGCM_date_AddDaysToGregorianDate ${date_end_pack} 1 ) 
    324405      done 
    325406    done 
    326407  done 
    327   (( number_pack = number_pack + 1 )) 
    328   # Add 1 day to date_end_pack to have the new date_begin_pack 
    329   date_begin_pack=$( IGCM_date_AddDaysToGregorianDate ${date_end_pack} 1 ) 
    330408done 
    331409 
     
    336414 
    337415# Flush post-processing submission 
     416if [ X${surpack_mode} = Xn ] && [ ${StandAlone} = false ] ; then 
    338417if [ -f ${R_BUFR}/FlushPost_${DateEnd}.ksh ] ; then 
    339418  . ${R_BUFR}/FlushPost_${DateEnd}.ksh 
     
    341420  #IGCM_sys_Rm -f ${R_BUFR}/FlushPost_${DateEnd}.ksh 
    342421fi 
    343  
     422fi 
    344423# Clean RUN_DIR_PATH (necessary for cesium and titane only) 
    345424IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH} 
  • trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh

    r1580 r1603  
    245245          fi 
    246246        fi 
     247        ((i_ = i +1)) 
     248        eval Testvar_=\${${ListFilesName}[$i_]} > /dev/null 2>&1 
     249        eval Testvar=${Testvar_} 
     250        if [[ ${Testvar} =~ [0-9][DMY]$ ]] ; then 
     251            ((i = i+4)) 
     252        else 
    247253        (( i=i+3 )) 
     254        fi 
    248255      done 
    249256    fi 
     
    19191926          fi 
    19201927        fi 
     1928        ((i_ = i_ +1)) 
     1929        eval Testvar_=\${${ListFilesName}[$i_]} > /dev/null 2>&1 
     1930        eval Testvar=${Testvar_} 
     1931        if [[ ${Testvar} =~ [0-9][DMY]$ ]] ; then 
     1932            ((i = i+4)) 
     1933        else 
    19211934        (( i=i+3 )) 
     1935        fi 
    19221936      done 
    19231937    fi 
  • trunk/libIGCM/libIGCM_config/libIGCM_config.ksh

    r1599 r1603  
    692692    Pack=false 
    693693  fi 
     694  # Loop over components 
     695  for comp in ${config_ListOfComponents[*]} ; do 
     696     
     697    IGCM_card_DefineArrayFromOption ${SUBMIT_DIR}/config.card ListOfComponents ${comp} 
     698    eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1 
     699    card=${SUBMIT_DIR}/COMP/${compname}.card 
     700    IGCM_card_DefineArrayFromOption ${card} OutputFiles List 
     701    ListFilesName=${compname}_OutputFiles_List 
     702    eval FileName0=\${${ListFilesName}[0]} > /dev/null 2>&1 
     703    if [ X${FileName0} != X${NULL_STR} ] ; then 
     704        eval NbFiles=\${#${ListFilesName}[@]} > /dev/null 2>&1 
     705                     
     706        (( i=0 )) 
     707        until [ $i -ge $NbFiles ]; do 
     708            (( i_ = i+3 )) 
     709            eval Testvar_=\${${ListFilesName}[$i_]} > /dev/null 2>&1 
     710            eval Testvar=${Testvar_} 
     711            if [[ ${Testvar} =~ [0-9][DMY]$ ]] ; then 
     712                IGCM_debug_Print 1 "Check coherence between PackFrequency and specific pack frequencies" 
     713                DaysTemp1=$( IGCM_date_DaysInPreviousPeriod ${DateBegin} ${Testvar} ) 
     714                DaysTemp2=$( IGCM_date_DaysInPreviousPeriod ${DateBegin} ${config_Post_PackFrequency} ) 
     715                if [ ${DaysTemp2} -lt ${DaysTemp1} ] ; then 
     716                    IGCM_debug_Print 1 "PackFrequency in config.card is smaller than the specific pack frequency" 
     717                    IGCM_debug_Print 1 "we found in ${compname}.card" 
     718                    IGCM_debug_Exit "ERROR You have to modify the PackFrequency in config.card to be always greater or equal to specific pack frequencies defined in comp.card" 
     719                    IGCM_debug_Verif_Exit 
     720                fi 
     721                ((i = i+4)) 
     722            else 
     723                ((i = i+3)) 
     724            fi 
     725        done 
     726    fi 
     727  done 
    694728 
    695729  # modulo (TimeSeriesFrequency and all Chunck2D) must be zero 
  • trunk/libIGCM/libIGCM_debug/libIGCM_debug.ksh

    r1578 r1603  
    880880      case ${postProcessingName} in 
    881881      atlas*|monitoring*|metrics*) 
    882         [ ${postProcessingStopLevel} -gt 2 ] && StopAll=true ;; 
     882        [ ${postProcessingStopLevel} -gt 2 ] && StopAll=true 
     883        echo "The job is not a pack job " 
     884        echo "SO WE DO NOT EXIT THE JOB." 
     885        echo 
     886        date 
     887        ;;  
    883888      create_*) 
    884         [ ${postProcessingStopLevel} -gt 1 ] && StopAll=true ;; 
     889        [ ${postProcessingStopLevel} -gt 1 ] && StopAll=true 
     890        echo "The job is not a pack job " 
     891        echo "SO WE DO NOT EXIT THE JOB." 
     892        echo 
     893        date    
     894        ;; 
    885895      rebuild*|pack_*) 
    886         [ ${postProcessingStopLevel} -gt 0 ] && StopAll=true ;; 
     896          if [ ${postProcessingStopLevel} -gt 0 ] ; then 
     897      # Notify the computing job that something wrong happened and stop it. 
     898              IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Configuration PeriodState "Fatal.${Script_Post_Output}" 
     899          fi 
     900        echo "                        EXIT THE POST-PROCESSING JOB." 
     901        echo 
     902        IGCM_debug_CallStack 
     903 
     904        # Inform the rabbitMQ queue 
     905        IGCM_debug_BigBro_Finalize 
     906 
     907        # And Good Bye 
     908        date 
     909        exit 1 
     910        ;; 
    887911      esac 
    888912      # Notify the computing job that something wrong happened and stop it. 
    889913      ( ${StopAll} ) && IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Configuration PeriodState "Fatal.${Script_Post_Output}" 
    890914 
    891       # If SpaceName is PROD we stop when post_processing failed 
    892       if [ X${config_UserChoices_SpaceName} = XPROD ] ; then 
    893         echo "                        EXIT THE POST-PROCESSING JOB." 
    894         echo 
    895         IGCM_debug_CallStack 
    896  
    897         # Inform the rabbitMQ queue 
    898         IGCM_debug_BigBro_Finalize 
    899  
    900         # And Good Bye 
    901         date 
    902         exit 1 
    903       else 
    904         echo "In config.card the variable SpaceName is not in PROD" 
    905         echo "              SO WE DO NOT EXIT THE JOB." 
    906         echo 
    907         date 
    908       fi 
    909915    elif [ X${TaskType} = Xchecking ] ; then 
    910916      echo "Nothing will happen for now" 
Note: See TracChangeset for help on using the changeset viewer.