Changeset 1546 for trunk


Ignore:
Timestamp:
02/09/21 14:28:14 (3 years ago)
Author:
acosce
Message:

modify calcul of CyclicYear_p1, add calcul of CyclicYear_m1
modification done by Xiaoni Wang Faivre for Orchidee group

File:
1 edited

Legend:

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

    r1537 r1546  
    969969  fi 
    970970 
     971 
    971972  #===================================================================# 
    972973  # Calculate CyclicYear to be used for looping over a given forcing  # 
     
    978979  if ( [ ! X${config_UserChoices_CyclicBegin} = X ] && [ ! X${config_UserChoices_CyclicEnd} = X ] ) ; then 
    979980    CycleNb=$(( ${config_UserChoices_CyclicEnd} - ${config_UserChoices_CyclicBegin} + 1 )) 
    980     CyclicYear_p1=NOTDEFINED 
    981  
     981    #CyclicYear_p1=  #NOTDEFINED 
     982   
    982983    # For current year 
    983984    yeartmp=$year 
     
    990991 
    991992    # 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} " 
    10011000  else 
    10021001    CyclicYear="ERROR_CyclicYear_Variable_Not_Defined" 
Note: See TracChangeset for help on using the changeset viewer.