- Timestamp:
- 02/09/21 14:28:14 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_config/libIGCM_config.ksh
r1537 r1546 969 969 fi 970 970 971 971 972 #===================================================================# 972 973 # Calculate CyclicYear to be used for looping over a given forcing # … … 978 979 if ( [ ! X${config_UserChoices_CyclicBegin} = X ] && [ ! X${config_UserChoices_CyclicEnd} = X ] ) ; then 979 980 CycleNb=$(( ${config_UserChoices_CyclicEnd} - ${config_UserChoices_CyclicBegin} + 1 )) 980 CyclicYear_p1=NOTDEFINED981 981 #CyclicYear_p1= #NOTDEFINED 982 982 983 # For current year 983 984 yeartmp=$year … … 990 991 991 992 # For next coming year 992 yeartmp=$(( $year + 1 )) 993 diffy=$(( $yeartmp - ${config_UserChoices_CyclicBegin} )) 994 while [ $diffy -lt 0 ] ; do 995 yeartmp=$(( ${yeartmp} + ${CycleNb} )) 996 diffy=$(( $yeartmp - ${config_UserChoices_CyclicBegin} )) 997 done 998 CyclicYear_p1=$(( ( ${diffy} % ${CycleNb} ) + ${config_UserChoices_CyclicBegin} )) 999 1000 IGCM_debug_Print 1 "CyclicYear = ${CyclicYear}, CyclicYear_p1 = ${CyclicYear_p1}, current year=$year" 993 CyclicYear_p1=$(( CyclicYear + 1 )) 994 995 # For previous year 996 CyclicYear_m1=$(( CyclicYear - 1 )) 997 998 IGCM_debug_Print 1 "CyclicYear = ${CyclicYear}, current year=$year" 999 IGCM_debug_Print 1 "CyclicYear_p1 = ${CyclicYear_p1}, CyclicYear_m1 = ${CyclicYear_m1} " 1001 1000 else 1002 1001 CyclicYear="ERROR_CyclicYear_Variable_Not_Defined"
Note: See TracChangeset
for help on using the changeset viewer.