Ignore:
Timestamp:
02/05/18 10:30:20 (6 years ago)
Author:
jgipsl
Message:

Changed strategy for settings for output files for ORCHIDEE. Activate files, output level and output frequency are now set from orchidee.card and stomate.card. WriteFrequancy in config.card is not used any more for ORCHIDEE (SRF and SBG).

File:
1 edited

Legend:

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

    r3505 r3563  
    11#!/bin/ksh 
    22 
    3 #D- Driver pour ORCHIDEE stomate component 
     3#D- Driver for ORCHIDEE stomate component (SBG) 
    44 
    55#----------------------------------------------------------------- 
     
    1717     
    1818    # Output management 
    19  
    20     # Set default values for stomate output files. 
    21     stomate_enabled=.FALSE. 
    22     stomate_freq=0s 
    23  
    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.  
    27     for frequency in ${config_SBG_WriteFrequency} ; do 
    28         case ${frequency} in 
    29             *Y|*y)  
    30                 NbYears=$( echo ${frequency} | awk -F '[yY]' '{print $1}' ) 
    31                 NbDaysYear=$( IGCM_date_DaysInYear ${year} ) 
    32                 stomate_enabled=.TRUE. 
    33                 stomate_freq=${NbYears}y ;; 
    34             *M|*m)  
    35                 NbMonths=$( echo ${frequency} | awk -F '[mM]' '{print $1}' ) 
    36                 stomate_enabled=.TRUE. 
    37                 stomate_freq=${NbMonths}mo ;; 
    38             *D|*d) 
    39                 NbDays=$( echo ${frequency} | awk -F '[dD]' '{print $1}' ) 
    40                 stomate_enabled=.TRUE. 
    41                 stomate_freq=${NbDays}d ;; 
    42             *)  
    43                 IGCM_debug_Exit "SBG WriteFrequency=${frequency} is invalid. Choose between xY, xM and xD for Stomate." ;; 
    44         esac 
    45     done 
    46  
    47     if [ X"$( echo ${config_UserChoices_ExpType} | grep CMIP6 )" != "X" ] ; then        
    48         stomate_enabled=.FALSE. 
     19    # Modify file_def_orchidee.xml file using settings from stomate.card 
     20    # We here suppose that for each file, in stomate.card UserChoices section, if the parameter  
     21    # output_level_filename is set, then also output_freq_filename must be set. The existance of output_freq_filename will not be checked.  
     22    # If output_level_filename=NONE or if it is not set, the corresponding file will be deactivated. 
     23     
     24    if [ X${stomate_UserChoices_output_level_stomate_history} = X ] || [ X${stomate_UserChoices_output_level_stomate_history} = XNONE ] ; then 
     25        # output_level_stomate_history is not set in stomate.card or it is set to NONE. 
     26        # Deactivate the file. 
     27        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 enabled .FALSE. 
     28        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 output_level 0 
     29        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 output_freq 1mo 
     30    else 
     31        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 enabled      .TRUE. 
     32        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 output_level ${stomate_UserChoices_output_level_stomate_history} 
     33        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 output_freq  ${stomate_UserChoices_output_freq_stomate_history} 
     34    fi 
     35     
     36    if [ X${stomate_UserChoices_output_level_stomate_ipcc_history} = X ] || [ X${stomate_UserChoices_output_level_stomate_ipcc_history} = XNONE ] ; then 
     37        # output_level_stomate_ipcc_history is not set in stomate.card or it is set to NONE. 
     38        # Deactivate the file. 
     39        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 enabled .FALSE. 
     40        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 output_level 0 
     41        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 output_freq 1mo 
     42    else 
     43        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 enabled      .TRUE. 
     44        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 output_level ${stomate_UserChoices_output_level_stomate_ipcc_history} 
     45        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 output_freq  ${stomate_UserChoices_output_freq_stomate_ipcc_history} 
    4946    fi 
    5047 
    51     # Modify file_def_orchidee.xml 
    52     IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 enabled ${stomate_enabled} 
    53     IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 output_freq ${stomate_freq} 
    54     IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 enabled ${stomate_enabled} 
    55     IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 output_freq ${stomate_freq} 
    56      
     48         
    5749 
    5850    # Define in orchidee.def if restart file should be used 
Note: See TracChangeset for help on using the changeset viewer.