Changeset 3563 for CONFIG/UNIFORM/v6/LMDZOR_v6/GENERAL
- Timestamp:
- 02/05/18 10:30:20 (6 years ago)
- Location:
- CONFIG/UNIFORM/v6/LMDZOR_v6/GENERAL/DRIVER
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
CONFIG/UNIFORM/v6/LMDZOR_v6/GENERAL/DRIVER/orchidee.driver
r3537 r3563 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 … … 68 70 69 71 ## 2. Mangement of output and modifications of related xml files 70 71 # Set default values for sechiba1_enabled and sechiba1_freq. 72 # These variables are used only to modify file_def_orchidee.xml 73 sechiba1_enabled=.FALSE. 74 sechiba2_enabled=.FALSE. 75 sechiba1_freq=0s 76 sechiba2_freq=0s 77 78 79 # Get WriteFrenquecy for SRF (SECHIBA) from config.card 80 # 1 or 2 frequencies can be set in WriteFrenquecy for SRF 81 # The first frequency will always be used for the sechiba_history file and the 82 # second frequency will be used for the sechiba_out_2.nc file. 83 # The files are activated only if its corresponding frequency is set in WriteFrequency 84 ifreq=0 85 for frequency in ${config_SRF_WriteFrequency} ; do 86 case ${frequency} in 87 *Y|*y) 88 NbYears=$( echo ${frequency} | awk -F '[yY]' '{print $1}' ) 89 NbDaysYear=$( IGCM_date_DaysInYear ${year} ) 90 file_enabled=.TRUE. 91 file_freq=${NbYears}y ;; 92 *M|*m) 93 NbMonths=$( echo ${frequency} | awk -F '[mM]' '{print $1}' ) 94 file_enabled=.TRUE. 95 file_freq=${NbMonths}mo ;; 96 *D|*d) 97 NbDays=$( echo ${frequency} | awk -F '[dD]' '{print $1}' ) 98 file_enabled=.TRUE. 99 file_freq=${NbDays}d ;; 100 *s) 101 WriteInSeconds=$( echo ${frequency} | awk -F '[s]' '{print $1}' ) 102 file_enabled=.TRUE. 103 file_freq=${WriteInSeconds}s ;; 104 HF|hf) 105 file_enabled=.TRUE. 106 file_freq=10800s ;; 107 *) 108 IGCM_debug_Exit "SRF_Update " ${frequency} " invalid WriteFrequency : choose in xY, xM, xD, xs and HF" 109 IGCM_debug_Verif_Exit ;; 110 esac 111 112 (( ifreq = ifreq + 1 )) 113 case ${ifreq} in 114 1) 115 sechiba1_enabled=${file_enabled} 116 sechiba1_freq=${file_freq} ;; 117 2) 118 sechiba2_enabled=${file_enabled} 119 sechiba2_freq=${file_freq} ;; 120 *) 121 IGCM_debug_Exit "SRF_Update: It is not possible to set more than 2 output files for sechiba from config.card" 122 IGCM_debug_Exit "You must correct WriteFrequancy in SRF secion in config.card." 123 IGCM_debug_Exit "Adapt file_def_orchidee.xml directly if you want more output files" 124 IGCM_debug_Verif_Exit ;; 125 esac 126 done 127 128 129 # Modify file_def_orchidee.xml file 130 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba1 enabled ${sechiba1_enabled} 131 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba1 output_freq ${sechiba1_freq} 132 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba2 enabled ${sechiba2_enabled} 133 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba2 output_freq ${sechiba2_freq} 134 # Use same values for sechiba1 and for sechiba3 files 135 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba3 enabled ${sechiba1_enabled} 136 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba3 output_freq ${sechiba1_freq} 72 # Modify file_def_orchidee.xml file using settings from sechiba.card/orchidee.card 73 # We here suppose that for each file, in sechiba.card/orchidee.card UserChoices section, if the parameter 74 # output_level_filename is set, then also output_freq_filename must be set. The existance of output_freq_filename will not be checked. 75 # If output_level_filename=NONE or if it is not set, the corresponding file will be deactivated. 76 # Settings in config.card WriteFrequency are not used any more. 137 77 78 if [ X${sechiba_UserChoices_output_level_sechiba_history} = X ] || [ X${sechiba_UserChoices_output_level_sechiba_history} = XNONE ] ; then 79 # output_level_sechiba_history is not set in orchidee.card or it is set to NONE. 80 # Deactivate the file. 81 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba1 enabled .FALSE. 82 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba1 output_level 0 83 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba1 output_freq 1mo 84 else 85 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba1 enabled .TRUE. 86 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba1 output_level ${sechiba_UserChoices_output_level_sechiba_history} 87 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba1 output_freq ${sechiba_UserChoices_output_freq_sechiba_history} 88 fi 89 90 if [ X${sechiba_UserChoices_output_level_sechiba_out_2} = X ] || [ X${sechiba_UserChoices_output_level_sechiba_out_2} = XNONE ] ; then 91 # output_level_sechiba_out_2 is not set in orchidee.card or it is set to NONE. 92 # Deactivate the file. 93 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba2 enabled .FALSE. 94 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba2 output_level 0 95 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba2 output_freq 1mo 96 else 97 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba2 enabled .TRUE. 98 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba2 output_level ${sechiba_UserChoices_output_level_sechiba_out_2} 99 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba2 output_freq ${sechiba_UserChoices_output_freq_sechiba_out_2} 100 fi 101 102 if [ X${sechiba_UserChoices_output_level_sechiba_history_4dim} = X ] || [ X${sechiba_UserChoices_output_level_sechiba_history_4dim} = XNONE ] ; then 103 # output_level_sechiba_history_4dim is not set in orchidee.card or it is set to NONE. 104 # Deactivate the file. 105 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba3 enabled .FALSE. 106 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba3 output_level 0 107 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba3 output_freq 1mo 108 else 109 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba3 enabled .TRUE. 110 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba3 output_level ${sechiba_UserChoices_output_level_sechiba_history_4dim} 111 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba3 output_freq ${sechiba_UserChoices_output_freq_sechiba_history_4dim} 112 fi 113 138 114 139 115 # Add include of orchidee context in iodef.xml -
CONFIG/UNIFORM/v6/LMDZOR_v6/GENERAL/DRIVER/stomate.driver
r3505 r3563 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 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} 49 46 fi 50 47 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 57 49 58 50 # Define in orchidee.def if restart file should be used
Note: See TracChangeset
for help on using the changeset viewer.