- Timestamp:
- 01/09/19 14:18:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CONFIG/UNIFORM/v6/LMDZORINCAREPR_v6/GENERAL/DRIVER/orchidee.driver
r3559 r4208 34 34 # Deactivate output files for stomate 35 35 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 enabled .FALSE. 36 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 output_level 0 36 37 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 output_freq 1mo 37 38 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 enabled .FALSE. 39 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 output_level 0 38 40 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 output_freq 1mo 39 41 fi … … 46 48 fi 47 49 50 # Set VEGET_UPDATE=1Y in orchidee.def if VEGET_UPDATE_at_start=y in orchidee.card and if it is the first cumul periond (start of new simulation) 51 if [ X${orchidee_UserChoices_VEGET_UPDATE_at_start} = Xy ] && [ ${CumulPeriod} -eq 1 ] ; then 52 IGCM_comp_modifyDefFile nonblocker orchidee.def VEGET_UPDATE 1Y 53 fi 54 48 55 # Modify in orchidee.def VEGET_UPDATE if it is set in orchidee.card section UserChoices 56 # Note: if the variable has been set by VEGET_UPDATE_at_start, this section will not overwrite it. 49 57 if [ ! X${orchidee_UserChoices_VEGET_UPDATE} = X ] ; then 50 58 IGCM_comp_modifyDefFile nonblocker orchidee.def VEGET_UPDATE ${orchidee_UserChoices_VEGET_UPDATE} 51 59 else 52 60 IGCM_comp_modifyDefFile nonblocker orchidee.def VEGET_UPDATE 0Y 61 fi 62 63 # Set LAI_MAP in orchidee.def acording to value set in orchidee.card section UserChoices 64 # If LAI_MAP is not definded in orchidee.card, set default value n 65 # Note: this option is only read by ORCHIDEE if starting without restart files 66 if [ ! X${orchidee_UserChoices_LAI_MAP} = X ] ; then 67 IGCM_comp_modifyDefFile nonblocker orchidee.def LAI_MAP ${orchidee_UserChoices_LAI_MAP} 68 else 69 IGCM_comp_modifyDefFile nonblocker orchidee.def LAI_MAP DEFAULT 70 fi 71 72 # Set DO_WOOD_HARVEST in orchidee.def acording to value set in orchidee.card section UserChoices 73 # If DO_WOOD_HARVEST is not definded in orchidee.card, set default value y 74 if [ ! X${orchidee_UserChoices_DO_WOOD_HARVEST} = X ] ; then 75 IGCM_comp_modifyDefFile nonblocker orchidee.def DO_WOOD_HARVEST ${orchidee_UserChoices_DO_WOOD_HARVEST} 76 else 77 IGCM_comp_modifyDefFile nonblocker orchidee.def DO_WOOD_HARVEST DEFAULT 53 78 fi 54 79 … … 62 87 63 88 ## 2. Mangement of output and modifications of related xml files 64 65 # Set default values for sechiba1_enabled and sechiba1_freq. 66 # These variables are used only to modify file_def_orchidee.xml 67 sechiba1_enabled=.FALSE. 68 sechiba2_enabled=.FALSE. 69 sechiba1_freq=0s 70 sechiba2_freq=0s 71 72 73 # Get WriteFrenquecy for SRF (SECHIBA) from config.card 74 # 1 or 2 frequencies can be set in WriteFrenquecy for SRF 75 # The first frequency will always be used for the sechiba_history file and the 76 # second frequency will be used for the sechiba_out_2.nc file. 77 # The files are activated only if its corresponding frequency is set in WriteFrequency 78 ifreq=0 79 for frequency in ${config_SRF_WriteFrequency} ; do 80 case ${frequency} in 81 *Y|*y) 82 NbYears=$( echo ${frequency} | awk -F '[yY]' '{print $1}' ) 83 NbDaysYear=$( IGCM_date_DaysInYear ${year} ) 84 file_enabled=.TRUE. 85 file_freq=${NbYears}y ;; 86 *M|*m) 87 NbMonths=$( echo ${frequency} | awk -F '[mM]' '{print $1}' ) 88 file_enabled=.TRUE. 89 file_freq=${NbMonths}mo ;; 90 *D|*d) 91 NbDays=$( echo ${frequency} | awk -F '[dD]' '{print $1}' ) 92 file_enabled=.TRUE. 93 file_freq=${NbDays}d ;; 94 *s) 95 WriteInSeconds=$( echo ${frequency} | awk -F '[s]' '{print $1}' ) 96 file_enabled=.TRUE. 97 file_freq=${WriteInSeconds}s ;; 98 HF|hf) 99 file_enabled=.TRUE. 100 file_freq=10800s ;; 101 *) 102 IGCM_debug_Exit "SRF_Update " ${frequency} " invalid WriteFrequency : choose in xY, xM, xD, xs and HF" 103 IGCM_debug_Verif_Exit ;; 104 esac 105 106 (( ifreq = ifreq + 1 )) 107 case ${ifreq} in 108 1) 109 sechiba1_enabled=${file_enabled} 110 sechiba1_freq=${file_freq} ;; 111 2) 112 sechiba2_enabled=${file_enabled} 113 sechiba2_freq=${file_freq} ;; 114 *) 115 IGCM_debug_Exit "SRF_Update: It is not possible to set more than 2 output files for sechiba from config.card" 116 IGCM_debug_Exit "You must correct WriteFrequancy in SRF secion in config.card." 117 IGCM_debug_Exit "Adapt file_def_orchidee.xml directly if you want more output files" 118 IGCM_debug_Verif_Exit ;; 119 esac 120 done 121 122 123 # Modify file_def_orchidee.xml file 124 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba1 enabled ${sechiba1_enabled} 125 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba1 output_freq ${sechiba1_freq} 126 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba2 enabled ${sechiba2_enabled} 127 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba2 output_freq ${sechiba2_freq} 89 # Modify file_def_orchidee.xml file using settings from orchidee.card 90 # We here suppose that for each file, in orchidee.card UserChoices section, if the parameter 91 # output_level_filename is set, then also output_freq_filename must be set. The existance of output_freq_filename will not be checked. 92 # If output_level_filename=NONE or if it is not set, the corresponding file will be deactivated. 93 # Settings in config.card WriteFrequency are not used any more. 128 94 95 if [ X${orchidee_UserChoices_output_level_sechiba_history} = X ] || [ X${orchidee_UserChoices_output_level_sechiba_history} = XNONE ] ; then 96 # output_level_sechiba_history is not set in orchidee.card or it is set to NONE. 97 # Deactivate the file. 98 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba1 enabled .FALSE. 99 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba1 output_level 0 100 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba1 output_freq 1mo 101 else 102 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba1 enabled .TRUE. 103 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba1 output_level ${orchidee_UserChoices_output_level_sechiba_history} 104 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba1 output_freq ${orchidee_UserChoices_output_freq_sechiba_history} 105 fi 106 107 if [ X${orchidee_UserChoices_output_level_sechiba_out_2} = X ] || [ X${orchidee_UserChoices_output_level_sechiba_out_2} = XNONE ] ; then 108 # output_level_sechiba_out_2 is not set in orchidee.card or it is set to NONE. 109 # Deactivate the file. 110 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba2 enabled .FALSE. 111 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba2 output_level 0 112 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba2 output_freq 1mo 113 else 114 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba2 enabled .TRUE. 115 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba2 output_level ${orchidee_UserChoices_output_level_sechiba_out_2} 116 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba2 output_freq ${orchidee_UserChoices_output_freq_sechiba_out_2} 117 fi 118 119 if [ X${orchidee_UserChoices_output_level_sechiba_history_4dim} = X ] || [ X${orchidee_UserChoices_output_level_sechiba_history_4dim} = XNONE ] ; then 120 # output_level_sechiba_history_4dim is not set in orchidee.card or it is set to NONE. 121 # Deactivate the file. 122 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba3 enabled .FALSE. 123 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba3 output_level 0 124 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba3 output_freq 1mo 125 else 126 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba3 enabled .TRUE. 127 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba3 output_level ${orchidee_UserChoices_output_level_sechiba_history_4dim} 128 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba3 output_freq ${orchidee_UserChoices_output_freq_sechiba_history_4dim} 129 fi 130 129 131 130 132 # Add include of orchidee context in iodef.xml … … 132 134 # <context id="orchidee" src="./context_orchidee.xml"/> 133 135 echo '<context id="orchidee" src="./context_orchidee.xml"/>' > add.tmp 136 if [ X"$( echo ${config_UserChoices_ExpType} | grep CMIP6 )" != "X" ] ; then 137 echo '<context id="orchidee" src="./ping_orchidee.xml"/>' >> add.tmp 138 echo '<context id="orchidee" src="./dr2xml_orchidee.xml"/>' >> add.tmp 139 fi 134 140 cp iodef.xml iodef.xml.tmp 135 141 sed -e "/COMPONENT CONTEXT/r add.tmp" iodef.xml.tmp > iodef.xml
Note: See TracChangeset
for help on using the changeset viewer.