Changeset 902


Ignore:
Timestamp:
08/07/13 18:03:59 (11 years ago)
Author:
sdipsl
Message:
  • further enhance messages when we bring in restart files
  • whitespace-cleanup
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh

    r897 r902  
    2525  for comp in ${config_ListOfComponents[*]} ; do 
    2626 
    27     # Define component  
     27    # Define component 
    2828    IGCM_card_DefineArrayFromOption ${SUBMIT_DIR}/config.card ListOfComponents ${comp} 
    2929    eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1 
     
    5050    eval config_comp=\${config_${comp}[*]} > /dev/null 2>&1 
    5151    for option in ${config_comp[*]} ; do 
    52         IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/config.card ${comp} ${option} 
     52        IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/config.card ${comp} ${option} 
    5353    done 
    5454    IGCM_debug_Print 3 " Found in section config_${comp} :  ${config_comp[*]} " 
     
    265265  echo 
    266266 
    267   # Only the first time step need InitialStateFiles  
     267  # Only the first time step need InitialStateFiles 
    268268  # otherwise it's BoundaryConditions 
    269269  if ( ${FirstInitialize} ) ; then 
    270     typeset comp compname comptagname card ListFilesName FileName0 NbFiles i i_  
    271     typeset file_in_ file_in file_out_ file_out do_init  
     270    typeset comp compname comptagname card ListFilesName FileName0 NbFiles i i_ 
     271    typeset file_in_ file_in file_out_ file_out do_init 
    272272    for comp in ${config_ListOfComponents[*]} ; do 
    273273      # Initialize 
     
    288288 
    289289      if [ "${do_init}" = "y" ] ; then 
    290         # Define component  
     290        # Define component 
    291291        eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1 
    292292        eval comptagname=\${config_ListOfComponents_${comp}[1]} > /dev/null 2>&1 
     
    329329#======================================================================= 
    330330# Definition of Smooth modulo function 
    331 # usage :  
     331# usage : 
    332332# IGCM_SmoothModulo StringModulo value 
    333333# 
     
    335335# [min]:[modulo:][max] 
    336336# where : 
    337 # [] value are optionnals;  
     337# [] value are optionnals; 
    338338# empty min equal 1 
    339339# empty max equal infinity 
     
    343343# value : the value to test with the definition 
    344344# 
    345 # return : true(1)/false(0)  
     345# return : true(1)/false(0) 
    346346function IGCM_SmoothModulo 
    347347{ 
     
    356356  arr[2]=${defVector[2]} 
    357357 
    358   # Test limits :  
    359   # ${defVector[0]} <= ${2} <= ${defVector[2]}  
     358  # Test limits : 
     359  # ${defVector[0]} <= ${2} <= ${defVector[2]} 
    360360  #          or ${defVector[2]} == -1 
    361361  if ( [ ${2} -ge ${defVector[0]} ] && ( [ ${2} -le ${defVector[2]} ] || [ ${defVector[2]} -lt 0 ] ) ) ; then 
     
    460460  echo 
    461461 
    462   typeset comp compname comptagname card ListFilesName FileName0 NbFiles i i_  
    463   typeset file_in_ file_in file_out_ file_out  
     462  typeset comp compname comptagname card ListFilesName FileName0 NbFiles i i_ 
     463  typeset file_in_ file_in file_out_ file_out 
    464464 
    465465  if [ ${Period} = 1 ]; then 
     
    574574  typeset comp compname comptagname card ListFilesName FileName0 NbFiles i i_ file_in file_out 
    575575  for comp in ${config_ListOfComponents[*]} ; do 
    576     # Define component  
     576    # Define component 
    577577    eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1 
    578578    eval comptagname=\${config_ListOfComponents_${comp}[1]} > /dev/null 2>&1 
     
    596596        (( i_ = i+1 )) 
    597597        eval file_out_=\${${ListFilesName}[$i_]} > /dev/null 2>&1 
    598         eval file_out=${file_out_}  
    599  
    600         IGCM_sys_Cp ${file_in} ${file_out}  
     598        eval file_out=${file_out_} 
     599 
     600        IGCM_sys_Cp ${file_in} ${file_out} 
    601601        IGCM_comp_PrepareDeletedFiles ${file_in} ${file_out} 
    602602 
     
    621621  typeset Date_tmp Date_r Path_r do_start CompOldName Path_OUT Path_BUF 
    622622  typeset Buffered Archived Tared PotentialTarFile IsMatching TarFileFound 
    623   typeset comp compname comptagname card ListFilesName FileName0 NbFiles i i_  
     623  typeset comp compname comptagname card ListFilesName FileName0 NbFiles i i_ 
    624624  typeset file_in file_out file_in_ file_out_ file_in_Name 
    625625  typeset -Z4 j4 
     
    629629 
    630630  for comp in ${config_ListOfComponents[*]} ; do 
    631     # Define component  
     631    # Define component 
    632632    eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1 
    633633    eval comptagname=\${config_ListOfComponents_${comp}[1]} > /dev/null 2>&1 
     
    723723              IGCM_debug_Print 3 "No restart file in the buffer nor in the archive directory" 
    724724              IGCM_debug_Print 3 "${Path_OUT}*.${extension_in} do not exist" 
    725               IGCM_debug_Print 3 "Tared restart case then" 
     725              IGCM_debug_Print 3 "Restart files will now be searched for in : ${RestartPath}/${RestartJobName}/RESTART" 
    726726              Buffered=false 
    727727              Archived=false 
     
    743743                  done 
    744744                else 
    745                   IGCM_debug_Print 3 "${RestartPath}/${RestartJobName}/RESTART do not currently exist" 
    746                   IGCM_debug_Print 3 "It must exist and contain tared restart files" 
     745                  IGCM_debug_Print 3 "Restart files were not found!" 
     746                  IGCM_debug_Print 3 "Restart files have been searched for in buffer and archive directory." 
     747                  IGCM_debug_Print 3 "They have been searched for in packed and unpacked format." 
    747748                  IGCM_debug_Exit "Please double check restart settings in config.card" 
    748749                  IGCM_debug_Verif_Exit 
     
    837838          else 
    838839            IGCM_debug_Print 3 "No restart file in the buffer nor in the archive directory" 
    839             IGCM_debug_Print 3 "Tared restart case then" 
     840            IGCM_debug_Print 3 "Restart files will now be searched for in : ${R_SAVE}/RESTART" 
    840841            Buffered=false 
    841842            Archived=false 
     
    910911  echo 
    911912 
    912   typeset ExeNameIn ExeNameOut  
     913  typeset ExeNameIn ExeNameOut 
    913914  typeset comp compname comptagname 
    914915  for comp in ${config_ListOfComponents[*]} ; do 
    915     # Define component  
     916    # Define component 
    916917    eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1 
    917918    eval comptagname=\${config_ListOfComponents_${comp}[1]} > /dev/null 2>&1 
     
    941942  echo 
    942943 
    943   typeset ExeNameIn ExeNameOut  
     944  typeset ExeNameIn ExeNameOut 
    944945  typeset comp compname comptagname 
    945946  for comp in ${config_ListOfComponents[*]} ; do 
    946     # Define component  
     947    # Define component 
    947948    eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1 
    948949    eval comptagname=\${config_ListOfComponents_${comp}[1]} > /dev/null 2>&1 
     
    10051006 
    10061007  for comp in ${config_ListOfComponents[*]} ; do 
    1007     # Define component  
     1008    # Define component 
    10081009    eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1 
    10091010    eval comptagname=\${config_ListOfComponents_${comp}[1]} > /dev/null 2>&1 
     
    11281129        generic_restart_file_name_outin=$( basename ${file_outin} .nc ) 
    11291130 
    1130         nb_restart_file=$( ls ${generic_restart_file_name_in}_????.nc 2>/dev/null | wc -l )  
     1131        nb_restart_file=$( ls ${generic_restart_file_name_in}_????.nc 2>/dev/null | wc -l ) 
    11311132        if [ ${nb_restart_file} -gt 1 ] ; then 
    11321133          j=0                                     # BASH LINE NOT NEEDED 
Note: See TracChangeset for help on using the changeset viewer.