Ignore:
Timestamp:
07/08/13 19:07:34 (11 years ago)
Author:
sdipsl
Message:
File:
1 edited

Legend:

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

    r891 r892  
    405405  IGCM_debug_PushStack "IGCM_config_DateCoherency" 
    406406 
    407   # If one of the following modulo is not zero : 
    408   # we will issue an error then explain and exit in 
    409   # AA_job IGCM_debug_Verif_Exit call before binary submission 
    410  
    411407  echo 
    412408  IGCM_debug_Print 1 "IGCM_config_DateCoherency" 
     
    430426    ;; 
    431427  esac 
    432   VerifiedPeriodDateEnd=$( IGCM_date_AddDaysToGregorianDate ${DateBegin} ${Length} ) 
     428  VerifiedPeriodDateEnd=$( IGCM_date_AddDaysToGregorianDate ${DateBegin} ${Length}-1 ) 
     429 
     430  if [ ${VerifiedPeriodDateEnd} != ${PeriodDateEnd} ] ; then 
     431    IGCM_debug_Print 1 "From run.card PeriodDateEnd is not consistent with DateBegin and CumulPeriod." 
     432    IGCM_debug_Print 1 "We have DateBegin = ${DateBegin}" 
     433    IGCM_debug_Print 1 "We have CumulPeriod = ${CumulPeriod}" 
     434    IGCM_debug_Print 1 "We have PeriodDateEnd = ${PeriodDateEnd}" 
     435    IGCM_debug_Print 1 "We have VerifiedPeriodDateEnd = ${VerifiedPeriodDateEnd}" 
     436    IGCM_debug_Print 1 "You must have change run.card in an inconsistent way." 
     437 
     438    IGCM_debug_Exit "STOP here to avoid further issues." 
     439  fi 
    433440 
    434441  # PeriodDateBegin + PeriodLength = PeriodDateEnd 
     
    629636    fi 
    630637 
    631     #  
     638    # Determine number of day(s) in PeriodLength 
    632639    IGCM_date_GetYearMonthDay $PeriodDateBegin year month day 
    633640    IGCM_config_DaysInPeriodLength 
     641 
     642    # Check coherency between (PeriodDateBegin, PeriodDateEnd) and (DateBegin, CumulPeriod, PeriodLength) 
     643    IGCM_config_DateCoherency 
     644    # And EXIT if not OK 
     645    IGCM_debug_Verif_Exit 
    634646 
    635647    IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Configuration PeriodState "Running" 
Note: See TracChangeset for help on using the changeset viewer.