Changeset 146


Ignore:
Timestamp:
08/12/09 17:13:34 (15 years ago)
Author:
sdipsl
Message:
  • Definition of Rebuild_DIR has been moved in IGCM_config_Initialize
  • In libIGCM_config : remove expr call. Replaced by $(( ))
Location:
trunk/libIGCM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/AA_job

    r138 r146  
    5454#-Q- sx8mercure #PBS -m a                     # message a la fin du job 
    5555#-Q- sx8mercure #PBS -j o                     # regroupement des sorties du job : standard error et output 
     56#-Q- sx8mercure ####PBS -A gen6178 
    5657#-Q- sx8mercure #PBS -o Script_Output_::Jobname::.000001   # nom du fichier de sortie 
    5758#-Q- sx8mercure #PBS -S /usr/bin/ksh          # shell de soumission 
     
    207208IGCM_sys_MkdirWork ${RUN_DIR} 
    208209IGCM_sys_Cd ${RUN_DIR} 
    209  
    210 # --------------------------------------------------------------------== 
    211 #D- Define REBUILD_DIR :  
    212 #D- where we store files needing rebuild process 
    213 #D-   
    214 # --------------------------------------------------------------------== 
    215 if [ X${config_Post_RebuildFromArchive} = Xtrue ] ; then 
    216     REBUILD_DIR=${R_SAVE}/TMP 
    217     IGCM_sys_MkdirArchive ${REBUILD_DIR} 
    218 else 
    219     REBUILD_DIR=${RUN_DIR} 
    220 fi 
    221210 
    222211# --------------------------------------------------------------------== 
  • trunk/libIGCM/libIGCM_config/libIGCM_config.ksh

    r144 r146  
    114114 
    115115    # Day and Year of Initial State (Given in julian format) 
    116     InitDay=$(  expr $( IGCM_date_ConvertGregorianDateToJulian $DateBegin ) % 1000 ) 
    117     InitYear=$( expr $( IGCM_date_ConvertGregorianDateToJulian $DateBegin ) / 1000 ) 
     116    InitDay=$(( $( IGCM_date_ConvertGregorianDateToJulian $DateBegin ) % 1000 )) 
     117    InitYear=$(( $( IGCM_date_ConvertGregorianDateToJulian $DateBegin ) / 1000 )) 
    118118 
    119119    #================================== 
     
    129129        IGCM_debug_Print 3 "${option} : ${auxprint}" 
    130130    done 
    131  
    132     #================================== 
    133     # Post :  
    134     IGCM_card_DefineArrayFromSection ${SUBMIT_DIR}/config.card Post 
    135  
    136     echo 
    137     IGCM_debug_Print 1 "DefineArrayFromOption : config_Post" 
    138  
    139     for option in ${config_Post[*]} ; do 
    140         IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/config.card Post ${option} 
    141         eval auxprint=\${config_Post_${option}} 
    142         IGCM_debug_Print 3 "${option} : ${auxprint}" 
    143     done 
    144  
    145     IGCM_debug_Print 1 "For now force RebuildFromArchive=true in libIGM_config" 
    146     config_Post_RebuildFromArchive=true 
    147     IGCM_debug_Print 3 "RebuildFromArchive : true" 
    148131 
    149132    #================================================================# 
     
    195178    IGCM_sys_TestDirArchive ${R_SAVE} 
    196179    [ $? != 0 ] && IGCM_debug_Exit "IGCM_sys_TestDirArchive" 
     180 
     181    #================================== 
     182    # Post :  
     183    IGCM_card_DefineArrayFromSection ${SUBMIT_DIR}/config.card Post 
     184 
     185    echo 
     186    IGCM_debug_Print 1 "DefineArrayFromOption : config_Post" 
     187 
     188    for option in ${config_Post[*]} ; do 
     189        IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/config.card Post ${option} 
     190        eval auxprint=\${config_Post_${option}} 
     191        IGCM_debug_Print 3 "${option} : ${auxprint}" 
     192    done 
     193 
     194    # Define REBUILD_DIR : where we store files needing rebuild process 
     195    if [ X${config_Post_RebuildFromArchive} = Xtrue ] ; then 
     196        REBUILD_DIR=${R_SAVE}/TMP 
     197        IGCM_sys_MkdirArchive ${REBUILD_DIR} 
     198    else 
     199        REBUILD_DIR=${RUN_DIR} 
     200    fi 
     201 
     202    IGCM_debug_Print 1 "For now force RebuildFromArchive=true in libIGM_config" 
     203    config_Post_RebuildFromArchive=true 
     204    IGCM_debug_Print 3 "RebuildFromArchive : true" 
    197205 
    198206    #==================================================== 
     
    294302 
    295303        eval PeriodDateBegin=${DateBegin} > /dev/null 2>&1 
    296         PeriodDateEnd=$( IGCM_date_AddDaysToGregorianDate ${DateBegin} $( expr ${PeriodLengthInDays} - 1 ) ) 
     304        PeriodDateEnd=$( IGCM_date_AddDaysToGregorianDate ${DateBegin} $(( ${PeriodLengthInDays} - 1 )) ) 
    297305        eval CumulPeriod=1 > /dev/null 2>&1 
    298306 
     
    534542    #=================================================# 
    535543 
    536     # To use this function, one must copu libIGCM.card from ${libIGCM} directory 
     544    # To use this function, one must copy libIGCM.card from ${libIGCM} directory 
    537545    # and put it in ${SUBMIT_DIR} directory. Ater modifications of ${SUBMIT_DIR}/libIGCM.card, 
    538     # variables define inside [UserChanges] will be modifyd for next Period of libIGCM main loop.  
     546    # variables define inside [UserChanges] will be modified for next Period of libIGCM main loop.  
    539547    if [ -f ${SUBMIT_DIR}/libIGCM.card ] ; then 
    540548        echo 
     
    603611 
    604612    IGCM_config_Analyse_PeriodLength 
    605     PeriodDateEnd=$( IGCM_date_AddDaysToGregorianDate ${PeriodDateBegin} $( expr ${PeriodLengthInDays} - 1 ) ) 
     613    PeriodDateEnd=$( IGCM_date_AddDaysToGregorianDate ${PeriodDateBegin} $(( ${PeriodLengthInDays} - 1 )) ) 
    606614 
    607615    # Debug Print : 
Note: See TracChangeset for help on using the changeset viewer.