- Timestamp:
- 06/26/15 13:17:19 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CONFIG/UNIFORM/v6/LMDZOR_v6/GENERAL/DRIVER/stomate.driver
r2582 r2595 1 1 #!/bin/ksh 2 2 3 #D- Driver du script pour ORCHIDEE3 #D- Driver pour ORCHIDEE stomate component 4 4 5 5 #----------------------------------------------------------------- … … 7 7 { 8 8 IGCM_debug_PushStack "SBG_Initialize" 9 10 RESOL_SBG=ALL11 9 12 10 IGCM_debug_PopStack "SBG_Initialize" … … 17 15 { 18 16 IGCM_debug_PushStack "SBG_Update" 17 18 # Output management 19 19 20 # Default init : files are desactivated21 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 23 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. 24 27 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 ;; 72 44 esac 73 45 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 74 54 if ( [ ${CumulPeriod} -eq 1 ] && [ "${config_SBG_Restart}" = "n" ] ) ; then 75 55 echo "STOMATE : without restart" … … 85 65 function SBG_Finalize 86 66 { 87 #set -vx88 67 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 97 69 IGCM_debug_PopStack "SBG_Finalize" 98 70 }
Note: See TracChangeset
for help on using the changeset viewer.