Changeset 3687 for CONFIG/UNIFORM/v6/IPSLESM6/GENERAL/DRIVER/stomate.driver
- Timestamp:
- 03/23/18 15:31:39 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CONFIG/UNIFORM/v6/IPSLESM6/GENERAL/DRIVER/stomate.driver
r2758 r3687 1 1 #!/bin/ksh 2 2 3 #D- Driver pour ORCHIDEE stomate component3 #D- Driver for ORCHIDEE stomate component (SBG) 4 4 5 5 #----------------------------------------------------------------- … … 17 17 18 18 # Output management 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} 46 fi 19 47 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 # Modify file_def_orchidee.xml 48 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 enabled ${stomate_enabled} 49 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 output_freq ${stomate_freq} 50 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 enabled ${stomate_enabled} 51 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 output_freq ${stomate_freq} 52 48 53 49 54 50 # Define in orchidee.def if restart file should be used
Note: See TracChangeset
for help on using the changeset viewer.