source: CONFIG/UNIFORM/v7/ICOLMDZOR_LAM_v7/GENERAL/DRIVER/stomate.driver @ 6260

Last change on this file since 6260 was 6260, checked in by aclsce, 19 months ago

Added ICOLMDZOR experiments to be used with ICOLMDZOR_LAM configuration.

File size: 5.6 KB
Line 
1#!/bin/ksh
2
3#D- Driver for ORCHIDEE stomate component (SBG)
4
5#-----------------------------------------------------------------
6function SBG_Initialize
7{
8    IGCM_debug_PushStack "SBG_Initialize"
9
10    # Define the resolution only if the composant ICO for DYNAMICO is set in config.card
11    if [ ! X${config_ListOfComponents_ICO} = X ] ; then
12    RESOL_SBG="nbp${RESOL_NBP}"
13    fi
14
15    IGCM_debug_PopStack "SBG_Initialize"
16}
17
18#-----------------------------------------------------------------
19function SBG_Update
20{
21    IGCM_debug_PushStack "SBG_Update"
22   
23    # Output management
24    # Modify file_def_orchidee.xml file using settings from stomate.card
25    # We here suppose that for each file, in stomate.card UserChoices section, if the parameter
26    # output_level_filename is set, then also output_freq_filename must be set. The existance of output_freq_filename will not be checked.
27    # If output_level_filename=NONE or if it is not set, the corresponding file will be deactivated.
28   
29    if [ X${stomate_UserChoices_output_level_stomate_history} = X ] || [ X${stomate_UserChoices_output_level_stomate_history} = XNONE ] ; then
30        # output_level_stomate_history is not set in stomate.card or it is set to NONE.
31        # Deactivate the file.
32        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 enabled .FALSE.
33        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 output_level 0
34        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 output_freq 1mo
35    else
36        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 enabled      .TRUE.
37        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 output_level ${stomate_UserChoices_output_level_stomate_history}
38        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 output_freq  ${stomate_UserChoices_output_freq_stomate_history}
39        IGCM_comp_modifyXmlFile force      file_def_orchidee.xml groupremap_stomate1 group_ref remap_${stomate_UserChoices_output_freq_stomate_history}
40    fi
41   
42    if [ X${stomate_UserChoices_output_level_stomate_ipcc_history} = X ] || [ X${stomate_UserChoices_output_level_stomate_ipcc_history} = XNONE ] ; then
43        # output_level_stomate_ipcc_history is not set in stomate.card or it is set to NONE.
44        # Deactivate the file.
45        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 enabled .FALSE.
46        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 output_level 0
47        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 output_freq 1mo
48    else
49        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 enabled      .TRUE.
50        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 output_level ${stomate_UserChoices_output_level_stomate_ipcc_history}
51        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 output_freq  ${stomate_UserChoices_output_freq_stomate_ipcc_history}
52        IGCM_comp_modifyXmlFile force      file_def_orchidee.xml groupremap_stomate2 group_ref remap_${stomate_UserChoices_output_freq_stomate_ipcc_history}
53    fi
54
55       
56    if [ X${stomate_UserChoices_output_level_stomate_history_4dim} = X ] || [ X${stomate_UserChoices_output_level_stomate_history_4dim} = XNONE ] ; then
57        # output_level_stomate_history_4dim is not set in stomate.card or it is set to NONE.
58        # Deactivate the file.
59        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate3 enabled .FALSE.
60        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate3 output_level 0
61        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate3 output_freq 1mo
62    else
63        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate3 enabled      .TRUE.
64        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate3 output_level ${stomate_UserChoices_output_level_stomate_history_4dim}
65        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate3 output_freq  ${stomate_UserChoices_output_freq_stomate_history_4dim}
66        IGCM_comp_modifyXmlFile force      file_def_orchidee.xml groupremap_stomate3 group_ref remap_${stomate_UserChoices_output_freq_stomate_history_4dim}
67    fi
68
69
70    # Define in orchidee.def if restart file should be used
71    if ( [ ${CumulPeriod} -eq 1 ] && [ "${config_SBG_Restart}" = "n" ] ) ; then
72        echo "STOMATE : without restart"
73        IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_RESTART_FILEIN NONE
74    else
75        IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_RESTART_FILEIN stomate_rest_in.nc
76    fi
77
78
79    # Modify in orchidee.def NINPUT_UPDATE if it is set in stomate.card section UserChoices
80    # NINPUT_UPDATE inidcates if the nitrogen maps should be updated and at which frequency
81    if [ ! X${stomate_UserChoices_NINPUT_UPDATE} = X ] ; then
82        # Take the value from stomate.card
83        IGCM_comp_modifyDefFile nonblocker orchidee.def NINPUT_UPDATE   ${stomate_UserChoices_NINPUT_UPDATE}
84    else
85        # Set default value 0Y
86        IGCM_comp_modifyDefFile nonblocker orchidee.def NINPUT_UPDATE 0Y
87    fi
88
89    # Modify in orchidee.def STOMATE_IMPOSE_CN if it is set in stomate.card section UserChoices
90    # STOMATE_IMPOSE_CN inidcates if the nitrogen should be imposed or not.
91    if [ ! X${stomate_UserChoices_STOMATE_IMPOSE_CN} = X ] ; then
92        # Take the value from stomate.card
93        IGCM_comp_modifyDefFile nonblocker orchidee.def STOMATE_IMPOSE_CN   ${stomate_UserChoices_STOMATE_IMPOSE_CN}
94    else
95        # Set default value n (nitrogen is not imposed)
96        IGCM_comp_modifyDefFile nonblocker orchidee.def STOMATE_IMPOSE_CN n
97    fi
98
99
100    IGCM_debug_PopStack "SBG_Update"
101}
102
103#-----------------------------------------------------------------
104function SBG_Finalize
105{
106    IGCM_debug_PushStack "SBG_Finalize"
107   
108    IGCM_debug_PopStack "SBG_Finalize"
109}
Note: See TracBrowser for help on using the repository browser.