Ignore:
Timestamp:
03/12/13 15:25:35 (11 years ago)
Author:
sdipsl
Message:
  • Minimal changes so as to be able to DRYRUN after bash conversion using new_libIGCM function defined here /ccc/cont003/home/dsm/p86mart/.bash_alias see #113 #116
File:
1 edited

Legend:

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

    r819 r829  
    375375    i=0 
    376376    until [ $i -ge $PeriodLengthInMonths ] ; do 
    377       if [ $(( month + i )) -lt 13 ] ; then 
    378         (( PeriodLengthInDays  = PeriodLengthInDays + $( IGCM_date_DaysInMonth $year $(( month + i )) ) )) 
     377      if [ $(( 10#${month} + ${i} )) -lt 13 ] ; then 
     378        (( PeriodLengthInDays  = PeriodLengthInDays + $( IGCM_date_DaysInMonth $year $(( 10#${month} + ${i} )) ) )) 
    379379      else 
    380         (( PeriodLengthInDays  = PeriodLengthInDays + $( IGCM_date_DaysInMonth $year $(( month + i - 12 )) ) )) 
     380        (( PeriodLengthInDays  = PeriodLengthInDays + $( IGCM_date_DaysInMonth $year $(( 10#${month} + ${i} - 12 )) ) )) 
    381381      fi 
    382382      (( i=i+1 )) 
     
    606606  # Compute month_m1 (month minus 1M) 
    607607  # Compute yyyymm_m1 (yyyymm minus 1M) 
    608   month_m1=$(( month - 1 )) 
     608  month_m1=$(( 10#${month} - 1 )) 
    609609  if [ ${month_m1} = 0 ]; then 
    610610    month_m1=12 
     
    618618  # Compute month_p1 (month plus 1M) 
    619619  # Compute yyyymm_p1 (yyyymm plus 1M) 
    620   month_p1=$(( month + 1 )) 
     620  month_p1=$(( 10#${month} + 1 )) 
    621621  if [ ${month_p1} = 13 ]; then 
    622622    month_p1=01 
Note: See TracChangeset for help on using the changeset viewer.