Ignore:
Timestamp:
06/25/15 15:37:32 (6 years ago)
Author:
jgipsl
Message:

Update with changes done on v6_rc0 (sdipsl) :

  • remove IOIPSL
  • clean

This is done only for IPSLCM6 and LMDZOR_v6 configurations and only for the part LMDZ and ORCHIDEE.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CONFIG/UNIFORM/v6/LMDZOR_v6/GENERAL/DRIVER/orchidee.driver

    r2410 r2582  
    1515 
    1616    ##- Define variable DefSuffix set in orchidee.card 
    17     ##  This variable is used in orchidee.card to choose  
    18     ##  parameter file(orchidee.def_DefSuffix).  
     17    ##  This variable is used in orchidee.card to choose 
     18    ##  parameter file(orchidee.def_DefSuffix). 
    1919    if [ ! X${orchidee_UserChoices_DefSuffix} = X ] ; then 
    20         DefSuffix=${orchidee_UserChoices_DefSuffix} 
     20        DefSuffix=${orchidee_UserChoices_DefSuffix} 
    2121    else 
    22         DefSuffix=Choi 
     22        DefSuffix=Choi 
    2323    fi 
    2424 
     
    3333    # Activate STOMATE if the compontent SBG=stomate is set in config.card 
    3434    if [ X${config_ListOfComponents_SBG} = Xstomate ] ; then 
    35         IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_OK_STOMATE y 
     35        IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_OK_STOMATE y 
    3636    else 
    37         IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_OK_STOMATE n 
     37        IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_OK_STOMATE n 
    3838    fi 
    3939 
    40     typeset SECHIBA_WRITE_STEP 
     40    # Default init : files are desactivated 
     41    IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .FALSE. 
     42    IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba2 enabled .FALSE. 
    4143 
    42     if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    43         IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .FALSE.  
    44         IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba2 enabled .FALSE.  
    45         IGCM_comp_modifyDefFile nonblocker orchidee.def XIOS_ORCHIDEE_OK y 
    46     else 
    47         IGCM_comp_modifyDefFile nonblocker orchidee.def XIOS_ORCHIDEE_OK n 
    48     fi     
    49  
    50     SRF_WriteFrequency=$( echo ${config_SRF_WriteFrequency} | sed -e 's/\([0-9]*[yYmMdDs]\).*/\1/' )  
     44    SRF_WriteFrequency=$( echo ${config_SRF_WriteFrequency} | sed -e 's/\([0-9]*[yYmMdDs]\).*/\1/' ) 
    5145    case ${SRF_WriteFrequency} in 
    52         *Y|*y)  
    53             WriteInYears=$( echo ${SRF_WriteFrequency} | awk -F '[yY]' '{print $1}' ) 
    54             PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' ) 
    55             (( SECHIBA_WRITE_STEP = PeriodLengthInDays * WriteInYears / PeriodLengthInYears * 86400 ))  
    56             if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    57                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE.  
    58                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${WriteInYears}y 
    59                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history  
    60             fi 
    61             ;; 
    62         1M) 
    63             if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    64                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE.  
    65                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq 1mo 
    66                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history  
    67             fi 
    68             case ${config_UserChoices_PeriodLength} in 
    69             *Y|*y) 
    70                 SECHIBA_WRITE_STEP=-1. 
    71                 ;; 
    72             *M|*m) 
    73                 SECHIBA_WRITE_STEP=-1. 
    74                 ;; 
    75             *) 
    76                 (( SECHIBA_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) * 86400 )) 
    77                 ;; 
    78             esac 
    79             ;; 
    80         *M|*m)  
    81             WriteInMonths=$( echo ${SRF_WriteFrequency} | awk -F '[mM]' '{print $1}' ) 
    82             if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    83                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE.  
    84                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${WriteInMonths}mo 
    85                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history  
    86             fi 
    87             case ${config_UserChoices_PeriodLength} in 
    88             *Y|*y) 
    89                 PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' ) 
    90                 (( SECHIBA_WRITE_STEP = PeriodLengthInDays * 86400 / PeriodLengthInYears / 12  )) 
    91                 ;; 
    92             *M|*m) 
    93                 PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | awk -F '[mM]' '{print $1}' ) 
    94                 (( SECHIBA_WRITE_STEP = PeriodLengthInDays * WriteInMonths  * 86400 / PeriodLengthInMonths  )) 
    95                 ;; 
    96             *) 
    97                 (( SECHIBA_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) * 86400 )) 
    98                 if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    99                     IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE.  
    100                     IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${SECHIBA_WRITE_STEP}s 
    101                     IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history 
    102                 fi 
    103                 ;; 
    104             esac 
    105             ;; 
    106         5D|5d)  
    107             if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    108                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE.  
    109                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq 5d 
    110                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history  
    111             fi 
    112             (( SECHIBA_WRITE_STEP = 5 * 86400 ))  
    113             ;; 
    114         1D|1d)  
    115             if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    116                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE.  
    117                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq 1d 
    118                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history  
    119             fi 
    120             (( SECHIBA_WRITE_STEP = 86400 ))  
    121             ;; 
    122         *s) 
    123             WriteInSeconds=$( echo ${SRF_WriteFrequency} | awk -F '[s]' '{print $1}' ) 
    124             if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    125                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE.  
    126                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${WriteInSeconds}s 
    127                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history  
    128             fi 
    129             (( SECHIBA_WRITE_STEP = WriteInSeconds )) ;; 
    130         *)  
    131             IGCM_debug_Exit "SRF_Update " ${SRF_WriteFrequency} " invalid WriteFrequency : choose in 1Y, 1M, 5D, 1D."  
    132             IGCM_debug_Verif_Exit ;; 
     46        *Y|*y) 
     47            WriteInYears=$( echo ${SRF_WriteFrequency} | awk -F '[yY]' '{print $1}' ) 
     48            PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' ) 
     49            IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE. 
     50            IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${WriteInYears}y 
     51            IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history 
     52            ;; 
     53        *M|*m) 
     54            WriteInMonths=$( echo ${SRF_WriteFrequency} | awk -F '[mM]' '{print $1}' ) 
     55            IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE. 
     56            IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${WriteInMonths}mo 
     57            IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history 
     58            ;; 
     59        5D|5d) 
     60            IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE. 
     61            IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq 5d 
     62            IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history 
     63            ;; 
     64        1D|1d) 
     65            IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE. 
     66            IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq 1d 
     67            IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history 
     68            ;; 
     69        *s) 
     70            WriteInSeconds=$( echo ${SRF_WriteFrequency} | awk -F '[s]' '{print $1}' ) 
     71            IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE. 
     72            IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${WriteInSeconds}s 
     73            IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history 
     74            ;; 
     75        *) 
     76            IGCM_debug_Exit "SRF_Update " ${SRF_WriteFrequency} " invalid WriteFrequency : choose in 1Y, 1M, 5D, 1D." 
     77            IGCM_debug_Verif_Exit ;; 
    13378    esac 
    13479 
    135 #Use of XIOS ouputs only 
    136  
    137     if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    138         (( SECHIBA_WRITE_STEP = 0 )) 
     80    # Outputs HF in HISTFILE2 if required. Output frequency is 3 hours by default. 
     81    if [ X${SRF_ok_hf} = Xy ] ; then 
     82        IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba2 enabled .TRUE. 
     83        IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba2 output_freq 10800s 
     84        IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba2 name sechiba_out_2 
    13985    fi 
    140     IGCM_comp_modifyDefFile nonblocker orchidee.def WRITE_STEP ${SECHIBA_WRITE_STEP} 
    141     IGCM_comp_modifyDefFile nonblocker orchidee.def SECHIBA_HISTLEVEL ${orchidee_UserChoices_sechiba_LEVEL} 
    142  
    143     # Outputs HF in HISTFILE2 if required 
    144     if [ X${SRF_ok_hf} = Xy ] ; then 
    145         IGCM_comp_modifyDefFile nonblocker orchidee.def SECHIBA_HISTFILE2 y 
    146         if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    147             IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba2 enabled .TRUE.  
    148             IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba2 output_freq 10800s 
    149             IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba2 name sechiba_out_2 
    150         fi 
    151     else 
    152         IGCM_comp_modifyDefFile nonblocker orchidee.def SECHIBA_HISTFILE2 n 
    153     fi 
    154     IGCM_comp_modifyDefFile nonblocker orchidee.def SECHIBA_HISTLEVEL2 1 
    155     IGCM_comp_modifyDefFile nonblocker orchidee.def WRITE_STEP2 10800.0 
    15686 
    15787    if ( [ ${CumulPeriod} -ne 1 ] || [ "${config_SRF_Restart}" != "n" ] ) ; then 
    158         IGCM_comp_modifyDefFile blocker orchidee.def SECHIBA_restart_in sechiba_rest_in.nc 
     88        IGCM_comp_modifyDefFile blocker orchidee.def SECHIBA_restart_in sechiba_rest_in.nc 
    15989    else 
    160         IGCM_comp_modifyDefFile blocker orchidee.def SECHIBA_restart_in NONE 
     90        IGCM_comp_modifyDefFile blocker orchidee.def SECHIBA_restart_in NONE 
    16191    fi 
    16292 
    163 # Modify in orchidee.def VEGET_UPDATE and LAND_COVER_CHANGE if they are set in orchidee.card section UserChoices 
     93    # Modify in orchidee.def VEGET_UPDATE and LAND_COVER_CHANGE if they are set in orchidee.card section UserChoices 
    16494    if [ ! X${orchidee_UserChoices_VEGET_UPDATE} = X ] ; then 
    165         IGCM_comp_modifyDefFile nonblocker orchidee.def VEGET_UPDATE   ${orchidee_UserChoices_VEGET_UPDATE} 
     95        IGCM_comp_modifyDefFile nonblocker orchidee.def VEGET_UPDATE   ${orchidee_UserChoices_VEGET_UPDATE} 
    16696    else 
    167         IGCM_comp_modifyDefFile nonblocker orchidee.def VEGET_UPDATE 0Y 
     97        IGCM_comp_modifyDefFile nonblocker orchidee.def VEGET_UPDATE 0Y 
    16898    fi 
    16999    if [ ! X${orchidee_UserChoices_LAND_COVER_CHANGE} = X ] ; then 
    170         IGCM_comp_modifyDefFile nonblocker orchidee.def LAND_COVER_CHANGE ${orchidee_UserChoices_LAND_COVER_CHANGE} 
     100        IGCM_comp_modifyDefFile nonblocker orchidee.def LAND_COVER_CHANGE ${orchidee_UserChoices_LAND_COVER_CHANGE} 
    171101    else 
    172         IGCM_comp_modifyDefFile nonblocker orchidee.def LAND_COVER_CHANGE n 
     102        IGCM_comp_modifyDefFile nonblocker orchidee.def LAND_COVER_CHANGE n 
    173103    fi 
    174104 
     
    176106    #IGCM_sys_Put_Out ${RUN_DIR}/run.def ${R_SAVE}/${PREFIX}_run.def 
    177107 
    178 #Temporary way to fix bug on cimean variable 
    179     IGCM_comp_modifyXmlFile force field_def_orchidee.xml cimean enabled .FALSE.  
     108    #Temporary way to fix bug on cimean variable 
     109    IGCM_comp_modifyXmlFile force field_def_orchidee.xml cimean enabled .FALSE. 
    180110 
    181     if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    182111    # Add include of orchidee context in iodef.xml 
    183112    # In iodef.xml add on next line after "COMPONENT CONTEXT" 
    184113    #  <context id="orchidee" src="./context_orchidee.xml"/> 
    185         echo '<context id="orchidee" src="./context_orchidee.xml"/>' > add.tmp 
    186         cp iodef.xml iodef.xml.tmp 
    187         sed -e "/COMPONENT CONTEXT/r add.tmp" \ 
    188             iodef.xml.tmp > iodef.xml 
    189         rm iodef.xml.tmp add.tmp 
    190     fi 
     114    echo '<context id="orchidee" src="./context_orchidee.xml"/>' > add.tmp 
     115    cp iodef.xml iodef.xml.tmp 
     116    sed -e "/COMPONENT CONTEXT/r add.tmp" iodef.xml.tmp > iodef.xml 
     117    rm iodef.xml.tmp add.tmp 
    191118 
    192119    IGCM_debug_PopStack "SRF_Update" 
Note: See TracChangeset for help on using the changeset viewer.