Ignore:
Timestamp:
06/26/15 13:17:19 (9 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
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.