Changeset 1634


Ignore:
Timestamp:
03/15/24 16:12:35 (6 weeks ago)
Author:
falletti
Message:

Add of a check of month and day in DateBegin? and DateEnd? (they must be -le than 12 and than 31, respectively). This is done at the beginning of the run.

File:
1 edited

Legend:

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

    r1633 r1634  
    433433  EndYear_p1=$(( $( IGCM_date_ConvertGregorianDateToJulian $DateEnd ) / 1000 + 1 )) 
    434434 
     435  # Check month and day good format 
     436  IGCM_date_GetYearMonthDay $DateBegin date_begin_year date_begin_month date_begin_day 
     437  IGCM_date_GetYearMonthDay $DateEnd date_end_year date_end_month date_end_day 
     438  if [ ${date_begin_month} -gt 12 ] || [ ${date_begin_day} -gt 31 ] || [ ${date_end_month} -gt 12 ] || [ ${date_end_day} -gt 31 ] ; then 
     439          IGCM_debug_Print 1 "Problem with dates in config.card: DateBegin (${DateBegin}) or DateEnd (${DateEnd}) hasve wrong format  
     440          (must be yyymmdd). You must check that." 
     441    IGCM_debug_Exit "IGCM_config_Initialize" " Wrong Dates." 
     442    IGCM_debug_Verif_Exit 
     443  fi   
    435444 
    436445  # Period Length In Days between DateBegin and DateEnd 
Note: See TracChangeset for help on using the changeset viewer.