Changeset 2595 for CONFIG


Ignore:
Timestamp:
06/26/15 13:17:19 (6 years ago)
Author:
jgipsl
Message:

Modifications to be used with ORCHIDEE trunk rev 2724 or later.

  • Remove reftemp.nc : not needed anymore for ORCHIDEE trunk rev 2724 or later
  • Coping PFTmap file for current year : since ORCHIDEE trunk rev 2724
  • Moved file_def_orchidee.xml into PARAM directory : add AUTO and revision number for correspondance to ORCHIDEE trunk.
  • orchidee.driver/ stomate.driver :
    • modify to use nonblocker option with IGCM_comp_modifyXmlFile.
    • some homogenization between offline ORCHIDEE_OL and LMDZOR_v6
Location:
CONFIG/UNIFORM/v6/LMDZOR_v6
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • CONFIG/UNIFORM/v6/LMDZOR_v6/EXPERIMENTS/LMDZOR/amip/COMP/orchidee.card

    r2585 r2595  
    1818 
    1919[BoundaryFiles] 
    20 List=(${R_IN}/SRF/PFTmap_1850to2005_AR5_LUHa.rc2/PFTmap_IPCC_${year_p1}.nc, PFTmap.nc) 
     20List=(${R_IN}/SRF/PFTmap_1850to2005_AR5_LUHa.rc2/PFTmap_IPCC_${year}.nc, PFTmap.nc) 
    2121ListNonDel= () 
    2222 
     
    2626[ParametersFiles] 
    2727List=   (${SUBMIT_DIR}/PARAM/orchidee.def_${DefSuffix}, orchidee.def)   ,\ 
     28        (${SUBMIT_DIR}/PARAM/file_def_orchidee.xml, .)                   ,\ 
    2829        (${MODIPSL}/modeles/ORCHIDEE/src_xml/context_orchidee.xml, .)   ,\ 
    29         (${MODIPSL}/modeles/ORCHIDEE/src_xml/field_def_orchidee.xml, .) ,\ 
    30         (${MODIPSL}/modeles/ORCHIDEE/src_xml/file_def_orchidee.xml, .) 
     30        (${MODIPSL}/modeles/ORCHIDEE/src_xml/field_def_orchidee.xml, .) 
    3131 
    3232[RestartFiles] 
  • CONFIG/UNIFORM/v6/LMDZOR_v6/EXPERIMENTS/LMDZOR/amip/COMP/stomate.card

    r2585 r2595  
    99[BoundaryFiles] 
    1010List=   () 
    11 ListNonDel= (${R_IN}/SRF/reftemp.nc, .) 
     11ListNonDel= () 
    1212 
    1313[SmoothFiles] 
  • CONFIG/UNIFORM/v6/LMDZOR_v6/EXPERIMENTS/LMDZOR/clim/COMP/orchidee.card

    r2585 r2595  
    2727[ParametersFiles] 
    2828List=   (${SUBMIT_DIR}/PARAM/orchidee.def_${DefSuffix}, orchidee.def)   ,\ 
     29        (${SUBMIT_DIR}/PARAM/file_def_orchidee.xml, .)                  ,\ 
    2930        (${MODIPSL}/modeles/ORCHIDEE/src_xml/context_orchidee.xml, .)   ,\ 
    30         (${MODIPSL}/modeles/ORCHIDEE/src_xml/field_def_orchidee.xml, .) ,\ 
    31         (${MODIPSL}/modeles/ORCHIDEE/src_xml/file_def_orchidee.xml, .) 
     31        (${MODIPSL}/modeles/ORCHIDEE/src_xml/field_def_orchidee.xml, .) 
    3232 
    3333[RestartFiles] 
  • CONFIG/UNIFORM/v6/LMDZOR_v6/EXPERIMENTS/LMDZOR/clim/COMP/stomate.card

    r2585 r2595  
    99[BoundaryFiles] 
    1010List=   () 
    11 ListNonDel= (${R_IN}/SRF/reftemp.nc, .) 
     11ListNonDel= () 
    1212 
    1313[SmoothFiles] 
  • CONFIG/UNIFORM/v6/LMDZOR_v6/GENERAL/DRIVER/orchidee.driver

    r2582 r2595  
    55{ 
    66    IGCM_debug_PushStack "SRF_Initialize" 
    7  
    8     RESOL_SRF=ALL 
    9  
    10     for frequency in ${config_SRF_WriteFrequency} ; do 
    11         case ${frequency} in 
    12             HF|hf) SRF_ok_hf=y ;; 
    13         esac 
    14     done 
    157 
    168    ##- Define variable DefSuffix set in orchidee.card 
     
    3325    # Activate STOMATE if the compontent SBG=stomate is set in config.card 
    3426    if [ X${config_ListOfComponents_SBG} = Xstomate ] ; then 
     27        # Activate stomate in orchidee.def 
    3528        IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_OK_STOMATE y 
    3629    else 
     30        # Deactivate stomate in orchidee.def 
    3731        IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_OK_STOMATE n 
     32        # Deactivate output files for stomate 
     33        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 enabled .FALSE. 
     34        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 enabled .FALSE. 
    3835    fi 
    3936 
    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. 
     37    # Set default values for sechiba1_enabled, sechiba1_freq and sechiba2_enabled. 
     38    sechiba1_enabled=.FALSE. 
     39    sechiba2_enabled=.FALSE. 
     40    sechiba1_freq=0s 
    4341 
    44     SRF_WriteFrequency=$( echo ${config_SRF_WriteFrequency} | sed -e 's/\([0-9]*[yYmMdDs]\).*/\1/' ) 
    45     case ${SRF_WriteFrequency} in 
    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 ;; 
    78     esac 
     42    # Get WriteFrenquecies from config.card for SECHIBA 
     43    # Note that it is only possible to have one HF and one other option.  
     44    # If more options are set in config.card only the latest will be used. 
     45    for frequency in ${config_SRF_WriteFrequency} ; do 
     46        case ${frequency} in 
     47            *Y|*y)  
     48                NbYears=$( echo ${frequency} | awk -F '[yY]' '{print $1}' ) 
     49                NbDaysYear=$( IGCM_date_DaysInYear ${year} ) 
     50                sechiba1_enabled=.TRUE. 
     51                sechiba1_freq=${NbYears}y 
     52            *M|*m) 
     53                NbMonths=$( echo ${frequency} | awk -F '[mM]' '{print $1}' ) 
     54                sechiba1_enabled=.TRUE. 
     55                sechiba1_freq=${NbMonths}mo 
     56            *D|*d) 
     57                NbDayss=$( echo ${frequency} | awk -F '[dD]' '{print $1}' ) 
     58                sechiba1_enabled=.TRUE. 
     59                sechiba1_freq=${NbDays}d 
     60            *s) 
     61                WriteInSeconds=$( echo ${frequency} | awk -F '[s]' '{print $1}' ) 
     62                sechiba1_enabled=.TRUE. 
     63                sechiba1_freq=${WriteInSeconds}s 
     64            HF|hf)  
     65                SRF_ok_hf=y  
     66                sechiba2_enabled=.TRUE. ;; 
     67            *)  
     68                IGCM_debug_Exit "SRF_Update " ${frequency} " invalid WriteFrequency : choose in xY, xM, xD, xs and HF"  
     69                IGCM_debug_Verif_Exit ;; 
     70        esac 
     71    done 
    7972 
    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 
    85     fi 
     73    # Do the modifications in file_def_orchidee.xml 
     74    IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba1 enabled ${sechiba1_enabled} 
     75    IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba1 output_freq ${sechiba1_freq} 
     76    IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba2 enabled ${sechiba2_enabled} 
    8677 
     78    # Add include of orchidee context in iodef.xml 
     79    # In iodef.xml add on next line after "COMPONENT CONTEXT" 
     80    #  <context id="orchidee" src="./context_orchidee.xml"/> 
     81    echo '<context id="orchidee" src="./context_orchidee.xml"/>' > add.tmp 
     82    cp iodef.xml iodef.xml.tmp 
     83    sed -e "/COMPONENT CONTEXT/r add.tmp" iodef.xml.tmp > iodef.xml 
     84    rm iodef.xml.tmp add.tmp 
     85 
     86 
     87    # Define in orchidee.def if restart file should be used 
    8788    if ( [ ${CumulPeriod} -ne 1 ] || [ "${config_SRF_Restart}" != "n" ] ) ; then 
    8889        IGCM_comp_modifyDefFile blocker orchidee.def SECHIBA_restart_in sechiba_rest_in.nc 
     
    103104    fi 
    104105 
    105     #IGCM_sys_Cp ${RUN_DIR}/orchidee.def ${RUN_DIR}/run.def 
    106     #IGCM_sys_Put_Out ${RUN_DIR}/run.def ${R_SAVE}/${PREFIX}_run.def 
    107  
    108     #Temporary way to fix bug on cimean variable 
    109     IGCM_comp_modifyXmlFile force field_def_orchidee.xml cimean enabled .FALSE. 
    110  
    111     # Add include of orchidee context in iodef.xml 
    112     # In iodef.xml add on next line after "COMPONENT CONTEXT" 
    113     #  <context id="orchidee" src="./context_orchidee.xml"/> 
    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 
    118  
    119106    IGCM_debug_PopStack "SRF_Update" 
    120107} 
     
    125112    IGCM_debug_PushStack "SRF_Finalize" 
    126113 
    127     #IGCM_sys_Put_Out ${RUN_DIR}/used_run.def ${R_SAVE}/${PREFIX}_used_run.def 
    128  
    129     echo FINALIZE SRF !!! 
    130  
    131114    IGCM_debug_PopStack "SRF_Finalize" 
    132115} 
  • CONFIG/UNIFORM/v6/LMDZOR_v6/GENERAL/DRIVER/stomate.driver

    r2582 r2595  
    11#!/bin/ksh 
    22 
    3 #D- Driver du script pour ORCHIDEE 
     3#D- Driver pour ORCHIDEE stomate component 
    44 
    55#----------------------------------------------------------------- 
     
    77{ 
    88    IGCM_debug_PushStack "SBG_Initialize" 
    9  
    10     RESOL_SBG=ALL 
    119 
    1210    IGCM_debug_PopStack "SBG_Initialize" 
     
    1715{ 
    1816    IGCM_debug_PushStack "SBG_Update" 
     17     
     18    # Output management 
    1919 
    20     # Default init : files are desactivated 
    21     IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .FALSE. 
    22     IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .FALSE. 
     20    # Set default values for stomate output files. 
     21    stomate_enabled=.FALSE. 
     22    stomate_freq=0s 
    2323 
     24    # Read WriteFrequency set in config.card section SBG.  
     25    # Only one choice can be set as WriteFrequency. The same choice will be used for  
     26    # both stomate_history and stomate_ipcc_history files.  
    2427    case ${config_SBG_WriteFrequency} in 
    25         *Y|*y) 
    26             WriteInYears=$( echo ${config_SBG_WriteFrequency} | awk -F '[yY]' '{print $1}' ) 
    27             PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' ) 
    28             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE. 
    29             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq ${WriteInYears}y 
    30             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history 
    31             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE. 
    32             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq ${WriteInYears}y 
    33             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history 
    34             ;; 
    35         *M|*m) 
    36             WriteInMonths=$( echo ${config_SBG_WriteFrequency} | awk -F '[mM]' '{print $1}' ) 
    37             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE. 
    38             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq ${WriteInMonths}mo 
    39             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history 
    40             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE. 
    41             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq ${WriteInMonths}mo 
    42             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history 
    43             ;; 
    44         5D|5d) 
    45             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE. 
    46             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq 5d 
    47             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history 
    48             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE. 
    49             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq 5d 
    50             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history 
    51             ;; 
    52         1D|1d) 
    53             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE. 
    54             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq 1d 
    55             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history 
    56             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE. 
    57             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq 1d 
    58             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history 
    59             ;; 
    60         *s) 
    61             WriteInSeconds=$( echo ${config_SBG_WriteFrequency} | awk -F '[s]' '{print $1}' ) 
    62             IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE. 
    63             IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${WriteInSeconds}s 
    64             IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history 
    65             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE. 
    66             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq ${WriteInSeconds}s 
    67             IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history 
    68             ;; 
    69         *) 
    70             IGCM_debug_Exit "SBG_Update " ${config_SBG_WriteFrequency} " invalid WriteFrequency : choose in 1Y, 1M, 5D, 1D." 
    71             IGCM_debug_Verif_Exit ;; 
     28        *Y|*y)  
     29            NbYears=$( echo ${config_SBG_WriteFrequency} | awk -F '[yY]' '{print $1}' ) 
     30            NbDaysYear=$( IGCM_date_DaysInYear ${year} ) 
     31            stomate_enabled=.TRUE. 
     32            stomate_freq=${NbYears}y ;; 
     33        *M|*m)  
     34            NbMonths=$( echo ${config_SBG_WriteFrequency} | awk -F '[mM]' '{print $1}' ) 
     35            stomate_enabled=.TRUE. 
     36            stomate_freq=${NbMonths}mo ;; 
     37        *D|*d) 
     38            NbDays=$( echo ${frequency} | awk -F '[dD]' '{print $1}' ) 
     39            stomate_enabled=.TRUE. 
     40            stomate_freq=${NbDays}d ;; 
     41        *)  
     42            IGCM_debug_Exit "SBG_Update " ${config_SBG_WriteFrequency} " invalid WriteFrequency : choose between xY, xM, xD"  
     43            IGCM_debug_Verif_Exit ;; 
    7244    esac 
    7345 
     46    # Modify file_def_orchidee.xml 
     47    IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 enabled ${stomate_enabled} 
     48    IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 output_freq ${stomate_freq} 
     49    IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 enabled ${stomate_enabled} 
     50    IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 output_freq ${stomate_freq} 
     51     
     52 
     53    # Define in orchidee.def if restart file should be used 
    7454    if ( [ ${CumulPeriod} -eq 1 ] && [ "${config_SBG_Restart}" = "n" ] ) ; then 
    7555        echo "STOMATE : without restart" 
     
    8565function SBG_Finalize 
    8666{ 
    87 #set -vx 
    8867    IGCM_debug_PushStack "SBG_Finalize" 
    89  
    90     if [ $( IGCM_date_DaysBetweenGregorianDate ${PeriodDateEnd} ${year}1230 ) -ge 0 ] ; then 
    91         IGCM_sys_Put_Out stomate_Cforcing.nc ${R_OUT_SBG_R}/${config_UserChoices_JobName}_${PeriodDateEnd}_stomate_Cforcing.nc 
    92         IGCM_sys_Put_Out stomate_forcing.nc  ${R_OUT_SBG_R}/${config_UserChoices_JobName}_${PeriodDateEnd}_stomate_forcing.nc 
    93 #       rm -f stomate_Cforcing.nc 
    94 #       rm -f stomate_forcing.nc 
    95     fi 
    96  
     68     
    9769    IGCM_debug_PopStack "SBG_Finalize" 
    9870} 
Note: See TracChangeset for help on using the changeset viewer.