Changeset 443


Ignore:
Timestamp:
04/08/11 14:53:08 (13 years ago)
Author:
sdipsl
Message:
  • IGCM_config_Initialize have to handle initial run.card creation not IGCM_config_PeriodStart.
  • Also we need run.card to be there early because IGCM_debug_Verif_Exit will write inside if a problem arise. We dont want for example: 1) you have an error 2) you have another error because I cant report the first error to run.card...
File:
1 edited

Legend:

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

    r439 r443  
    2121    IGCM_debug_Print 1 "IGCM_config_Initialize :" 
    2222    echo 
     23 
     24    if [ ! -r ${SUBMIT_DIR}/run.card ]; then  
     25        #================================================# 
     26        #         The file run.card doesn't exist        # 
     27        #================================================# 
     28        FirstInitialize=true 
     29        #copy initial run.card 
     30        IGCM_sys_Cp ${SUBMIT_DIR}/run.card.init ${SUBMIT_DIR}/run.card 
     31    else 
     32        FirstInitialize=false 
     33    fi 
    2334 
    2435    # Test modipsl tree existence. 
     
    373384    echo 
    374385 
    375     if [ ! -r ${SUBMIT_DIR}/run.card ]; then  
    376  
     386    if ( ${FirstInitialize} ) ; then 
    377387        #================================================# 
    378         #         The file run.card doesn't exist        # 
     388        #         Initialize date/period information     # 
    379389        #================================================# 
    380  
    381         eval FirstInitialize=true 
    382  
    383         #copy initial run.card 
    384         IGCM_sys_Cp ${SUBMIT_DIR}/run.card.init ${SUBMIT_DIR}/run.card 
    385390 
    386391        IGCM_date_GetYearMonth $DateBegin year month 
     
    394399 
    395400        #=================================================# 
    396         #        Creation and write updated run.card      # 
     401        #              Write updated run.card             # 
    397402        #=================================================# 
    398403 
     
    405410        IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Configuration PeriodState "Running" 
    406411  
     412        # It's no more the first time 
     413        FirstInitialize=false 
    407414    else 
    408415        #================================================# 
    409416        #         The file run.card allready exist       # 
    410417        #================================================# 
    411  
    412         eval FirstInitialize=false 
    413418 
    414419        #Test state of run in run.card 
Note: See TracChangeset for help on using the changeset viewer.