Changeset 799 for trunk/libIGCM/libIGCM_config/libIGCM_config.ksh
- Timestamp:
- 02/18/13 15:24:22 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_config/libIGCM_config.ksh
r786 r799 408 408 typeset i 409 409 410 # When Cyclic is active, the simulation MUST start with the same year as the CyclicBegin year. 411 if ( [ ! X${config_UserChoices_CyclicBegin} = X ] && [ ! X${config_UserChoices_CyclicEnd} = X ] ) ; then 412 IGCM_debug_Print 1 "Check coherence between CyclicBegin year and DateBegin year" 413 if [ ${InitYear} -ne ${config_UserChoices_CyclicBegin} ] ; then 414 IGCM_debug_Print 1 "The simulation MUST start with the same year as the CyclicBegin year" 415 IGCM_debug_Exit "Check your CyclicBegin option in config.card UserChoices section" 416 fi 417 fi 418 410 419 # Check RebuildFrequency against key frequencies : PeriodLength ; PackFrequency ; TimeSeriesFrequency ; SeasonalFrequency 411 420 if ( [ ! X${config_Post_RebuildFrequency} = X${NULL_STR} ] && [ ! X${config_Post_RebuildFrequency} = XNONE ] ) ; then … … 628 637 #IGCM_debug_Print 1 "jg 1 calculate yyyymm_m1 = ${yyyymm_m1} " 629 638 #IGCM_debug_Print 1 "jg 1 calculate yyyymm_p1 = ${yyyymm_p1} " 639 640 #===================================================================# 641 # Calculate CyclicYear to be used for looping over a given forcing # 642 # period. Add CyclicBegin and CyclicEnd in config.card UserChoices. # 643 #===================================================================# 644 645 # To use the variable CyclicYear, one must add in config.card CyclicBegin and CyclicEnd. 646 # CyclicBegin is the first year in the cycle. CyclicEnd is the last year included in the cycle. 647 # The simulation MUST start with the same year as the CyclicBegin year. 648 if ( [ ! X${config_UserChoices_CyclicBegin} = X ] && [ ! X${config_UserChoices_CyclicEnd} = X ] ) ; then 649 CycleNb=$(( ${config_UserChoices_CyclicEnd} - ${config_UserChoices_CyclicBegin} + 1 )) 650 CyclicYear=$(( ( ( ${year} - ${config_UserChoices_CyclicBegin} ) % ${CycleNb} ) + ${config_UserChoices_CyclicBegin} )) 651 IGCM_debug_Print 1 "CyclicYear = ${CyclicYear} current year=$year" 652 else 653 CyclicYear="ERROR_CyclicYear_Variable_Not_Defined" 654 IGCM_debug_Print 1 "CyclicYear not possible to use without adding CyclicBegin and CyclicEnd in config.card" 655 fi 630 656 631 657 # END: SHOULD GO IN A FUNCTION FROM libIGCM_date.ksh
Note: See TracChangeset
for help on using the changeset viewer.