Ignore:
Timestamp:
10/07/11 13:59:22 (12 years ago)
Author:
acosce
Message:

Add Stomate to LMDZORINCA config

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CONFIG/LMDZORINCA/tags/LMDZORINCA_v2/EXP_NMHC_AER/COMP/orchidee.driver

    r858 r1565  
    2424    RESOL_SRF=ALL 
    2525 
     26    for frequency in ${config_SRF_WriteFrequency} ; do 
     27        case ${frequency} in 
     28            HF|hf) SRF_ok_hf=y ;; 
     29        esac 
     30    done 
     31 
    2632    IGCM_debug_PopStack "SRF_Initialize" 
     33} 
     34 
     35#----------------------------------------------------------------- 
     36function SRF_PeriodStart 
     37{ 
     38 
     39    IGCM_debug_PushStack "SRF_PeriodStart" 
     40    if [ ${year} -gt 2004 ] ; then 
     41 
     42        PFTmap="${R_BC}/SRF/LMDZORINCA/ORCHIDEE_PFTmap_2006to2100_AR5_RCP8.5_MESSAGE.nc" 
     43        if [ ${year} -eq 2005 ] ; then 
     44            IGCM_sys_Rm -f PFTmap.nc 
     45        fi 
     46 
     47    else 
     48        PFTmap="${R_BC}/SRF/LMDZORINCA/PFTmap_1850to2005_AR5_LUHa.rc2.nc" 
     49    fi 
     50 
     51    BC_SRF_PFTmap=${PFTmap} 
     52 
     53    IGCM_debug_PopStack "SRF_PeriodStart" 
     54 
    2755} 
    2856 
     
    3462    typeset SECHIBA_WRITE_STEP 
    3563 
    36     case ${config_SRF_WriteFrequency} in 
     64    SRF_WriteFrequency=$( echo ${config_SRF_WriteFrequency} | sed -e 's/\([0-9]*[yYmMdDs]\).*/\1/' )  
     65    case ${SRF_WriteFrequency} in 
    3766        *Y|*y)  
    38             WriteInYears=$( echo ${1} | awk -F '[yY]' "{print ${config_SRF_WriteFrequency}}" ) 
    39             PeriodLengthInYears=$( echo ${1} | awk -F '[yY]' "{print ${config_UserChoices_PeriodLength}}" ) 
     67            WriteInYears=$( echo ${SRF_WriteFrequency} | awk -F '[yY]' '{print $1}' ) 
     68            PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' ) 
    4069            (( SECHIBA_WRITE_STEP = PeriodLengthInDays * WriteInYears / PeriodLengthInYears * 86400 )) ;; 
    41         *M|*m)  
    42             WriteInMonths=$( echo ${1} | awk -F '[mM]' "{print ${config_SRF_WriteFrequency}}" ) 
     70        1M) 
    4371            case ${config_UserChoices_PeriodLength} in 
    4472            *Y|*y) 
    45                 PeriodLengthInYears=$( echo ${1} | awk -F '[yY]' "{print ${config_UserChoices_PeriodLength}}" ) 
     73                SECHIBA_WRITE_STEP=-1. 
     74                ;; 
     75            *M|*m) 
     76                SECHIBA_WRITE_STEP=-1. 
     77                ;; 
     78            *) 
     79                (( SECHIBA_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) * 86400 )) 
     80                ;; 
     81            esac 
     82            ;; 
     83        *M|*m)  
     84            WriteInMonths=$( echo ${SRF_WriteFrequency} | awk -F '[mM]' '{print $1}' ) 
     85            case ${config_UserChoices_PeriodLength} in 
     86            *Y|*y) 
     87                PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' ) 
    4688                (( SECHIBA_WRITE_STEP = PeriodLengthInDays * 86400 / PeriodLengthInYears / 12  )) 
    4789                ;; 
    4890            *M|*m) 
    49                 PeriodLengthInMonths=$( echo ${1} | awk -F '[mM]' "{print ${config_UserChoices_PeriodLength}}" ) 
     91                PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | awk -F '[mM]' '{print $1}' ) 
    5092                (( SECHIBA_WRITE_STEP = PeriodLengthInDays * WriteInMonths  * 86400 / PeriodLengthInMonths  )) 
    5193                ;; 
     
    60102            (( SECHIBA_WRITE_STEP = 86400 )) ;; 
    61103        *s) 
    62             WriteInSeconds=$( echo ${1} | awk -F '[s]' "{print ${config_SRF_WriteFrequency}}" ) 
     104            WriteInSeconds=$( echo ${SRF_WriteFrequency} | awk -F '[s]' '{print $1}' ) 
    63105            (( SECHIBA_WRITE_STEP = WriteInSeconds )) ;; 
    64106        *)  
    65             IGCM_debug_Exit "SRF_Update " ${config_SRF_WriteFrequency} " invalid WriteFrequency : choose in 1Y, 1M, 5D, 1D."  
     107            IGCM_debug_Exit "SRF_Update " ${SRF_WriteFrequency} " invalid WriteFrequency : choose in 1Y, 1M, 5D, 1D."  
    66108            IGCM_debug_Verif_Exit ;; 
    67109    esac 
    68110 
     111    # Dans le cas de test : 
     112#    if [ ${year} -eq 1979 ] ; then 
     113#       ORCHIDEE_sed VEGET_REINIT y 
     114#       ORCHIDEE_sed VEGET_YEAR 131 
     115#    fi 
     116#     
     117#    # Dans le cas historique : 
     118#    if [ ${year} -eq 2005 ] ; then 
     119#       ORCHIDEE_sed VEGET_REINIT y 
     120#       ORCHIDEE_sed VEGET_YEAR 1 
     121##      ORCHIDEE_sed VEGET_UPDATE '0Y' 
     122#    fi 
     123 
     124#     # Dans le cas sans changement de carte aprÚs 2005  
     125#     if [ ${year} -gt 2005 ] ; then 
     126#       ORCHIDEE_sed VEGET_UPDATE '0Y' 
     127#     fi 
     128  
    69129    ORCHIDEE_sed HYDROL_CWRR ${orchidee_UserChoices_NEWHYDROL} 
    70130 
     
    72132    ORCHIDEE_sed SECHIBA_HISTLEVEL ${orchidee_UserChoices_sechiba_LEVEL} 
    73133 
    74 ##    if [ ${year} -eq 1950 ] ; then 
    75 #       ORCHIDEE_sed SECHIBA_HISTFILE2 y 
    76 #       ORCHIDEE_sed SECHIBA_HISTLEVEL2 10 
    77 #       ORCHIDEE_sed WRITE_STEP2 86400.0 
    78 ##    fi 
     134    # Outputs HF in HISTFILE2 if required 
     135    [ X${SRF_ok_hf} = Xy ] && ORCHIDEE_sed SECHIBA_HISTFILE2 y 
     136    ORCHIDEE_sed SECHIBA_HISTLEVEL2 1 
     137    ORCHIDEE_sed WRITE_STEP2 10800.0 
    79138 
    80139    if ( [ ${CumulPeriod} -ne 1 ] || [ "${config_SRF_Restart}" != "n" ] ) ; then 
    81140        ORCHIDEE_sed SECHIBA_restart_in sechiba_rest_in.nc 
     141    fi 
     142 
     143# Desactaivate river routing for high resolution or very low resolution 
     144    if ( [ ${RESOL_ATM_3D} = "280x280x39-ZAf" ] || [ ${RESOL_ATM_3D} = "360x180x19-ZIn" ] || [ ${RESOL_ATM_3D} = "32x24x11" ] ) ; then 
     145        ORCHIDEE_sed  RIVER_ROUTING n 
     146    fi 
     147 
     148# Parameters set in orchidee.card 
     149    if [ ! X${orchidee_UserChoices_VEGET_UPDATE} = X ] ; then 
     150        ORCHIDEE_sed VEGET_UPDATE   ${orchidee_UserChoices_VEGET_UPDATE} 
     151    fi 
     152    if [ ! X${orchidee_UserChoices_LAND_COVER_CHANGE} = X ] ; then 
     153        ORCHIDEE_sed LAND_COVER_CHANGE ${orchidee_UserChoices_LAND_COVER_CHANGE} 
    82154    fi 
    83155 
Note: See TracChangeset for help on using the changeset viewer.