Changeset 3688 for CONFIG/UNIFORM/v6/IPSLCM6CHT/GENERAL/DRIVER
- Timestamp:
- 03/23/18 15:32:55 (6 years ago)
- Location:
- CONFIG/UNIFORM/v6/IPSLCM6CHT/GENERAL/DRIVER
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
CONFIG/UNIFORM/v6/IPSLCM6CHT/GENERAL/DRIVER/inca.driver
r2547 r3688 30 30 echo "INCA Tag : LMDZ-INCA" ${config_UserChoices_TagName} 31 31 32 ##- LMDZ physics version 33 ## Read LMDZ_Physics option in lmdz.card, if not present take default value AP (old physics) 34 if [ ! X${lmdz_UserChoices_LMDZ_Physics} = X ] ; then 35 LMDZ_Physics=${lmdz_UserChoices_LMDZ_Physics} 36 else 37 LMDZ_Physics=AP 38 fi 39 echo LMDZ physics version : ${LMDZ_Physics} 40 41 enable1=.FALSE. 42 enable2=.FALSE. 43 44 for frequency in ${config_CHM_WriteFrequency} ; do 45 case ${frequency} in 46 1D|1d) enable1=.TRUE. ;; 47 esac 48 case ${frequency} in 49 1M|1m) enable2=.TRUE. ;; 50 esac 51 done 52 53 54 32 55 IGCM_debug_PopStack "CHM_Initialize" 33 56 } … … 40 63 case ${CHEM} in 41 64 AER) 42 IGCM_comp_modifyDefFile nonblocker run.def config_inca aero 65 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml forcage1 enabled ${enable1} 66 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml forcage2 enabled ${enable2} 67 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml aero1 enabled ${enable1} 68 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml aero2 enabled ${enable2} 69 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml chemistry1 enabled ${enable1} 70 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml chemistry2 enabled ${enable2} 71 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml emissions1 enabled ${enable1} 72 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml emissions2 enabled ${enable2} 73 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml species1 enabled ${enable1} 74 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml species2 enabled ${enable2} 75 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml dvel1 enabled ${enable1} 76 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml dvel2 enabled ${enable2} 77 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml washout1 enabled ${enable1} 78 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml washout2 enabled ${enable2} 79 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml reacflux1 enabled ${enable1} 80 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml reacflux2 enabled ${enable2} 81 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml invariants1 enabled ${enable1} 82 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml invariants2 enabled ${enable2} 83 84 if [ X${LMDZ_Physics} = X"AP" ] ; then 85 IGCM_comp_modifyDefFile nonblocker run.def config_inca aero 86 else 87 IGCM_comp_modifyDefFile nonblocker run.def config_inca aeNP 88 fi 43 89 ;; 44 DUST) 45 IGCM_comp_modifyDefFile nonblocker run.def config_inca aero 90 DUSS) 91 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml forcage1 enabled ${enable1} 92 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml aero1 enabled ${enable1} 93 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml emissions1 enabled ${enable1} 94 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml species1 enabled ${enable1} 95 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml vegetation1 enabled ${enable1} 96 97 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml forcage2 enabled ${enable2} 98 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml aero2 enabled ${enable2} 99 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml emissions2 enabled ${enable2} 100 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml species2 enabled ${enable2} 101 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml vegetation2 enabled ${enable2} 102 103 if [ X${LMDZ_Physics} = X"AP" ] ; then 104 IGCM_comp_modifyDefFile nonblocker run.def config_inca aero 105 else 106 IGCM_comp_modifyDefFile nonblocker run.def config_inca aeNP 107 fi 46 108 ;; 47 109 NMHC) 48 IGCM_comp_modifyDefFile nonblocker run.def config_inca chem 110 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml reacflux1 enabled ${enable1} 111 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml emissions1 enabled ${enable1} 112 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml species1 enabled ${enable1} 113 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml chemistry1 enabled ${enable1} 114 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml dvel1 enabled ${enable1} 115 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml washout1 enabled ${enable1} 116 117 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml reacflux2 enabled ${enable2} 118 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml emissions2 enabled ${enable2} 119 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml species2 enabled ${enable2} 120 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml chemistry2 enabled ${enable2} 121 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml dvel2 enabled ${enable2} 122 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml washout2 enabled ${enable2} 123 124 IGCM_comp_modifyDefFile nonblocker run.def config_inca chem 125 ;; 126 NMHC_AER) 127 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml forcage1 enabled ${enable1} 128 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml aero1 enabled ${enable1} 129 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml species1 enabled ${enable1} 130 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml chemistry1 enabled ${enable1} 131 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml emissions1 enabled ${enable1} 132 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml dvel1 enabled ${enable1} 133 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml phtrate1 enabled ${enable1} 134 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml washout1 enabled ${enable1} 135 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml reacflux1 enabled ${enable1} 136 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml vegetation1 enabled ${enable1} 137 138 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml forcage2 enabled ${enable2} 139 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml aero2 enabled ${enable2} 140 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml species2 enabled ${enable2} 141 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml chemistry2 enabled ${enable2} 142 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml emissions2 enabled ${enable2} 143 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml dvel2 enabled ${enable2} 144 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml phtrate2 enabled ${enable2} 145 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml washout2 enabled ${enable2} 146 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml reacflux2 enabled ${enable2} 147 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml vegetation2 enabled ${enable2} 148 149 if [ X${LMDZ_Physics} = X"AP" ] ; then 150 IGCM_comp_modifyDefFile nonblocker run.def config_inca aero 151 else 152 IGCM_comp_modifyDefFile nonblocker run.def config_inca aeNP 153 fi 49 154 ;; 50 NMHC_AER) 51 IGCM_comp_modifyDefFile nonblocker run.def config_inca aero 52 ;; 53 CH4) 54 IGCM_comp_modifyDefFile nonblocker run.def config_inca chem 55 ;; 56 CH4_AER) 57 IGCM_comp_modifyDefFile nonblocker run.def config_inca aero 155 156 NMHC_AER_S) 157 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml forcage1 enabled ${enable1} 158 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml aero1 enabled ${enable1} 159 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml species1 enabled ${enable1} 160 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml chemistry1 enabled ${enable1} 161 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml emissions1 enabled ${enable1} 162 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml dvel1 enabled ${enable1} 163 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml phtrate1 enabled ${enable1} 164 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml washout1 enabled ${enable1} 165 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml reacflux1 enabled ${enable1} 166 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml vegetation1 enabled ${enable1} 167 168 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml forcage2 enabled ${enable2} 169 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml aero2 enabled ${enable2} 170 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml species2 enabled ${enable2} 171 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml chemistry2 enabled ${enable2} 172 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml emissions2 enabled ${enable2} 173 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml phtrate2 enabled ${enable2} 174 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml dvel2 enabled ${enable2} 175 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml washout2 enabled ${enable2} 176 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml reacflux2 enabled ${enable2} 177 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml vegetation2 enabled ${enable2} 178 179 if [ X${LMDZ_Physics} = X"AP" ] ; then 180 IGCM_comp_modifyDefFile nonblocker run.def config_inca aero 181 else 182 IGCM_comp_modifyDefFile nonblocker run.def config_inca aeNP 183 fi 58 184 ;; 59 185 GES) 60 IGCM_comp_modifyDefFile nonblocker run.def config_inca chem 186 IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml emissions1 enabled ${enable1} 187 188 IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml emissions2 enabled ${enable2} 189 190 IGCM_comp_modifyDefFile nonblocker run.def config_inca chem 61 191 esac 192 62 193 63 194 # inca.def : Activate reading of 10m wind in files if LMDZ_10m_winds=n in inca.card … … 68 199 fi 69 200 201 if [ X${inca_UserChoices_10m_winds_method} = X ] ; then 202 IGCM_comp_modifyDefFile nonblocker inca.def 10m_winds_method threshold 203 else 204 IGCM_comp_modifyDefFile nonblocker inca.def 10m_winds_method ${inca_UserChoices_10m_winds_method} 205 fi 206 207 208 if [ ! X${inca_UserChoices_wind_parameter} = X ] ; then 209 if [ X${inca_UserChoices_10m_winds_method} = Xthreshold ] ; then 210 IGCM_comp_modifyDefFile nonblocker inca.def tref ${inca_UserChoices_wind_parameter} 211 IGCM_comp_modifyDefFile nonblocker inca.def kref DEFAULT 212 else 213 IGCM_comp_modifyDefFile nonblocker inca.def kref ${inca_UserChoices_wind_parameter} 214 IGCM_comp_modifyDefFile nonblocker inca.def tref DEFAULT 215 fi 216 else 217 IGCM_comp_modifyDefFile nonblocker inca.def kref DEFAULT 218 IGCM_comp_modifyDefFile nonblocker inca.def tref DEFAULT 219 fi 220 221 if [ X${inca_UserChoices_seasalt_corr} = X ] ; then 222 IGCM_comp_modifyDefFile nonblocker inca.def ss_corr DEFAULT 223 else 224 IGCM_comp_modifyDefFile nonblocker inca.def ss_corr ${inca_UserChoices_seasalt_corr} 225 fi 226 227 228 70 229 # inca.def : choose write frequency for inca_avgr in inca.card 71 230 if [ ! X${inca_UserChoices_freq_write_chem} = X ] ; then … … 82 241 fi 83 242 243 #inca.def : choose coupled model with orchidee 244 if [ ! X${inca_UserChoices_CoupOrchInca} = X ]; then 245 IGCM_comp_modifyDefFile nonblocker inca.def CoupOrchInca ${inca_UserChoices_CoupOrchInca} 246 else 247 IGCM_comp_modifyDefFile nonblocker inca.def CoupOrchInca n 248 fi 249 250 #inca.def : choose sedimentation schema 251 if [ ! X${inca_UserChoices_multilayer_sedim} = X ]; then 252 IGCM_comp_modifyDefFile nonblocker inca.def multilayer_sediment ${inca_UserChoices_multilayer_sedim} 253 else 254 IGCM_comp_modifyDefFile nonblocker inca.def multilayer_sediment y 255 fi 256 257 #inca.def : choose calcul interactif des diagnostiques flux chimique ou non 258 if [ ! X${inca_UserChoices_calcul_flux} = X ]; then 259 IGCM_comp_modifyDefFile nonblocker inca.def calcul_flux ${inca_UserChoices_calcul_flux} 260 else 261 IGCM_comp_modifyDefFile nonblocker inca.def calcul_flux n 262 fi 263 264 #inca.def : choose aircraft emission 265 if [ ! X${inca_UserChoices_flag_plane} = X ]; then 266 IGCM_comp_modifyDefFile nonblocker inca.def flag_plane ${inca_UserChoices_flag_plane} 267 else 268 IGCM_comp_modifyDefFile nonblocker inca.def flag_plane 0 269 fi 270 271 #inca.def : choose time interpolation for sflx.nc 272 if [ ! X${inca_UserChoices_emi_interp_time} = X ]; then 273 IGCM_comp_modifyDefFile nonblocker inca.def emi_interp_time ${inca_UserChoices_emi_interp_time} 274 else 275 IGCM_comp_modifyDefFile nonblocker inca.def emi_interp_time 1 276 fi 277 84 278 #inca.def : choose output library 85 279 if [ X${inca_UserChoices_XIOS} = Xy ] ; then … … 95 289 fi 96 290 97 98 if [ X${inca_UserChoices_10m_winds_method} = X ] ; then99 IGCM_comp_modifyDefFile nonblocker inca.def 10m_winds_method threshold100 else101 IGCM_comp_modifyDefFile nonblocker inca.def 10m_winds_method ${inca_UserChoices_10m_winds_method}102 fi103 291 104 292 … … 115 303 fi 116 304 305 # Add LongName as global attribute in XIOS output files (if LongName is not empty) 306 if [ ! "X${config_UserChoices_LongName}" = "X" ] ; then 307 listfile=$(ls file_def*inca.xml) 308 echo "<variable id=\"LongName\" type=\"string\">${config_UserChoices_LongName}</variable>" > add.tmp 309 for file in ${listfile} 310 do 311 cp ${file} ${file}.tmp 312 sed -e "/<file id/r add.tmp" \ 313 ${file}.tmp > ${file} 314 rm ${file}.tmp 315 done 316 rm add.tmp 317 fi 318 117 319 IGCM_debug_PopStack "CHM_Update" 118 320 } -
CONFIG/UNIFORM/v6/IPSLCM6CHT/GENERAL/DRIVER/lim2.driver
r2456 r3688 16 16 IGCM_debug_PushStack "ICE_Update" 17 17 18 ##--Write Frequency for iomput 19 ## Differents frequencies are allowed for ICE files 20 21 VI1D_ENABLE=".FALSE." 22 VI5D_ENABLE=".FALSE." 23 VI1M_ENABLE=".FALSE." 24 VI1Y_ENABLE=".FALSE." 25 26 for frequency in ${config_ICE_WriteFrequency} ; do 27 case ${frequency} in 28 ( 1D|1d ) VI1D_ENABLE=".TRUE." ;; 29 ( 5D|5d ) VI5D_ENABLE=".TRUE." ;; 30 ( 1M|1m ) VI1M_ENABLE=".TRUE." ;; 31 ( *[yY] ) VI1Y_ENABLE=".TRUE." ;; 32 esac 33 done 34 35 36 # Update iodef.xml 37 38 IGCM_debug_Print 1 'Informations into iodef.xml : VI1D_ENABLE VI5D_ENABLE VI1M_ENABLE VI1Y_ENABLE ' 39 IGCM_debug_Print 1 ${VI1D_ENABLE} ${VI5D_ENABLE} ${VI1M_ENABLE} ${VI1Y_ENABLE} 40 41 IGCM_comp_modifyXmlFile nonblocker file_def_nemo-lim.xml 1d_lim enabled ${VI1D_ENABLE} 42 IGCM_comp_modifyXmlFile nonblocker file_def_nemo-lim.xml 5d_lim enabled ${VI5D_ENABLE} 43 IGCM_comp_modifyXmlFile nonblocker file_def_nemo-lim.xml 1m_lim enabled ${VI1M_ENABLE} 44 IGCM_comp_modifyXmlFile nonblocker file_def_nemo-lim.xml 1y_lim enabled ${VI1Y_ENABLE} 45 18 46 echo UPDATE ICE !!! 19 47 -
CONFIG/UNIFORM/v6/IPSLCM6CHT/GENERAL/DRIVER/lim3.driver
r2456 r3688 16 16 IGCM_debug_PushStack "ICE_Update" 17 17 18 ##--Write Frequency for iomput 19 ## Differents frequencies are allowed for ICE files 20 21 VI1D_ENABLE=".FALSE." 22 VI5D_ENABLE=".FALSE." 23 VI1M_ENABLE=".FALSE." 24 VI1Y_ENABLE=".FALSE." 25 26 for frequency in ${config_ICE_WriteFrequency} ; do 27 case ${frequency} in 28 ( 1D|1d ) VI1D_ENABLE=".TRUE." ;; 29 ( 5D|5d ) VI5D_ENABLE=".TRUE." ;; 30 ( 1M|1m ) VI1M_ENABLE=".TRUE." ;; 31 ( *[yY] ) VI1Y_ENABLE=".TRUE." ;; 32 esac 33 done 34 35 36 # Update iodef.xml 37 38 if [ X"$( echo ${config_UserChoices_ExpType} | grep CMIP6 )" != "X" ] ; then 39 VI1D_ENABLE=".FALSE." 40 VI5D_ENABLE=".FALSE." 41 VI1M_ENABLE=".FALSE." 42 VI1Y_ENABLE=".FALSE." 43 fi 44 45 IGCM_debug_Print 1 'Informations into iodef.xml : VI1D_ENABLE VI5D_ENABLE VI1M_ENABLE VI1Y_ENABLE ' 46 IGCM_debug_Print 1 ${VI1D_ENABLE} ${VI5D_ENABLE} ${VI1M_ENABLE} ${VI1Y_ENABLE} 47 48 IGCM_comp_modifyXmlFile nonblocker file_def_nemo-lim.xml 1d_lim enabled ${VI1D_ENABLE} 49 IGCM_comp_modifyXmlFile nonblocker file_def_nemo-lim.xml 5d_lim enabled ${VI5D_ENABLE} 50 IGCM_comp_modifyXmlFile nonblocker file_def_nemo-lim.xml 1m_lim enabled ${VI1M_ENABLE} 51 IGCM_comp_modifyXmlFile nonblocker file_def_nemo-lim.xml 1y_lim enabled ${VI1Y_ENABLE} 52 18 53 echo UPDATE ICE !!! 19 54 -
CONFIG/UNIFORM/v6/IPSLCM6CHT/GENERAL/DRIVER/lmdz.driver
r2841 r3688 13 13 RESOL_ATM_Y=$( echo ${RESOL_ATM_3D} | awk "-Fx" '{print $2}' ) 14 14 RESOL_ATM_XY="${RESOL_ATM_X}x${RESOL_ATM_Y}" 15 16 ##-- Calendar type for LMDZ and create_etat0_limit17 case ${config_UserChoices_CalendarType} in18 leap|gregorian)19 CalendarTypeForLmdz=earth_366d20 CalendarTypeForCreate=gregorian;;21 noleap)22 CalendarTypeForLmdz=earth_365d23 CalendarTypeForCreate=${CalendarTypeForLmdz};;24 360d)25 CalendarTypeForLmdz=earth_360d26 CalendarTypeForCreate=${CalendarTypeForLmdz};;27 *)28 CalendarTypeForLmdz=earth_360d29 CalendarTypeForCreate=${CalendarTypeForLmdz}30 esac31 15 32 16 ##- LMDZ physics version … … 63 47 ##-- Output frequency purpose .... 64 48 ##-- Initialisation .... 65 ok_mensuel=n 66 ok_journe=n 67 ok_hf=n 68 ok_hf3h=n 69 ok_hf3hm=n 70 ok_stn=n 49 ok_mensuel=.FALSE. 50 ok_journe=.FALSE. 51 ok_hf=.FALSE. 52 ok_hf3h=.FALSE. 53 ok_hf3hm=.FALSE. 54 ok_stn=.FALSE. 55 71 56 72 57 case ${config_UserChoices_PeriodLength} in 73 1Y|1y|1M|1m) ok_mensuel= y;;74 5D|5d|1D|1d) ok_journe= y;;58 1Y|1y|1M|1m) ok_mensuel=.TRUE. ;; 59 5D|5d|1D|1d) ok_journe=.TRUE. ;; 75 60 esac 76 61 77 62 for frequency in ${config_ATM_WriteFrequency} ; do 78 63 case ${frequency} in 79 1M|1m) ok_mensuel= y;;64 1M|1m) ok_mensuel=.TRUE. ;; 80 65 esac 81 66 case ${frequency} in 82 5D|5d|1D|1d) ok_journe= y;;67 5D|5d|1D|1d) ok_journe=.TRUE. ;; 83 68 esac 84 69 case ${frequency} in 85 HF|hf) ok_hf= y;;70 HF|hf) ok_hf=.TRUE. ;; 86 71 esac 87 72 case ${frequency} in 88 HF3h|hf3h) ok_hf3h= y;;73 HF3h|hf3h) ok_hf3h=.TRUE. ;; 89 74 esac 90 75 case ${frequency} in 91 HF3hm|hf3hm) ok_hf3hm= y;;76 HF3hm|hf3hm) ok_hf3hm=.TRUE. ;; 92 77 esac 93 78 case ${frequency} in 94 STN|stn) ok_stn= y;;79 STN|stn) ok_stn=.TRUE. ;; 95 80 esac 96 81 done 97 82 98 ## Read LMDZ_NbPeriod_adjust option in lmdz.card 99 if [ X"${lmdz_UserChoices_LMDZ_NbPeriod_adjust}" = X"" ] ; then 100 # The variable is not in lmdz.card, set default value 101 LMDZ_NbPeriod_adjust=0 102 else 103 LMDZ_NbPeriod_adjust=${lmdz_UserChoices_LMDZ_NbPeriod_adjust} 104 fi 105 106 if [ ${LMDZ_NbPeriod_adjust} -eq 0 ] ; then 107 LMDZ_Bands_file_name=${lmdz_UserChoices_LMDZ_Bands_file_name} 108 fi 109 110 111 ## Read LMDZ_COSP_OK in lmdz.card 112 if [ ! X${lmdz_UserChoices_LMDZ_COSP_OK} = X ] ; then 113 LMDZ_COSP_OK=${lmdz_UserChoices_LMDZ_COSP_OK} 114 else 115 LMDZ_COSP_OK=n 116 fi 117 ## Read LMDZ_COSP_monthly in lmdz.card 118 if [ ! X${lmdz_UserChoices_LMDZ_COSP_monthly} = X ] ; then 119 LMDZ_COSP_monthly=${lmdz_UserChoices_LMDZ_COSP_monthly} 120 else 121 LMDZ_COSP_monthly=n 122 fi 123 ## Read LMDZ_COSP_daily in lmdz.card 124 if [ ! X${lmdz_UserChoices_LMDZ_COSP_daily} = X ] ; then 125 LMDZ_COSP_daily=${lmdz_UserChoices_LMDZ_COSP_daily} 126 else 127 LMDZ_COSP_daily=n 128 fi 129 ## Read LMDZ_COSP_hf in lmdz.card 130 if [ ! X${lmdz_UserChoices_LMDZ_COSP_hf} = X ] ; then 131 LMDZ_COSP_hf=${lmdz_UserChoices_LMDZ_COSP_hf} 132 else 133 LMDZ_COSP_hf=n 134 fi 83 if [ X"$( echo ${config_UserChoices_ExpType} | grep CMIP6 )" != "X" ] ; then 84 ok_mensuel=.FALSE. 85 ok_journe=.FALSE. 86 ok_hf=.FALSE. 87 ok_hf3h=.FALSE. 88 ok_hf3hm=.FALSE. 89 ok_stn=.FALSE. 90 fi 91 92 ## Read LMDZ_COSP_OK in lmdz.card 93 if [ X${lmdz_UserChoices_LMDZ_COSP_OK} = Xy ] ; then 94 ## LMDZ_COSP_OK=y, now read all other COSP variables 95 ## Read LMDZ_COSP_monthly in lmdz.card 96 if [ X${lmdz_UserChoices_LMDZ_COSP_monthly} = Xy ] ; then 97 LMDZ_COSP_monthly=.TRUE. 98 else 99 LMDZ_COSP_monthly=.FALSE. 100 fi 101 ## Read LMDZ_COSP_daily in lmdz.card 102 if [ X${lmdz_UserChoices_LMDZ_COSP_daily} = Xy ] ; then 103 LMDZ_COSP_daily=.TRUE. 104 else 105 LMDZ_COSP_daily=.FALSE. 106 fi 107 ## Read LMDZ_COSP_hf in lmdz.card 108 if [ X${lmdz_UserChoices_LMDZ_COSP_hf} = Xy ] ; then 109 LMDZ_COSP_hf=.TRUE. 110 else 111 LMDZ_COSP_hf=.FALSE. 112 fi 113 else 114 # LMDZ_COSP_OK=n : All cosp output are deactivated 115 LMDZ_COSP_monthly=.FALSE. 116 LMDZ_COSP_daily=.FALSE. 117 LMDZ_COSP_hf=.FALSE. 118 fi 135 119 136 120 ## Read LMDZ_NMC_monthly in lmdz.card 137 if [ ! X${lmdz_UserChoices_LMDZ_NMC_monthly} = X] ; then138 LMDZ_NMC_monthly= ${lmdz_UserChoices_LMDZ_NMC_monthly}139 else 140 LMDZ_NMC_monthly= n141 fi 142 121 if [ X${lmdz_UserChoices_LMDZ_NMC_monthly} = Xy ] ; then 122 LMDZ_NMC_monthly=.TRUE. 123 else 124 LMDZ_NMC_monthly=.FALSE. 125 fi 126 143 127 ## Read LMDZ_NMC_daily in lmdz.card 144 if [ ! X${lmdz_UserChoices_LMDZ_NMC_daily} = X] ; then145 LMDZ_NMC_daily= ${lmdz_UserChoices_LMDZ_NMC_daily}146 else 147 LMDZ_NMC_daily= n128 if [ X${lmdz_UserChoices_LMDZ_NMC_daily} = Xy ] ; then 129 LMDZ_NMC_daily=.TRUE. 130 else 131 LMDZ_NMC_daily=.FALSE. 148 132 fi 149 133 150 134 ## Read LMDZ_NMC_hf in lmdz.card 151 if [ ! X${lmdz_UserChoices_LMDZ_NMC_hf} = X] ; then152 LMDZ_NMC_hf= ${lmdz_UserChoices_LMDZ_NMC_hf}153 else 154 LMDZ_NMC_hf= n155 fi 156 135 if [ X${lmdz_UserChoices_LMDZ_NMC_hf} = Xy ] ; then 136 LMDZ_NMC_hf=.TRUE. 137 else 138 LMDZ_NMC_hf=.FALSE. 139 fi 140 157 141 158 142 IGCM_debug_PopStack "ATM_Initialize" … … 164 148 IGCM_debug_PushStack "ATM_Update" 165 149 166 167 case ${config_UserChoices_PeriodLength} in168 *Y|*y)169 LMDZ_ecrit_ISCCP=30.170 LMDZ_periodav=30.171 if [ "${config_UserChoices_CalendarType}" != "360d" ] ; then172 echo Do not consider following warning if your running create_etat0_limit :173 echo WARNING !!! For lmdz : calendartype in config.card. PeriodLength=1Y allowed only for CalendarType=360d174 fi175 ;;176 *)177 LMDZ_ecrit_ISCCP=${PeriodLengthInDays}.178 LMDZ_periodav=${PeriodLengthInDays}.179 ;;180 esac181 182 ##-- Remise ou non a zero de la date initiale de LMDZ pour le fichier run.def183 if [ ${CumulPeriod} -eq 1 ] ; then184 RAZ_DATE=1185 else186 RAZ_DATE=0187 fi188 189 ## Algorithme for special treatment for Bands_xxx file190 ## For CumulPeriod=1 ;191 ## IF NbPeriod_Adjust = 0 ; set LMDZ_adjust=n192 ## IF LMDZ_Bands_file_name was given in lmdz.card THEN Get Bands file directly from server. Store it later with _0 suffix.193 ## IF no LMDZ_Bands_file_name was given, start without Bands file. Store it later with _0 suffix.194 ## ELSE set LMDZ_adjust=y ; start without Bands file ; Store it later in PARAM/ directory in submit directory with suffix _1 ;195 ##196 ## For CumulPeriod=2 to LMDZ_NbPeriod_adjust ;197 ## Get Bands file from PARAM/ in submit directory (CumulPeriod-1) ; set LMDZ_adjust=y ; Store Bands file in PARAM/ ;198 ##199 ## For CumulPeriod > LMDZ_NbPeriod_adjust ; LMDZ_adjust=n ; Get Bands file from PARAM/ ; Do not store ;200 201 if [ ${CumulPeriod} -eq 1 ] ; then202 if [ ${LMDZ_NbPeriod_adjust} -eq 0 ] ; then203 if [ ! X${LMDZ_Bands_file_name} = X ] ; then204 IGCM_sys_Get ${LMDZ_Bands_file_name} Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat205 IGCM_sys_Chmod u+w Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat206 IGCM_debug_Print 1 "Bands file forced to ${LMDZ_Bands_file_name} and stored in ${config_UserChoices_JobName}_Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat_0"207 fi208 fi209 fi210 211 LMDZ_adjust=n212 [ ${CumulPeriod} -le ${LMDZ_NbPeriod_adjust} ] && LMDZ_adjust=y213 214 RefPeriod=${LMDZ_NbPeriod_adjust} #0 to use a Bands file from Restart215 [ ${CumulPeriod} -le ${LMDZ_NbPeriod_adjust} ] && (( RefPeriod = ${CumulPeriod} - 1 ))216 217 # Get Bands file from PARAM directory if file exist218 if ( [ ${CumulPeriod} -gt 1 ] && [ -f ${SUBMIT_DIR}/PARAM/${config_UserChoices_JobName}_Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat_${RefPeriod} ] ) ; then219 IGCM_sys_Cp ${SUBMIT_DIR}/PARAM/${config_UserChoices_JobName}_Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat_${RefPeriod} Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat220 IGCM_sys_Chmod u+w Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat221 fi222 223 150 ##-- GHG forcing : 224 151 ## If forcing file exist in run directory, read values for the current year … … 226 153 227 154 # Read value for solaire from file SOLARANDVOLCANOES.txt. If file not existing, take DEFAULT value from file. 155 IGCM_debug_Print 1 "Note that the solaire parameter is here below changed but it is only used by LMDZ for old physics(AP and NPv3.2)" 156 IGCM_debug_Print 1 "For newer physics with iflag_rrtm=1 and ok_suntime_rrtm=y, the solar constant is instead taken from solarforcing.nc file" 228 157 if [ -f SOLARANDVOLCANOES.txt ] ; then 229 158 value=`grep Annee_${year} SOLARANDVOLCANOES.txt | awk -F= '{print $2}'` … … 240 169 241 170 # Read value for co2_ppm from file CO2.txt. If file not existing, take DEFAULT value from file. 171 # Calculate co2_ppm_per as co2_ppm*4. 242 172 if [ -f CO2.txt ] ; then 243 173 value=`grep Annee_${year} CO2.txt | awk -F= '{print $2}'` … … 247 177 IGCM_debug_Verif_Exit 248 178 fi 179 value4=`grep Annee_${year} CO2.txt | awk -F= '{print $2 * 4}'` 249 180 else 250 181 value=DEFAULT 182 value4=DEFAULT 251 183 fi 252 184 IGCM_comp_modifyDefFile nonblocker config.def co2_ppm $value 185 IGCM_comp_modifyDefFile nonblocker config.def co2_ppm_per $value4 253 186 254 187 … … 322 255 ## COSP daily output for years 1979 and later (mandatory for historical CMIP5 run). 323 256 if ([ X"${lmdz_UserChoices_LMDZ_COSP_daily1979}" = X"y" ] && [ ${year} -ge 1979 ]) ; then 324 LMDZ_COSP_daily=y 325 fi 326 327 328 ## output.def parameters 329 # columns in phys_output_filekeys refer to the filenames given in phys_out_filenames in output.def : 330 # histmth histday histhf histhf3h histhf3hm histstn 331 IGCM_comp_modifyDefFile nonblocker output.def phys_out_filekeys "${ok_mensuel} ${ok_journe} ${ok_hf} ${ok_hf3h} ${ok_hf3hm} ${ok_stn}" 332 IGCM_comp_modifyDefFile nonblocker output.def ecrit_ISCCP ${LMDZ_ecrit_ISCCP} 333 IGCM_comp_modifyDefFile nonblocker output.def ok_cosp ${LMDZ_COSP_OK} 334 IGCM_comp_modifyDefFile nonblocker output.def ok_mensuelCOSP ${LMDZ_COSP_monthly} 335 IGCM_comp_modifyDefFile nonblocker output.def ok_journeCOSP ${LMDZ_COSP_daily} 336 IGCM_comp_modifyDefFile nonblocker output.def ok_hfCOSP ${LMDZ_COSP_hf} 337 IGCM_comp_modifyDefFile nonblocker output.def ok_histNMC "${LMDZ_NMC_monthly} ${LMDZ_NMC_daily} ${LMDZ_NMC_hf}" 338 339 # XIOS XML definition 340 if [ X${lmdz_UserChoices_XIOS} = Xy ] ; then 341 # Default init : files are desactivated 342 IGCM_comp_modifyXmlFile force file_def_histmth_lmdz.xml histmth enabled .FALSE. 343 IGCM_comp_modifyXmlFile force file_def_histday_lmdz.xml histday enabled .FALSE. 344 IGCM_comp_modifyXmlFile force file_def_histhf_lmdz.xml histhf enabled .FALSE. 345 # IGCM_comp_modifyXmlFile force file_def_histhf3h_lmdz.xml histhf3h enabled .FALSE. 346 # IGCM_comp_modifyXmlFile force file_def_histhf3hm_lmdz.xml histhf3hm enabled .FALSE. 347 IGCM_comp_modifyXmlFile force file_def_histstn_lmdz.xml histstn enabled .FALSE. 348 IGCM_comp_modifyXmlFile force file_def_histmthNMC_lmdz.xml histmthNMC enabled .FALSE. 349 IGCM_comp_modifyXmlFile force file_def_histdayNMC_lmdz.xml histdayNMC enabled .FALSE. 350 IGCM_comp_modifyXmlFile force file_def_histhfNMC_lmdz.xml histhfNMC enabled .FALSE. 351 IGCM_comp_modifyXmlFile force file_def_histmthCOSP_lmdz.xml histmthCOSP enabled .FALSE. 352 IGCM_comp_modifyXmlFile force file_def_histdayCOSP_lmdz.xml histdayCOSP enabled .FALSE. 353 IGCM_comp_modifyXmlFile force file_def_histhfCOSP_lmdz.xml histhfCOSP enabled .FALSE. 354 355 # Default output level : 5 356 IGCM_comp_modifyXmlFile force file_def_histmth_lmdz.xml histmth output_level 5 357 IGCM_comp_modifyXmlFile force file_def_histday_lmdz.xml histday output_level 5 358 IGCM_comp_modifyXmlFile force file_def_histhf_lmdz.xml histhf output_level 5 359 # IGCM_comp_modifyXmlFile force file_def_histhf3h_lmdz.xml histhf3h output_level 5 360 # IGCM_comp_modifyXmlFile force file_def_histhf3hm_lmdz.xml histhf3hm output_level 5 361 IGCM_comp_modifyXmlFile force file_def_histstn_lmdz.xml histstn output_level 5 362 IGCM_comp_modifyXmlFile force file_def_histmthNMC_lmdz.xml histmthNMC output_level 5 363 IGCM_comp_modifyXmlFile force file_def_histdayNMC_lmdz.xml histdayNMC output_level 5 364 IGCM_comp_modifyXmlFile force file_def_histhfNMC_lmdz.xml histhfNMC output_level 5 365 IGCM_comp_modifyXmlFile force file_def_histmthCOSP_lmdz.xml histmthCOSP output_level 5 366 IGCM_comp_modifyXmlFile force file_def_histdayCOSP_lmdz.xml histdayCOSP output_level 5 367 IGCM_comp_modifyXmlFile force file_def_histhfCOSP_lmdz.xml histhfCOSP output_level 5 368 # Filling of XML files 369 if [ X${ok_mensuel} = Xy ] ; then 370 IGCM_comp_modifyXmlFile force file_def_histmth_lmdz.xml histmth enabled .TRUE. 371 IGCM_comp_modifyXmlFile force file_def_histmth_lmdz.xml histmth output_freq 1mo 372 IGCM_comp_modifyXmlFile force file_def_histmth_lmdz.xml histmth name histmth 373 fi 374 if [ X${ok_journe} = Xy ] ; then 375 IGCM_comp_modifyXmlFile force file_def_histday_lmdz.xml histday enabled .TRUE. 376 IGCM_comp_modifyXmlFile force file_def_histday_lmdz.xml histday output_freq 1d 377 IGCM_comp_modifyXmlFile force file_def_histday_lmdz.xml histday name histday 378 if [ X${OutLevel} = Xlow ] || [ X${OutLevel} = Xmedium ] ; then 379 IGCM_comp_modifyXmlFile force file_def_histday_lmdz.xml histday output_level 2 380 fi 381 fi 382 if [ X${ok_hf} = Xy ] ; then 383 IGCM_comp_modifyXmlFile force file_def_histhf_lmdz.xml histhf enabled .TRUE. 384 IGCM_comp_modifyXmlFile force file_def_histhf_lmdz.xml histhf output_freq 6h 385 IGCM_comp_modifyXmlFile force file_def_histhf_lmdz.xml histhf name histhf 386 if [ X${OutLevel} = Xlow ] ; then 387 IGCM_comp_modifyXmlFile force file_def_histhf_lmdz.xml histhf output_level 2 388 fi 389 fi 390 # if [ X${ok_hf3h} = Xy ] ; then 391 # IGCM_comp_modifyXmlFile force file_def_histhf3h_lmdz.xml histhf3h enabled .TRUE. 392 # IGCM_comp_modifyXmlFile force file_def_histhf3h_lmdz.xml histhf3h output_freq 3h 393 # IGCM_comp_modifyXmlFile force file_def_histhf3h_lmdz.xml histhf3h name histhf3h 394 # fi 395 # if [ X${ok_hf3hm} = Xy ] ; then 396 # IGCM_comp_modifyXmlFile force file_def_histhf3hm_lmdz.xml histhf3hm enabled .TRUE. 397 # IGCM_comp_modifyXmlFile force file_def_histhf3hm_lmdz.xml histhf3hm output_freq 3h 398 # IGCM_comp_modifyXmlFile force file_def_histhf3hm_lmdz.xml histhf3hm name histhf3hm 399 # fi 400 if [ X${ok_stn} = Xy ] ; then 401 IGCM_comp_modifyXmlFile force file_def_histstn_lmdz.xml histstn enabled .TRUE. 402 IGCM_comp_modifyXmlFile force file_def_histstn_lmdz.xml histstn output_freq 1800s 403 IGCM_comp_modifyXmlFile force file_def_histstn_lmdz.xml histstn name histstn 404 fi 405 if [ X${LMDZ_NMC_monthly} = Xy ] ; then 406 IGCM_comp_modifyXmlFile force file_def_histmthNMC_lmdz.xml histmthNMC enabled .TRUE. 407 IGCM_comp_modifyXmlFile force file_def_histmthNMC_lmdz.xml histmthNMC output_freq 1mo 408 IGCM_comp_modifyXmlFile force file_def_histmthNMC_lmdz.xml histmthNMC name histmthNMC 409 fi 410 if [ X${LMDZ_NMC_daily} = Xy ] ; then 411 IGCM_comp_modifyXmlFile force file_def_histdayNMC_lmdz.xml histdayNMC enabled .TRUE. 412 IGCM_comp_modifyXmlFile force file_def_histdayNMC_lmdz.xml histdayNMC output_freq 1d 413 IGCM_comp_modifyXmlFile force file_def_histdayNMC_lmdz.xml histdayNMC name histdayNMC 414 fi 415 if [ X${LMDZ_NMC_hf} = Xy ] ; then 416 IGCM_comp_modifyXmlFile force file_def_histhfNMC_lmdz.xml histhfNMC enabled .TRUE. 417 IGCM_comp_modifyXmlFile force file_def_histhfNMC_lmdz.xml histhfNMC output_freq 6h 418 IGCM_comp_modifyXmlFile force file_def_histhfNMC_lmdz.xml histhfNMC name histhfNMC 419 fi 420 421 if [ X${LMDZ_COSP_OK} = Xy ] ; then 422 if [ X${LMDZ_COSP_monthly} = Xy ] ; then 423 IGCM_comp_modifyXmlFile force file_def_histmthCOSP_lmdz.xml histmthCOSP enabled .TRUE. 424 IGCM_comp_modifyXmlFile force file_def_histmthCOSP_lmdz.xml histmthCOSP output_freq 1mo 425 IGCM_comp_modifyXmlFile force file_def_histmthCOSP_lmdz.xml histmthCOSP name histmthCOSP 426 fi 427 if [ X${LMDZ_COSP_daily} = Xy ] ; then 428 IGCM_comp_modifyXmlFile force file_def_histdayCOSP_lmdz.xml histdayCOSP enabled .TRUE. 429 IGCM_comp_modifyXmlFile force file_def_histdayCOSP_lmdz.xml histdayCOSP output_freq 1d 430 IGCM_comp_modifyXmlFile force file_def_histdayCOSP_lmdz.xml histdayCOSP name histdayCOSP 431 fi 432 if [ X${LMDZ_COSP_hf} = Xy ] ; then 433 IGCM_comp_modifyXmlFile force file_def_histhfCOSP_lmdz.xml histhfCOSP enabled .TRUE. 434 IGCM_comp_modifyXmlFile force file_def_histhfCOSP_lmdz.xml histhfCOSP output_freq 6h 435 IGCM_comp_modifyXmlFile force file_def_histhfCOSP_lmdz.xml histhfCOSP name histhfCOSP 436 fi 437 fi 438 439 fi 440 441 ## gcm.def parameters : 442 # Modification of variable iphysiq depending on the physics 443 if [ X${LMDZ_Physics} = X"AP" ] ; then 444 if [ ${RESOL_ATM_3D} = 96x95x39 ]; then 445 value=10 446 elif [ ${RESOL_ATM_3D} = 144x142x39 ]; then 447 value=15 448 else 449 IGCM_debug_Print 1 "LMDZ_Physics=${LMDZ_Physics} has not been tested for the current resolution RESOL_ATM_3D=${RESOL_ATM_3D}. " 450 IGCM_debug_Print 1 "iphysiq must be defined for the current combination of resolution and phyiscs package" 451 IGCM_debug_Exit "You need to add a special case in lmdz.driver to handle the above combination." 452 fi 453 elif [ X${LMDZ_Physics} = X"NPv3.1" ] ; then 454 if [ ${RESOL_ATM_3D} = 96x95x39 ] ; then 455 value=5 456 elif [ ${RESOL_ATM_3D} = 144x142x39 ] ; then 457 value=5 458 else 459 IGCM_debug_Print 1 "LMDZ_Physics=${LMDZ_Physics} has not been tested for the current resolution RESOL_ATM_3D=${RESOL_ATM_3D}. " 460 IGCM_debug_Print 1 "iphysiq must be defined for the current combination of resolution and phyiscs package" 461 IGCM_debug_Exit "You need to add a special case in lmdz.driver to handle the above combination." 462 fi 463 elif [ X${LMDZ_Physics} = X"NPv3.2" ] ; then 464 if [ ${RESOL_ATM_3D} = 96x95x39 ] ; then 465 value=5 466 elif [ ${RESOL_ATM_3D} = 144x142x39 ] ; then 467 value=5 468 elif [ ${RESOL_ATM_3D} = 128x118x39 ] ; then 469 value=15 470 else 471 IGCM_debug_Print 1 "LMDZ_Physics=${LMDZ_Physics} has not been tested for the current resolution RESOL_ATM_3D=${RESOL_ATM_3D}. " 472 IGCM_debug_Print 1 "iphysiq must be defined for the current combination of resolution and phyiscs package" 473 IGCM_debug_Exit "You need to add a special case in lmdz.driver to handle the above combination." 474 fi 475 else 476 # Take default value set in gcm.def 477 value=DEFAULT 478 fi 479 IGCM_comp_modifyDefFile nonblocker gcm.def iphysiq $value 480 257 LMDZ_COSP_daily=.TRUE. 258 fi 259 260 ## Modifiy 261 IGCM_comp_modifyXmlFile nonblocker file_def_histmth_lmdz.xml histmth enabled ${ok_mensuel} 262 263 IGCM_comp_modifyXmlFile nonblocker file_def_histday_lmdz.xml histday enabled ${ok_journe} 264 265 if [ X${OutLevel} = Xlow ] || [ X${OutLevel} = Xmedium ] ; then 266 IGCM_comp_modifyXmlFile nonblocker file_def_histday_lmdz.xml histday output_level 2 267 else 268 IGCM_comp_modifyXmlFile nonblocker file_def_histday_lmdz.xml histday output_level 5 269 fi 270 271 IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf enabled ${ok_hf} 272 273 if [ X${OutLevel} = Xlow ] ; then 274 IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf output_level 5 275 elif [ X${OutLevel} = Xmedium ] ; then 276 IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf output_level 6 277 elif [ X${OutLevel} = Xhigh ] ; then 278 IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf output_level 7 279 fi 280 281 IGCM_comp_modifyXmlFile nonblocker file_def_histhf3h_lmdz.xml histhf3h enabled ${ok_hf3h} 282 IGCM_comp_modifyXmlFile nonblocker file_def_histhf3hm_lmdz.xml histhf3hm enabled ${ok_hf3hm} 283 284 IGCM_comp_modifyXmlFile nonblocker file_def_histstn_lmdz.xml histstn enabled ${ok_stn} 285 286 IGCM_comp_modifyXmlFile nonblocker file_def_histmthNMC_lmdz.xml histmthNMC enabled ${LMDZ_NMC_monthly} 287 IGCM_comp_modifyXmlFile nonblocker file_def_histdayNMC_lmdz.xml histdayNMC enabled ${LMDZ_NMC_daily} 288 IGCM_comp_modifyXmlFile nonblocker file_def_histhfNMC_lmdz.xml histhfNMC enabled ${LMDZ_NMC_hf} 289 290 IGCM_comp_modifyXmlFile nonblocker file_def_histmthCOSP_lmdz.xml histmthCOSP enabled ${LMDZ_COSP_monthly} 291 IGCM_comp_modifyXmlFile nonblocker file_def_histdayCOSP_lmdz.xml histdayCOSP enabled ${LMDZ_COSP_daily} 292 IGCM_comp_modifyXmlFile nonblocker file_def_histhfCOSP_lmdz.xml histhfCOSP enabled ${LMDZ_COSP_hf} 293 294 # Activate the histstrataer output file only for configuration with interactive stratospheric aersols 295 # done by setting the key word LMDZ_strataero=y in lmdz.card 296 if [ X${lmdz_UserChoices_LMDZ_strataero} = Xy ] ; then 297 IGCM_comp_modifyXmlFile nonblocker file_def_histstrataer_lmdz.xml histstrataer enabled .TRUE. 298 else 299 IGCM_comp_modifyXmlFile nonblocker file_def_histstrataer_lmdz.xml histstrataer enabled .FALSE. 300 fi 301 481 302 482 303 ## run.def parameters 483 IGCM_comp_modifyDefFile blocker run.def dayref ${InitDay} 484 IGCM_comp_modifyDefFile blocker run.def nday ${PeriodLengthInDays} 485 IGCM_comp_modifyDefFile blocker run.def raz_date ${RAZ_DATE} 486 IGCM_comp_modifyDefFile blocker run.def periodav ${LMDZ_periodav} 487 IGCM_comp_modifyDefFile nonblocker run.def adjust ${LMDZ_adjust} 304 305 306 ##-- Remise ou non a zero de la date initiale de LMDZ pour le fichier run.def 307 if [ ${CumulPeriod} -eq 1 ] ; then 308 IGCM_comp_modifyDefFile blocker run.def raz_date 1 309 else 310 IGCM_comp_modifyDefFile blocker run.def raz_date 0 311 fi 312 313 ##-- Calendar type for LMDZ and create_etat0_limit 314 case ${config_UserChoices_CalendarType} in 315 leap|gregorian) 316 IGCM_comp_modifyDefFile blocker run.def calend gregorian ;; 317 noleap) 318 IGCM_comp_modifyDefFile blocker run.def calend earth_365d ;; 319 360d) 320 IGCM_comp_modifyDefFile blocker run.def calend earth_360d ;; 321 *) 322 IGCM_comp_modifyDefFile blocker run.def calend earth_360d ;; 323 esac 324 325 IGCM_comp_modifyDefFile blocker run.def dayref ${InitDay} 326 IGCM_comp_modifyDefFile blocker run.def nday ${PeriodLengthInDays} 488 327 489 328 # Set anneeref different for gcm and ce0l 490 # Variable calend is different for a run with create_etat0_limit and the gcm491 329 # Test if executable create_etat0_limit is present and lmdz.x is not present 492 330 if [ -f create_etat0_limit* ] || [ -f ce0l* ] && [ ! -f lmdz.x ] ; then 493 331 # for case ce0l : always take current year 494 332 IGCM_comp_modifyDefFile blocker run.def anneeref ${year} 495 IGCM_comp_modifyDefFile blocker run.def calend ${CalendarTypeForCreate}496 333 497 334 # Temporary, set use_filtre_fft=n because we now use dyn3d for ce0l version where fft is not implemented. … … 501 338 # for case gcm : take first year of simulation 502 339 IGCM_comp_modifyDefFile blocker run.def anneeref ${InitYear} 503 IGCM_comp_modifyDefFile blocker run.def calend ${CalendarTypeForLmdz}504 fi505 506 # Activate creation of file grilles_gcm.nc only at first period507 if [ ${CumulPeriod} -eq 1 ] ; then508 IGCM_comp_modifyDefFile nonblocker run.def grilles_gcm_netcdf y509 else510 IGCM_comp_modifyDefFile nonblocker run.def grilles_gcm_netcdf n511 340 fi 512 341 … … 587 416 else 588 417 IGCM_comp_modifyDefFile nonblocker config.def ok_cdnc n 418 fi 419 420 # config.def : Activate COSP 421 if [ ! X${lmdz_UserChoices_LMDZ_COSP_OK} = X ]; then 422 IGCM_comp_modifyDefFile nonblocker config.def ok_cosp ${lmdz_UserChoices_LMDZ_COSP_OK} 423 else 424 IGCM_comp_modifyDefFile nonblocker config.def ok_cosp n 425 fi 426 427 # config.def : Modify parameter pmagic if it is set in lmdz.card 428 if [ ! X${lmdz_UserChoices_pmagic} = X ]; then 429 IGCM_comp_modifyDefFile nonblocker config.def pmagic ${lmdz_UserChoices_pmagic} 430 else 431 # Take default value set in config.def 432 IGCM_comp_modifyDefFile nonblocker config.def pmagic DEFAULT 589 433 fi 590 434 … … 622 466 fi 623 467 624 if [ X${lmdz_UserChoices_XIOS} = Xy ] ; then625 468 # Add include of LMDZ context in iodef.xml 626 469 # In iodef.xml add on next line after "COMPONENT CONTEXT" 627 470 # <context id="LMDZ" src="./context_lmdz.xml"/> 628 echo '<context id="LMDZ" src="./context_lmdz.xml"/>' > add.tmp 629 cp iodef.xml iodef.xml.tmp 630 sed -e "/COMPONENT CONTEXT/r add.tmp" \ 631 iodef.xml.tmp > iodef.xml 632 rm iodef.xml.tmp add.tmp 633 634 # Set ok_all_xml=y in run.def 635 IGCM_comp_modifyDefFile nonblocker run.def ok_all_xml y 636 else 637 # Deactivate ok_all_xml in run.def 638 IGCM_comp_modifyDefFile nonblocker run.def ok_all_xml n 639 fi 640 471 echo '<context id="LMDZ" src="./context_lmdz.xml"/>' > add.tmp 472 if [ X"$( echo ${config_UserChoices_ExpType} | grep CMIP6 )" != "X" ] ; then 473 echo '<context id="LMDZ" src="./ping_lmdz.xml"/>' >> add.tmp 474 echo '<context id="LMDZ" src="./dr2xml_lmdz.xml"/>' >> add.tmp 475 fi 476 cp iodef.xml iodef.xml.tmp 477 sed -e "/COMPONENT CONTEXT/r add.tmp" iodef.xml.tmp > iodef.xml 478 rm iodef.xml.tmp add.tmp 479 480 #Long Name as global attribute (if LongName is not empty) 481 if [ ! "X${config_UserChoices_LongName}" = "X" ] ; then 482 listfile=$(ls file_def*lmdz.xml) 483 echo "<variable id=\"LongName\" type=\"string\">${config_UserChoices_LongName}</variable>" > add.tmp 484 for file in ${listfile} 485 do 486 cp ${file} ${file}.tmp 487 sed -e "/<file id/r add.tmp" \ 488 ${file}.tmp > ${file} 489 rm ${file}.tmp 490 done 491 rm add.tmp 492 fi 493 641 494 IGCM_debug_PopStack "ATM_Update" 642 495 } … … 646 499 { 647 500 IGCM_debug_PushStack "ATM_Finalize" 648 649 # If the file exist, copy Bands_ file to PARAM/ in submit directory. This file will be used for the simulation.650 # Copy also the same file into ATM/Restart at ARCHIVE directory for backup.651 if [ -f Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat ] ; then652 if [ ${CumulPeriod} -le ${LMDZ_NbPeriod_adjust} ] ; then653 IGCM_sys_Cp Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat ${SUBMIT_DIR}/PARAM/${config_UserChoices_JobName}_Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat_${CumulPeriod}654 IGCM_sys_Put_Out Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat ${R_OUT_ATM_R}/${config_UserChoices_JobName}_Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat_${CumulPeriod}655 elif [ ${CumulPeriod} -eq 1 ] && [ ${LMDZ_NbPeriod_adjust} -eq 0 ] ; then656 # Special case : first period and no adjust => Save bands file with suffix _0657 IGCM_sys_Cp Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat ${SUBMIT_DIR}/PARAM/${config_UserChoices_JobName}_Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat_0658 IGCM_sys_Put_Out Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat ${R_OUT_ATM_R}/${config_UserChoices_JobName}_Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat_0659 fi660 fi661 501 662 502 # Add special treatement for CARBON CYCLE -
CONFIG/UNIFORM/v6/IPSLCM6CHT/GENERAL/DRIVER/oasis.driver
r2456 r3688 51 51 52 52 FreqCoupling=${oasis_UserChoices_FreqCoupling:-86400} 53 FreqCouplingRoffCalv=${oasis_UserChoices_FreqCouplingRoffCalv:-86400} 53 54 54 55 ## Calculate lag for transfer of fields from atmosphere -> ocean. … … 65 66 IGCM_debug_Print 3 "Parametre de calcul Lag LMDZ mis a jour " ${day_step} ${iphysiq} ${nsplit_phys} 66 67 67 (( LagAtm = 86400 / day_step * iphysiq / nsplit_phys )) 68 (( LagAtm = 86400 * iphysiq / day_step / nsplit_phys )) 69 (( LagAtmRoffCalv = $FreqCoupling + $LagAtm )) 70 (( LagOce = 86400 / OPA_NPDT_DAY )) 68 71 69 (( LagOce = 86400 / ORCA_NPDT_JOUR )) 72 IGCM_debug_Print 1 "OPA_NPDT_DAY : ${OPA_NPDT_DAY}" 73 IGCM_debug_Print 1 "LagAtm : ${LagAtm}" 74 IGCM_debug_Print 1 "LagAtmRoffCalv : ${LagAtmRoffCalv}" 75 IGCM_debug_Print 1 "LagOce : ${LagOce}" 70 76 71 77 ## Use of Lucia ## … … 80 86 -e "s/<output_mode>/${CPL_OutputVar}/g" \ 81 87 -e "s/<freq_coupling>/${FreqCoupling}/g" \ 88 -e "s/<freq_coupling_roff_calv>/${FreqCouplingRoffCalv}/g" \ 82 89 -e "s/<lag_atm>/${LagAtm}/g" \ 90 -e "s/<lag_atm_roff_calv>/${LagAtmRoffCalv}/g" \ 83 91 -e "s/<lag_oce>/${LagOce}/g" \ 84 92 namcouple > namcouple.tmp -
CONFIG/UNIFORM/v6/IPSLCM6CHT/GENERAL/DRIVER/opa9.driver
r2456 r3688 9 9 RESOL_OCE_ICE=$( echo ${RESOL} | awk "-Fx" '{print $1}' ) 10 10 case ${RESOL_OCE_ICE} in 11 ( *LIM2* ) 12 SEAICE_MODEL=LIM2 13 LIM_VERSION=2 14 ;; 15 16 ( *LIM3* ) 17 SEAICE_MODEL=LIM3 18 LIM_VERSION=3 19 ;; 20 ( *CICE*) SEAICE_MODEL=CICE ;; 21 ( * ) SEAICE_MODEL=UNKNOWN ;; 11 ( *LIM2* ) SEAICE_MODEL=LIM2 ; LIM_VERSION=2 ;; 12 ( *LIM3* ) SEAICE_MODEL=LIM3 ; LIM_VERSION=3 ;; 13 ( *CICE* ) SEAICE_MODEL=CICE ;; 14 ( * ) SEAICE_MODEL=UNKNOWN ;; 22 15 esac 23 16 RESOL_OCE=$( echo ${RESOL_OCE_ICE} | sed "s/${SEAICE_MODEL}//" ) … … 30 23 31 24 # Local function to find namelists parameters 32 supergrep () { 33 grep "^ *$1 *=" $2 | sed -e "s% *\!.*%%" 34 } 35 25 #supergrep () { grep "^ *$1 *=" $2 | sed -e "s% *\!.*%%" ; } 26 supergrep () { grep "^ *$1 *=" $2 | sed -e "s% *\!.*%%" -e "s%^ *$1 *=%%" ; } 36 27 ##--Variables used by OPA -- 37 38 # cn_exp experience name39 # nn_it000 number of the first time step40 # nn_itend number of the last time step41 # nn_date0 initial calendar date yymmdd (used if nn_rstctl=1)42 # nn_leapy Leap year calendar (1) or not (0), or 360 days calendar (30)43 # nn_stock frequency of creation of a restart file (modulo referenced to 1)44 # nn_write frequency of write in the output file (modulo referenced to nn_it000)45 # ln_rstart start from rest (F) or from a restart file (T)46 # nn_rstctl restart control = 0 nn_it000 is not compared to the restart file value47 # = 1 use nn_date0 in namelist_cfg (not the value in the restart file)48 # = 2 calendar parameters read in the restart file49 # nn_msh =1 create a mesh file (coordinates, scale factors, masks)50 # rn_rdt time step in seconds for the dynamics (and tracer if nacc=0) ==> 5760 (coming from namelist)51 # nn_prg time-step frequency of gap print in model output52 # nn_fwri frequency of zonal means and transport output53 54 28 NAMELIST_OPA_CFG=${SUBMIT_DIR}/PARAM/namelist_${RESOL_OCE}_cfg 55 NAMELIST_OPA_REF=${SUBMIT_DIR}/PARAM/namelist_${RESOL_OCE}_ref56 IGCM_debug_Print 1 "namelist_ref : ${NAMELIST_OPA_REF}"57 if [ ! -r ${NAMELIST_OPA_REF} ] ; then58 echo "${NAMELIST_OPA_REF} non trouve"59 fi60 29 IGCM_debug_Print 1 "namelist_cfg : ${NAMELIST_OPA_CFG}" 61 30 if [ ! -r ${NAMELIST_OPA_CFG} ] ; then 62 echo "${NAMELIST_OPA_CFG} non trouve" 63 fi 64 65 PAT_CEXPER=$( supergrep cn_exp ${NAMELIST_OPA_CFG} ) 66 PAT_NIT000=$( supergrep nn_it000 ${NAMELIST_OPA_CFG} ) 67 PAT_NITEND=$( supergrep nn_itend ${NAMELIST_OPA_CFG} ) 68 PAT_NDATE0=$( supergrep nn_date0 ${NAMELIST_OPA_CFG} ) 69 PAT_NLEAPY=$( supergrep nn_leapy ${NAMELIST_OPA_CFG} ) 70 PAT_NSTOCK=$( supergrep nn_stock ${NAMELIST_OPA_CFG} ) 71 PAT_NWRITE=$( supergrep nn_write ${NAMELIST_OPA_CFG} ) 72 PAT_RESTAR=$( supergrep ln_rstart ${NAMELIST_OPA_CFG} ) 73 PAT_NRSTAR=$( supergrep nn_rstctl ${NAMELIST_OPA_CFG} ) 74 PAT_NMSH=$( supergrep nn_msh ${NAMELIST_OPA_CFG} ) 75 PAT_NN_WRITE=$( supergrep nn_write ${NAMELIST_OPA_CFG} ) 76 PAT_NN_FWRI=$( supergrep nn_fwri ${NAMELIST_OPA_CFG} ) 77 PAT_ICE_EMBD=$( supergrep nn_ice_embd ${NAMELIST_OPA_CFG} ) 78 PAT_ICEFLX=$( supergrep cn_iceflx ${NAMELIST_OPA_CFG} ) 79 PAT_JPNI=$( supergrep jpni ${NAMELIST_OPA_CFG} ) 80 PAT_JPNJ=$( supergrep jpnj ${NAMELIST_OPA_CFG} ) 81 PAT_JPNIJ=$( supergrep jpnij ${NAMELIST_OPA_CFG} ) 82 PAT_NN_FSBC=$( supergrep nn_fsbc ${NAMELIST_OPA_CFG} ) 83 84 ORCA_RDT=$( supergrep rn_rdt ${NAMELIST_OPA_CFG} | sed 's/ *rn_rdt *=//' | sed 's/\. *//' ) 85 ORCA_NN_FSBC=$( supergrep nn_fsbc ${NAMELIST_OPA_CFG} | sed 's/ *nn_fsbc *=//' | sed 's/\. *//' ) 86 (( ORCA_NPDT_JOUR = 86400 / ORCA_RDT )) 87 #(( ORCA_NPDT_SBC = ORCA_NPDT_JOUR / ORCA_NN_FSBC )) 88 (( ORCA_RDT_SBC = ORCA_RDT * ORCA_NN_FSBC )) 31 IGCM_debug_Exit "${NAMELIST_OPA_CFG} not found" 32 IGCM_debug_Verif_Exit 33 fi 34 OPA_RDT=$( supergrep rn_rdt ${NAMELIST_OPA_CFG} ) 35 OPA_NN_FSBC=$( supergrep nn_fsbc ${NAMELIST_OPA_CFG} ) 36 # 37 # OPA_RDT=$( supergrep rn_rdt namelist_cfg ) 38 # OPA_NN_FSBC=$( supergrep nn_fsbc namelist_cfg ) 39 (( OPA_NPDT_DAY = 86400 / OPA_RDT )) 40 (( OPA_NPDT_YEAR = OPA_NPDT_DAY * 365 )) 41 (( OPA_RDT_SBC = OPA_RDT * OPA_NN_FSBC )) 89 42 90 91 43 # Period Length In Days between DateBegin and first day of calendar 0001 01 01 92 44 # /!\ Needed by OPA namelist to compute file names /!\ 93 45 (( DaysSinceJC = $( IGCM_date_DaysSinceJC ${DateBegin} ) + 1 )) 94 46 95 IGCM_debug_Print 1 "PAT_CEXPER $PAT_CEXPER "96 IGCM_debug_Print 1 "PAT_NIT000 $PAT_NIT000"97 IGCM_debug_Print 1 "PAT_NITEND $PAT_NITEND"98 IGCM_debug_Print 1 "PAT_NDATE0 $PAT_NDATE0"99 IGCM_debug_Print 1 "PAT_NLEAPY $PAT_NLEAPY"100 IGCM_debug_Print 1 "PAT_NSTOCK $PAT_NSTOCK"101 IGCM_debug_Print 1 "PAT_NWRITE $PAT_NWRITE"102 IGCM_debug_Print 1 "PAT_RESTAR $PAT_RESTAR"103 IGCM_debug_Print 1 "PAT_NRSTAR $PAT_NRSTAR"104 IGCM_debug_Print 1 "PAT_NMSH $PAT_NMSH"105 IGCM_debug_Print 1 "PAT_NN_WRITE $PAT_NN_WRITE"106 IGCM_debug_Print 1 "PAT_NN_FWRI $PAT_NN_FWRI"107 IGCM_debug_Print 1 "PAT_ICE_EMBD $PAT_ICE_EMBD"108 IGCM_debug_Print 1 "PAT_ICEFLX $PAT_ICEFLX"109 IGCM_debug_Print 1 "PAT_JPNI $PAT_JPNI"110 IGCM_debug_Print 1 "PAT_JPNJ $PAT_JPNJ"111 IGCM_debug_Print 1 "PAT_JPNIJ $PAT_JPNIJ"112 IGCM_debug_Print 1 "PAT_NN_FSBC $PAT_NN_FSBC"113 47 IGCM_debug_Print 1 " " 114 IGCM_debug_Print 1 "ORCA_RDT $ORCA_RDT" 115 IGCM_debug_Print 1 "ORCA_NN_FSBC $ORCA_NN_FSBC" 116 IGCM_debug_Print 1 "ORCA_RDT_SBC $ORCA_RDT_SBC" 117 IGCM_debug_Print 1 "ORCA_NPDT_JOUR $ORCA_NPDT_JOUR" 118 IGCM_debug_Print 1 "DaysSinceJC $DaysSinceJC" 48 IGCM_debug_Print 1 "OPA_RDT ${OPA_RDT}" 49 IGCM_debug_Print 1 "OPA_NN_FSBC ${OPA_NN_FSBC}" 50 IGCM_debug_Print 1 "OPA_RDT_SBC ${OPA_RDT_SBC}" 51 IGCM_debug_Print 1 "OPA_NPDT_DAY ${OPA_NPDT_DAY}" 52 IGCM_debug_Print 1 "OPA_NPDT_YEAR ${OPA_NPDT_YEAR}" 53 IGCM_debug_Print 1 "DaysSinceJC ${DaysSinceJC}" 54 55 ## Check that nn_fsbc is correct compare to coupling frequency 56 FreqCoupling=${oasis_UserChoices_FreqCoupling:-86400} 57 58 ## This informations are used for diaptr, trends and diagap files 59 ## only the first frequency is used for this files 60 61 IGCM_debug_Print 1 "FreqCoupling ${FreqCoupling}" 62 IGCM_debug_Print 1 "OPA_NN_FSBC ${OPA_NN_FSBC}" 63 IGCM_debug_Print 1 "OPA_RDT ${OPA_RDT}" 64 IGCM_debug_Print 1 "OPA_RDT_SBC ${OPA_RDT_SBC}" 65 66 if [[ ${OPA_RDT_SBC} -gt ${FreqCoupling} ]] ; then 67 IGCM_debug_Exit "OPA_RDT_SBC=${OPA_RDT_SBC} is greater than FreqCoupling=${FreqCoupling}" 68 IGCM_debug_Verif_Exit 69 fi 119 70 120 71 IGCM_debug_PopStack "OCE_Initialize" … … 126 77 { 127 78 IGCM_debug_PushStack "OCE_Update" 128 129 ## Check that nn_fsbc is correct compare to coupling frequency 130 131 FreqCoupling=${oasis_UserChoices_FreqCoupling:-86400} 132 133 ## This informations are used for diaptr, trends and diagap files 134 ## only the first frequency is used for this files 135 136 IGCM_debug_Print 1 "FreqCoupling $FreqCoupling" 137 IGCM_debug_Print 1 "ORCA_NN_FSBC $ORCA_NN_FSBC" 138 IGCM_debug_Print 1 "ORCA_RDT $ORCA_RDT" 139 IGCM_debug_Print 1 "ORCA_RDT_SBC $ORCA_RDT_SBC" 140 141 if [[ ${ORCA_RDT_SBC} -gt ${FreqCoupling} ]] ; then 142 IGCM_debug_Exit "ORCA_RDT_SBC=${ORCA_RDT_SBC} is greater than FreqCoupling=${FreqCoupling}" 143 IGCM_debug_Verif_Exit 144 fi 145 146 ##--Write Frequency Purpose .... 147 frequency=$( echo ${config_OCE_WriteFrequency} | awk "-F " '{print $1}' ) 148 factor=$( echo ${frequency} | sed -e "s/[yYmMdD]//" ) 149 case ${frequency} in 150 1Y|1y) 151 (( ORCA_NWRITE = ORCA_NPDT_JOUR * factor * $( IGCM_date_DaysInYear ${year} ) )) ; 152 PREFIX_NWRITE=${config_UserChoices_JobName}_${factor}y ; 153 R_OUT_OCE_NWRITE=${R_OUT_OCE_O_Y} ; 154 WF1=${factor}Y ;; 155 1M|1m) 156 (( ORCA_NWRITE = ORCA_NPDT_JOUR * factor * $( IGCM_date_DaysInMonth ${year} ${month} ) )) ; 157 PREFIX_NWRITE=${config_UserChoices_JobName}_${factor}m ; 158 R_OUT_OCE_NWRITE=${R_OUT_OCE_O_M} ; 159 WF1=${factor}M ;; 160 *D|*d) 161 (( ORCA_NWRITE = ORCA_NPDT_JOUR * factor )) ; 162 PREFIX_NWRITE=${config_UserChoices_JobName}_${factor}d ; 163 R_OUT_OCE_NWRITE=${R_OUT_OCE_O_D} ; 164 WF1=${factor}D ;; 165 *) 166 (( ORCA_NWRITE = 0 )) ;; 167 esac 168 79 169 80 ##--Write Frequency for iomput 170 ## Differents frequencies are allowed for grid_[TUVW] and icemodfiles81 ## Differents frequencies are allowed for OCE files 171 82 172 83 V1D_ENABLE=".FALSE." 84 V5D_ENABLE=".FALSE." 173 85 V1M_ENABLE=".FALSE." 174 86 V1Y_ENABLE=".FALSE." … … 176 88 for frequency in ${config_OCE_WriteFrequency} ; do 177 89 case ${frequency} in 178 1D|1d) V1D_ENABLE=".TRUE." ;; 179 esac 180 case ${frequency} in 181 1M|1m) V1M_ENABLE=".TRUE." ;; 182 esac 183 case ${frequency} in 184 *[yY]) V1Y_ENABLE=".TRUE." ;; 90 ( 1D|1d ) V1D_ENABLE=".TRUE." ;; 91 ( 5D|5d ) V5D_ENABLE=".TRUE." ;; 92 ( 1M|1m ) V1M_ENABLE=".TRUE." ;; 93 ( *[yY] ) V1Y_ENABLE=".TRUE." ;; 185 94 esac 186 95 done 187 188 189 ##-- Output level : 3 for more 1D variables190 eval opa9_OUTPUT_LEVEL=\${opa9_UserChoices_OUTPUT_LEVEL} > /dev/null 2>&1191 OUTPUT_LEVEL=${opa9_OUTPUT_LEVEL}192 193 96 194 97 # Period Length In Days between DateBegin and first day of calendar 0001 01 01 … … 197 100 198 101 ##-- Number of time steps updated : the first, the last and the number of time steps 199 (( O RCA_NIT000 = ( PeriodDaysSinceJC - DaysSinceJC ) * ORCA_NPDT_JOUR+ 1 ))200 (( O RCA_NPDT = PeriodLengthInDays * ORCA_NPDT_JOUR))201 (( O RCA_NITEND = ORCA_NIT000 + ORCA_NPDT - 1))102 (( OPA_NIT000 = ( PeriodDaysSinceJC - DaysSinceJC ) * OPA_NPDT_DAY + 1 )) 103 (( OPA_NPDT = PeriodLengthInDays * OPA_NPDT_DAY )) 104 (( OPA_NITEND = OPA_NIT000 + OPA_NPDT - 1)) 202 105 203 106 ##-- We force one restart file at the end of the trunk 204 ORCA_NSTOCK="${ORCA_NITEND}" 205 206 ##-- Restart configuration 207 if ( [ "${CumulPeriod}" -eq 1 ] && [ "${config_OCE_Restart}" = "n" ] ) ; then 208 ORCA_LRSTAR=.FALSE. 209 ORCA_NRSTDT=0 210 # Put ORCA_NMSH=0 when OPA running in parallel mode 211 ORCA_NMSH=1 212 #echo "NO OPA RESTART" 107 OPA_NSTOCK="${OPA_NITEND}" 108 109 110 ##-- Additionnal Restart Option to force reproducibility ; force kt to kt red in restart file 111 ## ${opa9_UserChoices_Reproducibility_after_restart} 112 113 IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/COMP/opa9.card UserChoices Reproducibility_after_restart 114 115 ##-- Restart configuration 116 if ( [ "${opa9_UserChoices_Reproducibility_after_restart}" = "y" ] ) ; then 117 OPA_LRSTAR=.TRUE. 118 OPA_NRSTDT=2 119 #echo "OPA RESTART" 120 IGCM_debug_Print 1 'WARNING : dangerous option' 121 IGCM_debug_Print 1 'Reproducibility_after_Restart forced ie kt forced to kt red in restart file : ' ${opa9_UserChoices_Reproducibility_after_restart} 122 elif ( [ "${CumulPeriod}" -eq 1 ] && [ "${config_OCE_Restart}" = "n" ] ) ; then 123 OPA_LRSTAR=.FALSE. 124 OPA_NRSTDT=0 125 #echo "NO OPA RESTART" 213 126 elif ( [ "${CumulPeriod}" -eq 1 ] && [ "${config_OCE_Restart}" = "y" ] ) ; then 214 ORCA_LRSTAR=.TRUE. 215 ORCA_NRSTDT=0 216 ORCA_NMSH=1 217 #echo "OPA RESTART" 127 OPA_LRSTAR=.TRUE. 128 OPA_NRSTDT=0 129 #echo "OPA RESTART" 218 130 else 219 ORCA_LRSTAR=.TRUE. 220 ORCA_NRSTDT=2 221 ORCA_NMSH=0 222 #echo "OPA RESTART" 223 fi 224 225 ##-- Meshmask option 131 OPA_LRSTAR=.TRUE. 132 OPA_NRSTDT=2 133 #echo "OPA RESTART" 134 fi 135 136 if ( [ "${CumulPeriod}" -eq 1 ] && [ "${opa9_UserChoices_Restart_TS_only}" = "y" ] ) ; then 137 OPA_LRSTAR_TS=.TRUE. 138 else 139 OPA_LRSTAR_TS=.FALSE. 140 fi 141 142 ##-- Meshmask option. Forced only once. 226 143 IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/COMP/opa9.card UserChoices mesh_mask 227 144 145 OPA_NMSH=0 228 146 if [ "${opa9_UserChoices_mesh_mask}" = "y" ]; then 229 O RCA_NMSH=1147 OPA_NMSH=1 230 148 IGCM_card_WriteOption ${SUBMIT_DIR}/COMP/opa9.card UserChoices mesh_mask "n" 231 149 fi … … 233 151 # nleapy configuration 234 152 case ${config_UserChoices_CalendarType} in 235 leap|gregorian) 236 ORCA_NLEAPY=1;; 237 noleap) 238 ORCA_NLEAPY=0;; 239 360d) 240 ORCA_NLEAPY=30;; 241 *) 242 ORCA_NLEAPY=30 153 ( leap|gregorian) OPA_NLEAPY=1 ;; 154 ( noleap ) OPA_NLEAPY=0 ;; 155 ( 360d ) OPA_NLEAPY=30 ;; 156 ( * ) OPA_NLEAPY=30 ;; 243 157 esac 244 158 159 if ( [ "${opa9_UserChoices_Reproducibility_after_restart}" = "y" ] ) ; then 160 NEMO_KT_FROM_RESTART=$(ncdump -v kt restartopa_0000.nc|grep 'kt ='|awk '{print $3}' ) 161 (( NEMO_NIT000 = NEMO_KT_FROM_RESTART + 1 )) 162 (( NEMO_NITEND = NEMO_KT_FROM_RESTART + OPA_NITEND - OPA_NIT000 + 1 )) 163 IGCM_debug_Print 1 "NEMO_NIT000 (from Restart) : ${NEMO_NIT000}" 164 IGCM_debug_Print 1 "NEMO_NITEND (from Restart + ... ) : ${NEMO_NITEND}" 165 ##-- We force one restart file at the end of the trunk 166 OPA_NSTOCK="${NEMO_NITEND}" 167 OPA_NIT000="${NEMO_NIT000}" 168 OPA_NITEND="${NEMO_NITEND}" 169 fi 170 245 171 typeset -r PRECIS=8 246 NEMO_END=$( echo $( awk "BEGIN { printf \"%0${PRECIS}d\",${ORCA_NITEND} }" ) ) 247 248 249 case ${SEAICE_MODEL} in 250 ( LIM2 ) 251 NN_ICE_EMBD=0 252 ICEFLX=none 253 ;; 254 ( LIM3 ) 255 NN_ICE_EMBD=2 256 ICEFLX=${opa9_UserChoices_iceflx:-linear} 257 ;; 258 esac 259 260 IGCM_debug_Print 1 "NUM_PROC_OCE : " ${NUM_PROC_OCE} 261 262 sed -e "s/${PAT_CEXPER}/ cn_exp=\"${config_UserChoices_JobName}\"/" \ 263 -e "s/${PAT_NIT000}/ nn_it000=${ORCA_NIT000}/" \ 264 -e "s/${PAT_NITEND}/ nn_itend=${ORCA_NITEND}/" \ 265 -e "s/${PAT_NDATE0}/ nn_date0=${PeriodDateBegin}/" \ 266 -e "s%${PAT_NLEAPY}% nn_leapy=${ORCA_NLEAPY}%" \ 267 -e "s/${PAT_NSTOCK}/ nn_stock=${ORCA_NSTOCK}/" \ 268 -e "s/${PAT_NWRITE}/ nn_write=${ORCA_NWRITE}/" \ 269 -e "s/${PAT_RESTAR}/ ln_rstart=${ORCA_LRSTAR}/" \ 270 -e "s/${PAT_NRSTAR}/ nn_rstctl=${ORCA_NRSTDT}/" \ 271 -e "s/${PAT_NMSH}/ nn_msh=${ORCA_NMSH}/" \ 272 -e "s/${PAT_NN_WRITE}/ nn_prg=${ORCA_NWRITE}/" \ 273 -e "s/${PAT_NN_FWRI}/ nn_fwri=${ORCA_NWRITE}/" \ 274 -e "s/${PAT_NN_FSBC}/ nn_fsbc=${ORCA_NN_FSBC}/" \ 275 -e "s/${PAT_ICE_EMBD}/ nn_ice_embd=${NN_ICE_EMBD}/" \ 276 -e "s/${PAT_ICEFLX}/ cn_iceflx=\'${ICEFLX}'/" \ 277 -e "s/${PAT_JPNI}/ jpni=1/" \ 278 -e "s/${PAT_JPNJ}/ jpnj=${NUM_PROC_OCE}/" \ 279 -e "s/${PAT_JPNIJ}/ jpnij=${NUM_PROC_OCE}/" \ 280 namelist_cfg > namelist_cfg.tmp 281 282 IGCM_sys_Mv namelist_cfg.tmp namelist_cfg 283 284 IGCM_debug_Print 1 'Variables automatically updated in ORCA namelist_cfg' 285 grep AUTO namelist_cfg 286 287 # update iodef.xml 288 289 IGCM_debug_Print 1 'Informations into iodef.xml : V1D_ENABLE V1M_ENABLE V1Y_ENABLE OUTPUT_LEVEL' 290 IGCM_debug_Print 1 ${V1D_ENABLE} ${V1M_ENABLE} ${V1Y_ENABLE} ${OUTPUT_LEVEL} 291 292 sed -e "s/_1D_ENABLE_/${V1D_ENABLE}/" \ 293 -e "s/_1M_ENABLE_/${V1M_ENABLE}/" \ 294 -e "s/_1Y_ENABLE_/${V1Y_ENABLE}/" \ 295 -e "s/_OUTPUT_LEVEL_/${OUTPUT_LEVEL}/" \ 296 context_nemo.xml > context_nemo.xml.tmp 297 298 IGCM_sys_Mv context_nemo.xml.tmp context_nemo.xml 299 172 NEMO_END=$( echo $( awk "BEGIN { printf \"%0${PRECIS}d\",${OPA_NITEND} }" ) ) 173 174 IGCM_comp_modifyNamelist blocker namelist_cfg cn_exp ${config_UserChoices_JobName} 175 IGCM_comp_modifyNamelist blocker namelist_cfg nn_it000 ${OPA_NIT000} 176 IGCM_comp_modifyNamelist blocker namelist_cfg nn_itend ${OPA_NITEND} 177 IGCM_comp_modifyNamelist blocker namelist_cfg ln_rstart ${OPA_LRSTAR} 178 IGCM_comp_modifyNamelist blocker namelist_cfg ln_rstart_ts ${OPA_LRSTAR_TS} 179 IGCM_comp_modifyNamelist blocker namelist_cfg nn_stock ${OPA_NSTOCK} 180 IGCM_comp_modifyNamelist blocker namelist_cfg nn_rstctl ${OPA_NRSTDT} 181 IGCM_comp_modifyNamelist blocker namelist_cfg nn_date0 ${PeriodDateBegin} 182 IGCM_comp_modifyNamelist nonblocker namelist_cfg nn_msh ${OPA_NMSH} 183 IGCM_comp_modifyNamelist nonblocker namelist_cfg nn_rnf_depth_file ${OPA_NMSH} 184 IGCM_comp_modifyNamelist blocker namelist_cfg nn_leapy ${OPA_NLEAPY} 185 186 # Update iodef.xml 187 188 if [ X"$( echo ${config_UserChoices_ExpType} | grep CMIP6 )" != "X" ] ; then 189 V1D_ENABLE=".FALSE." 190 V5D_ENABLE=".FALSE." 191 V1M_ENABLE=".FALSE." 192 V1Y_ENABLE=".FALSE." 193 fi 194 195 IGCM_debug_Print 1 'Informations into iodef.xml : V1D_ENABLE V5D_ENABLE V1M_ENABLE V1Y_ENABLE ' 196 IGCM_debug_Print 1 ${V1D_ENABLE} ${V5D_ENABLE} ${V1M_ENABLE} ${V1Y_ENABLE} 197 198 IGCM_comp_modifyXmlFile nonblocker file_def_nemo-opa.xml 1d_opa enabled ${V1D_ENABLE} 199 IGCM_comp_modifyXmlFile nonblocker file_def_nemo-opa.xml 5d_opa enabled ${V5D_ENABLE} 200 IGCM_comp_modifyXmlFile nonblocker file_def_nemo-opa.xml 1m_opa enabled ${V1M_ENABLE} 201 IGCM_comp_modifyXmlFile nonblocker file_def_nemo-opa.xml 1y_opa enabled ${V1Y_ENABLE} 202 203 IGCM_comp_modifyXmlFile force context_nemo.xml ref_year NONE ${opa9_UserChoices_TimeOrigin} 204 205 300 206 # vargas/titane/MPP and switch from 1 proc to 5 procs. We need to suppres restartopa the second month, if restartopa_0000 exist 301 207 # same thing for restart_trc and restart_ice_in … … 309 215 # <context id="nemo" src="./context_nemo.xml"/> 310 216 echo '<context id="nemo" src="./context_nemo.xml"/>' > add.tmp 217 if [ X"$( echo ${config_UserChoices_ExpType} | grep CMIP6 )" != "X" ] ; then 218 echo '<context id="nemo" src="./ping_nemo.xml"/>' >> add.tmp 219 echo '<context id="nemo" src="./dr2xml_opa9.xml"/>' >> add.tmp 220 fi 311 221 cp iodef.xml iodef.xml.tmp 312 222 sed -e "/COMPONENT CONTEXT/r add.tmp" \ … … 314 224 rm iodef.xml.tmp add.tmp 315 225 226 #Long Name as global attribute (if LongName is not empty) 227 if [ ! "X${config_UserChoices_LongName}" = "X" ] ; then 228 listfile=$(ls file_def_nemo*.xml) 229 echo "<variable id=\"LongName\" type=\"string\">${config_UserChoices_LongName}</variable>" > add.tmp 230 for file in ${listfile} 231 do 232 cp ${file} ${file}.tmp 233 sed -e "/<file id/r add.tmp" \ 234 ${file}.tmp > ${file} 235 rm ${file}.tmp 236 done 237 rm add.tmp 238 fi 316 239 317 240 IGCM_debug_PopStack "OCE_Update" … … 323 246 IGCM_debug_PushStack "OCE_Finalize" 324 247 325 if [ -f date.file ] ; then326 # Prefix use in opa9.card AND in lim2.card :327 DATE_OPA=$( cat date.file | \328 sed "s/\ ${config_UserChoices_JobName}_[0-9]*[a-z]_\([0-9]*_[0-9]*\)_\ */\1/g" )329 MainPrefix=${config_UserChoices_JobName}_1d_${DATE_OPA}330 SecondPrefix=${config_UserChoices_JobName}_1m_${DATE_OPA}331 fi332 333 248 IGCM_debug_Print 1 FINALIZE OCE !!! 334 249 -
CONFIG/UNIFORM/v6/IPSLCM6CHT/GENERAL/DRIVER/orchidee.driver
r2456 r3688 1 1 #!/bin/ksh 2 # D- Driver du script pourORCHIDEE2 ## Driver for the component SRF corresponding to the sechiba part of ORCHIDEE 3 3 #----------------------------------------------------------------- 4 4 function SRF_Initialize … … 6 6 IGCM_debug_PushStack "SRF_Initialize" 7 7 8 RESOL_SRF=ALL9 10 for frequency in ${config_SRF_WriteFrequency} ; do11 case ${frequency} in12 HF|hf) SRF_ok_hf=y ;;13 esac14 done15 16 8 ##- Define variable DefSuffix set in orchidee.card 17 ## This variable is used in orchidee.card to choose 18 ## parameter file(orchidee.def_DefSuffix). 9 ## This variable is used in orchidee.card to choose 10 ## parameter file(orchidee.def_DefSuffix). 19 11 if [ ! X${orchidee_UserChoices_DefSuffix} = X ] ; then 20 12 DefSuffix=${orchidee_UserChoices_DefSuffix} 21 13 else 22 14 DefSuffix=Choi 23 15 fi 24 16 … … 31 23 IGCM_debug_PushStack "SRF_Update" 32 24 25 ## 1. Modifications in orchidee.def parameter file 26 33 27 # Activate STOMATE if the compontent SBG=stomate is set in config.card 34 28 if [ X${config_ListOfComponents_SBG} = Xstomate ] ; then 35 IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_OK_STOMATE y 29 # Activate stomate in orchidee.def 30 IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_OK_STOMATE y 36 31 else 37 IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_OK_STOMATE n 32 # Deactivate stomate in orchidee.def 33 IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_OK_STOMATE n 34 # Deactivate output files for stomate 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 37 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 output_freq 1mo 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 40 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 output_freq 1mo 38 41 fi 39 42 40 typeset SECHIBA_WRITE_STEP 41 42 if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 43 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .FALSE. 44 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba2 enabled .FALSE. 45 IGCM_comp_modifyDefFile nonblocker orchidee.def XIOS_ORCHIDEE_OK y 43 # Define in orchidee.def if restart file should be used 44 if ( [ ${CumulPeriod} -ne 1 ] || [ "${config_SRF_Restart}" != "n" ] ) ; then 45 IGCM_comp_modifyDefFile blocker orchidee.def SECHIBA_restart_in sechiba_rest_in.nc 46 46 else 47 IGCM_comp_modifyDefFile nonblocker orchidee.def XIOS_ORCHIDEE_OK n 48 fi 49 50 SRF_WriteFrequency=$( echo ${config_SRF_WriteFrequency} | sed -e 's/\([0-9]*[yYmMdDs]\).*/\1/' ) 51 case ${SRF_WriteFrequency} in 52 *Y|*y) 53 WriteInYears=$( echo ${SRF_WriteFrequency} | awk -F '[yY]' '{print $1}' ) 54 PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' ) 55 (( SECHIBA_WRITE_STEP = PeriodLengthInDays * WriteInYears / PeriodLengthInYears * 86400 )) 56 if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 57 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE. 58 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${WriteInYears}y 59 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history 60 fi 61 ;; 62 1M) 63 if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 64 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE. 65 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq 1mo 66 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history 67 fi 68 case ${config_UserChoices_PeriodLength} in 69 *Y|*y) 70 SECHIBA_WRITE_STEP=-1. 71 ;; 72 *M|*m) 73 SECHIBA_WRITE_STEP=-1. 74 ;; 75 *) 76 (( SECHIBA_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) * 86400 )) 77 ;; 78 esac 79 ;; 80 *M|*m) 81 WriteInMonths=$( echo ${SRF_WriteFrequency} | awk -F '[mM]' '{print $1}' ) 82 if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 83 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE. 84 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${WriteInMonths}mo 85 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history 86 fi 87 case ${config_UserChoices_PeriodLength} in 88 *Y|*y) 89 PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' ) 90 (( SECHIBA_WRITE_STEP = PeriodLengthInDays * 86400 / PeriodLengthInYears / 12 )) 91 ;; 92 *M|*m) 93 PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | awk -F '[mM]' '{print $1}' ) 94 (( SECHIBA_WRITE_STEP = PeriodLengthInDays * WriteInMonths * 86400 / PeriodLengthInMonths )) 95 ;; 96 *) 97 (( SECHIBA_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) * 86400 )) 98 if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 99 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE. 100 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${SECHIBA_WRITE_STEP}s 101 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history 102 fi 103 ;; 104 esac 105 ;; 106 5D|5d) 107 if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 108 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE. 109 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq 5d 110 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history 111 fi 112 (( SECHIBA_WRITE_STEP = 5 * 86400 )) 113 ;; 114 1D|1d) 115 if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 116 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE. 117 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq 1d 118 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history 119 fi 120 (( SECHIBA_WRITE_STEP = 86400 )) 121 ;; 122 *s) 123 WriteInSeconds=$( echo ${SRF_WriteFrequency} | awk -F '[s]' '{print $1}' ) 124 if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 125 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE. 126 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${WriteInSeconds}s 127 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history 128 fi 129 (( SECHIBA_WRITE_STEP = WriteInSeconds )) ;; 130 *) 131 IGCM_debug_Exit "SRF_Update " ${SRF_WriteFrequency} " invalid WriteFrequency : choose in 1Y, 1M, 5D, 1D." 132 IGCM_debug_Verif_Exit ;; 133 esac 134 135 #Use of XIOS ouputs only 136 137 if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 138 (( SECHIBA_WRITE_STEP = 0 )) 139 fi 140 IGCM_comp_modifyDefFile nonblocker orchidee.def WRITE_STEP ${SECHIBA_WRITE_STEP} 141 IGCM_comp_modifyDefFile nonblocker orchidee.def SECHIBA_HISTLEVEL ${orchidee_UserChoices_sechiba_LEVEL} 142 143 # Outputs HF in HISTFILE2 if required 144 if [ X${SRF_ok_hf} = Xy ] ; then 145 IGCM_comp_modifyDefFile nonblocker orchidee.def SECHIBA_HISTFILE2 y 146 if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 147 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba2 enabled .TRUE. 148 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba2 output_freq 10800s 149 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba2 name sechiba_out_2 150 fi 151 else 152 IGCM_comp_modifyDefFile nonblocker orchidee.def SECHIBA_HISTFILE2 n 153 fi 154 IGCM_comp_modifyDefFile nonblocker orchidee.def SECHIBA_HISTLEVEL2 1 155 IGCM_comp_modifyDefFile nonblocker orchidee.def WRITE_STEP2 10800.0 156 157 if ( [ ${CumulPeriod} -ne 1 ] || [ "${config_SRF_Restart}" != "n" ] ) ; then 158 IGCM_comp_modifyDefFile blocker orchidee.def SECHIBA_restart_in sechiba_rest_in.nc 159 else 160 IGCM_comp_modifyDefFile blocker orchidee.def SECHIBA_restart_in NONE 47 IGCM_comp_modifyDefFile blocker orchidee.def SECHIBA_restart_in NONE 161 48 fi 162 49 163 # Modify in orchidee.def VEGET_UPDATE and LAND_COVER_CHANGE if they are set in orchidee.card section UserChoices 164 if [ ! X${orchidee_UserChoices_VEGET_UPDATE} = X ] ; then 165 IGCM_comp_modifyDefFile nonblocker orchidee.def VEGET_UPDATE ${orchidee_UserChoices_VEGET_UPDATE} 166 else 167 IGCM_comp_modifyDefFile nonblocker orchidee.def VEGET_UPDATE 0Y 168 fi 169 if [ ! X${orchidee_UserChoices_LAND_COVER_CHANGE} = X ] ; then 170 IGCM_comp_modifyDefFile nonblocker orchidee.def LAND_COVER_CHANGE ${orchidee_UserChoices_LAND_COVER_CHANGE} 171 else 172 IGCM_comp_modifyDefFile nonblocker orchidee.def LAND_COVER_CHANGE n 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 173 53 fi 174 54 175 #IGCM_sys_Cp ${RUN_DIR}/orchidee.def ${RUN_DIR}/run.def 176 #IGCM_sys_Put_Out ${RUN_DIR}/run.def ${R_SAVE}/${PREFIX}_run.def 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. 57 if [ ! X${orchidee_UserChoices_VEGET_UPDATE} = X ] ; then 58 IGCM_comp_modifyDefFile nonblocker orchidee.def VEGET_UPDATE ${orchidee_UserChoices_VEGET_UPDATE} 59 else 60 IGCM_comp_modifyDefFile nonblocker orchidee.def VEGET_UPDATE 0Y 61 fi 177 62 178 #Temporary way to fix bug on cimean variable 179 IGCM_comp_modifyXmlFile force field_def_orchidee.xml cimean enabled .FALSE. 63 # Activate creation of river description file only for the first period 64 if [ ${CumulPeriod} -eq 1 ] ; then 65 IGCM_comp_modifyDefFile nonblocker orchidee.def RIVER_DESC y 66 else 67 IGCM_comp_modifyDefFile nonblocker orchidee.def RIVER_DESC n 68 fi 180 69 181 if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 70 71 ## 2. Mangement of output and modifications of related xml files 72 # Modify file_def_orchidee.xml file using settings from orchidee.card 73 # We here suppose that for each file, in 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. 77 78 if [ X${orchidee_UserChoices_output_level_sechiba_history} = X ] || [ X${orchidee_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 ${orchidee_UserChoices_output_level_sechiba_history} 87 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba1 output_freq ${orchidee_UserChoices_output_freq_sechiba_history} 88 fi 89 90 if [ X${orchidee_UserChoices_output_level_sechiba_out_2} = X ] || [ X${orchidee_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 ${orchidee_UserChoices_output_level_sechiba_out_2} 99 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba2 output_freq ${orchidee_UserChoices_output_freq_sechiba_out_2} 100 fi 101 102 if [ X${orchidee_UserChoices_output_level_sechiba_history_4dim} = X ] || [ X${orchidee_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 ${orchidee_UserChoices_output_level_sechiba_history_4dim} 111 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba3 output_freq ${orchidee_UserChoices_output_freq_sechiba_history_4dim} 112 fi 113 114 182 115 # Add include of orchidee context in iodef.xml 183 116 # In iodef.xml add on next line after "COMPONENT CONTEXT" 184 117 # <context id="orchidee" src="./context_orchidee.xml"/> 185 echo '<context id="orchidee" src="./context_orchidee.xml"/>' > add.tmp 186 cp iodef.xml iodef.xml.tmp 187 sed -e "/COMPONENT CONTEXT/r add.tmp" \ 188 iodef.xml.tmp > iodef.xml 189 rm iodef.xml.tmp add.tmp 118 echo '<context id="orchidee" src="./context_orchidee.xml"/>' > add.tmp 119 if [ X"$( echo ${config_UserChoices_ExpType} | grep CMIP6 )" != "X" ] ; then 120 echo '<context id="orchidee" src="./ping_orchidee.xml"/>' >> add.tmp 121 echo '<context id="orchidee" src="./dr2xml_orchidee.xml"/>' >> add.tmp 190 122 fi 123 cp iodef.xml iodef.xml.tmp 124 sed -e "/COMPONENT CONTEXT/r add.tmp" iodef.xml.tmp > iodef.xml 125 rm iodef.xml.tmp add.tmp 126 127 # Add LongName as global attribute in XIOS output files (if LongName is not empty) 128 if [ ! "X${config_UserChoices_LongName}" = "X" ] ; then 129 listfile=$(ls file_def*orchidee.xml) 130 echo "<variable id=\"LongName\" type=\"string\">${config_UserChoices_LongName}</variable>" > add.tmp 131 for file in ${listfile} 132 do 133 cp ${file} ${file}.tmp 134 sed -e "/<file id/r add.tmp" \ 135 ${file}.tmp > ${file} 136 rm ${file}.tmp 137 done 138 rm add.tmp 139 fi 140 191 141 192 142 IGCM_debug_PopStack "SRF_Update" … … 198 148 IGCM_debug_PushStack "SRF_Finalize" 199 149 200 #IGCM_sys_Put_Out ${RUN_DIR}/used_run.def ${R_SAVE}/${PREFIX}_used_run.def201 202 echo FINALIZE SRF !!!203 204 150 IGCM_debug_PopStack "SRF_Finalize" 205 151 } -
CONFIG/UNIFORM/v6/IPSLCM6CHT/GENERAL/DRIVER/pisces.driver
r2456 r3688 6 6 IGCM_debug_PushStack "MBG_Initialize" 7 7 8 # Local function to find namelists parameters 9 supergrep () { 10 grep "^ *$1 *=" $2 | sed -e "s% *\!.*%%" 11 } 8 # Local function to find parameters in LMDZ .def files 12 9 13 # Local function to find parameters in LMDZ .def files 14 15 lmdzgrep () { 16 grep $1 $2 |grep -v "#" | awk "-F=" '{print $2}' 10 lmdzgrep2 () { 11 grep -w ${1} ${2} | grep -v "#" | sed -e 's/=//g' -e 's/://g' -e 's/_AUTO_//' -e 's/DEFAULT//' | sed -e "s/${1}//" 17 12 } 18 13 … … 22 17 # nrsttr control of the time step (0, 1 or 2) 23 18 24 ##--Variables used by PISCES --25 26 NAMELIST_TOP_CFG=${SUBMIT_DIR}/PARAM/namelist_top_${RESOL_OCE}_cfg27 NAMELIST_PISCES_CFG=${SUBMIT_DIR}/PARAM/namelist_pisces_${RESOL_OCE}_cfg28 29 PAT_TOP_LRSTTR=$( supergrep ln_rsttr ${NAMELIST_TOP_CFG} )30 PAT_TOP_NRSTTR=$( supergrep nn_rsttr ${NAMELIST_TOP_CFG} )31 PAT_PIS_ATCCO2=$( supergrep atcco2 ${NAMELIST_PISCES_CFG} )32 PAT_PIS_LRIVER=$( supergrep ln_river ${NAMELIST_PISCES_CFG} )33 34 19 IGCM_debug_PopStack "MBG_Initialize" 35 20 } … … 40 25 IGCM_debug_PushStack "MBG_Update" 41 26 27 ##--Write Frequency for iomput 28 ## Differents frequencies are allowed for MBG files 29 30 VT1D_ENABLE=".FALSE." 31 VT5D_ENABLE=".FALSE." 32 VT1M_ENABLE=".FALSE." 33 VT1Y_ENABLE=".FALSE." 34 35 for frequency in ${config_MBG_WriteFrequency} ; do 36 case ${frequency} in 37 ( 1D|1d ) VT1D_ENABLE=".TRUE." ;; 38 ( 5D|5d ) VT5D_ENABLE=".TRUE." ;; 39 ( 1M|1m ) VT1M_ENABLE=".TRUE." ;; 40 ( *[yY] ) VT1Y_ENABLE=".TRUE." ;; 41 esac 42 done 43 42 44 ##-- Restart configuration 43 45 if ( [ "${CumulPeriod}" -eq 1 ] && [ "${config_MBG_Restart}" = "n" ] ) ; then 44 46 45 47 #echo "NO RESTART FOR TOP" 46 TOP_LRSTTR=.FALSE. 47 TOP_NRSTTR=0 48 49 PISCES_LRIVER=.FALSE. 48 TOP_LN_RSTR=.FALSE. 49 TOP_NN_RSTR=0 50 50 51 51 elif ( [ "${CumulPeriod}" -eq 1 ] && [ "${config_MBG_Restart}" = "y" ] ) ; then 52 52 53 53 #echo "RESTART TOP" 54 TOP_LRSTTR=.TRUE. 55 TOP_NRSTTR=0 56 57 PISCES_LRIVER=.TRUE. 54 TOP_LN_RSTR=.TRUE. 55 TOP_NN_RSTR=0 58 56 59 57 # If we start from IPSLCM5* restart files. … … 65 63 66 64 #echo "RESTART TOP" 67 TOP_LRSTTR=.TRUE. 68 TOP_NRSTTR=2 69 70 PISCES_LRIVER=.FALSE. 65 TOP_LN_RSTR=.TRUE. 66 TOP_NN_RSTR=2 71 67 72 68 fi … … 81 77 # update iodef.xml 82 78 83 echo 'Informations into iodef.xml : DBIO_ENABLE' 84 echo ${DBIO_ENABLE} 79 IGCM_debug_Print 1 " 'Informations into iodef.xml : DBIO_ENABLE : ${DBIO_ENABLE}" 85 80 86 81 sed -e "s/<DBIO_ENABLE>/${DBIO_ENABLE}/" \ … … 91 86 ##-- CO2 forcing : update atcco2 value in namelist_pisces_cfg 92 87 if [ "${pisces_UserChoices_CARBON_CYCLE}" = "y" ]; then 93 # Special case for carbon cycle88 IGCM_debug_Print 1 "Special case for carbon cycle" 94 89 # Activate this case by putting CARBON_CYCLE=y in pisces.card section UserChoices 95 echo'Update atcco2 in namelist_pisces_cfg with value from file co2.log'90 IGCM_debug_Print 1 'Update atcco2 in namelist_pisces_cfg with value from file co2.log' 96 91 PathCO2log=${SUBMIT_DIR} 97 92 PreviousLinelog=$( tail -1 ${PathCO2log}/co2.log ) 98 93 IPCC_PIS_CO2=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $4}' ) 99 sed -e "s%${PAT_PIS_ATCCO2}% atcco2=${IPCC_PIS_CO2}%" \ 100 namelist_pisces_cfg > namelist_pisces_cfg.tmp 101 IGCM_sys_Mv namelist_pisces_cfg.tmp namelist_pisces_cfg 94 IGCM_debug_Print 1 "IPCC_PIS_CO2 : ${IPCC_PIS_CO2} " 95 IGCM_comp_modifyNamelist force namelist_pisces_cfg atcco2 ${IPCC_PIS_CO2} 102 96 else 103 # Take same CO2 as for LMDZ, in parameter file config.def. 104 # ATM_Update is done before MBG_Update and therefor config.def file contains the correct value for CO2. 105 echo 'Update atcco2 in namelist_pisces_cfg with same value as for LMDZ' 106 LMDZ_CO2=$( lmdzgrep co2_ppm config.def ) 107 sed -e "s%${PAT_PIS_ATCCO2}% atcco2=${LMDZ_CO2}%" \ 108 namelist_pisces_cfg > namelist_pisces_cfg.tmp 109 IGCM_sys_Mv namelist_pisces_cfg.tmp namelist_pisces_cfg 97 IGCM_debug_Print 1 "Take same CO2 as for LMDZ, in parameter file config.def." 98 # ATM_Update is done before MBG_Update and therefore config.def file contains the correct value for CO2. 99 IGCM_debug_Print 1 'Update atcco2 in namelist_pisces_cfg with same value as for LMDZ' 100 LMDZ_CO2=$( lmdzgrep2 co2_ppm config.def ) 101 IGCM_debug_Print 1 "LMDZ_CO2 : ${LMDZ_CO2} " 102 IGCM_comp_modifyNamelist force namelist_pisces_cfg atcco2 ${LMDZ_CO2} 110 103 fi 111 104 112 105 ##-- Update namelist_top_cfg and namelist_pisces_cfg 106 IGCM_comp_modifyNamelist blocker namelist_top_cfg ln_rsttr ${TOP_LN_RSTR} 107 IGCM_comp_modifyNamelist blocker namelist_top_cfg nn_rsttr ${TOP_NN_RSTR} 108 IGCM_comp_modifyNamelist blocker namelist_pisces_cfg nn_pisdmp ${OPA_NPDT_YEAR} 109 110 # Update iodef.xml 113 111 114 sed -e "s%${PAT_TOP_LRSTTR}% ln_rsttr=${TOP_LRSTTR}%" \ 115 -e "s%${PAT_TOP_NRSTTR}% nn_rsttr=${TOP_NRSTTR}%" \ 116 namelist_top_cfg > namelist_top_cfg.tmp 112 if [ X"$( echo ${config_UserChoices_ExpType} | grep CMIP6 )" != "X" ] ; then 113 VT1D_ENABLE=".FALSE." 114 VT5D_ENABLE=".FALSE." 115 VT1M_ENABLE=".FALSE." 116 VT1Y_ENABLE=".FALSE." 117 fi 117 118 118 IGCM_sys_Mv namelist_top_cfg.tmp namelist_top_cfg 119 IGCM_debug_Print 1 'Informations into iodef.xml : VT1D_ENABLE VT5D_ENABLE VT1M_ENABLE VT1Y_ENABLE ' 120 IGCM_debug_Print 1 ${VT1D_ENABLE} ${VT5D_ENABLE} ${VT1M_ENABLE} ${VT1Y_ENABLE} 119 121 120 sed -e "s%${PAT_PIS_LRIVER}% ln_river=${PISCES_LRIVER}%" \ 121 namelist_pisces_cfg > namelist_pisces_cfg.tmp 122 123 IGCM_sys_Mv namelist_pisces_cfg.tmp namelist_pisces_cfg 124 125 122 IGCM_comp_modifyXmlFile nonblocker file_def_nemo-pisces.xml 1d_pis enabled ${VT1D_ENABLE} 123 IGCM_comp_modifyXmlFile nonblocker file_def_nemo-pisces.xml 5d_pis enabled ${VT5D_ENABLE} 124 IGCM_comp_modifyXmlFile nonblocker file_def_nemo-pisces.xml 1m_pis enabled ${VT1M_ENABLE} 125 IGCM_comp_modifyXmlFile nonblocker file_def_nemo-pisces.xml 1y_pis enabled ${VT1Y_ENABLE} 126 126 127 IGCM_debug_PopStack "MBG_Update" 127 128 } -
CONFIG/UNIFORM/v6/IPSLCM6CHT/GENERAL/DRIVER/stomate.driver
r2456 r3688 1 1 #!/bin/ksh 2 2 3 #D- Driver du script pour ORCHIDEE3 #D- Driver for ORCHIDEE stomate component (SBG) 4 4 5 5 #----------------------------------------------------------------- … … 8 8 IGCM_debug_PushStack "SBG_Initialize" 9 9 10 RESOL_SBG=ALL11 12 10 IGCM_debug_PopStack "SBG_Initialize" 13 11 } … … 17 15 { 18 16 IGCM_debug_PushStack "SBG_Update" 19 20 typeset STOMATE_WRITE_STEP 21 22 if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 23 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .FALSE. 24 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .FALSE. 25 fi 26 case ${config_SBG_WriteFrequency} in 27 *Y|*y) 28 WriteInYears=$( echo ${config_SBG_WriteFrequency} | awk -F '[yY]' '{print $1}' ) 29 PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' ) 30 (( STOMATE_WRITE_STEP = PeriodLengthInDays * WriteInYears / PeriodLengthInYears )) 31 if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 32 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE. 33 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq ${WriteInYears}y 34 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history 35 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE. 36 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq ${WriteInYears}y 37 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history 38 39 fi 40 ;; 41 1M|1m) 42 if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 43 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE. 44 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq 1mo 45 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history 46 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE. 47 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq 1mo 48 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history 49 fi 50 case ${config_UserChoices_PeriodLength} in 51 *Y|*y) 52 STOMATE_WRITE_STEP=-1. 53 ;; 54 *M|*m) 55 STOMATE_WRITE_STEP=-1. 56 ;; 57 *) 58 (( STOMATE_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) )) ;; 59 esac 60 ;; 61 *M|*m) 62 WriteInMonths=$( echo ${config_SBG_WriteFrequency} | awk -F '[mM]' '{print $1}' ) 63 if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 64 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE. 65 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq ${WriteInMonths}mo 66 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history 67 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE. 68 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq ${WriteInMonths}mo 69 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history 70 fi 71 case ${config_UserChoices_PeriodLength} in 72 *Y|*y) 73 PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' ) 74 (( STOMATE_WRITE_STEP = 30 )) 75 ;; 76 *M|*m) 77 PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | awk -F '[mM]' '{print $1}' ) 78 (( STOMATE_WRITE_STEP = PeriodLengthInDays * WriteInMonths / PeriodLengthInMonths )) 79 ;; 80 *) 81 (( STOMATE_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) )) 82 if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 83 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE. 84 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq ${STOMATE_WRITE_STEP}s 85 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history 86 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE. 87 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq ${STOMATE_WRITE_STEP}s 88 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history 89 fi 90 ;; 91 esac 92 ;; 93 5D|5d) 94 (( STOMATE_WRITE_STEP = 5 )) 95 if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 96 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE. 97 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq 5d 98 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history 99 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE. 100 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq 5d 101 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history 102 fi 103 ;; 104 1D|1d) 105 (( STOMATE_WRITE_STEP = 1 )) 106 if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 107 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE. 108 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq 1d 109 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history 110 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE. 111 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq 1d 112 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history 113 fi 114 ;; 115 *s) 116 WriteInSeconds=$( echo ${config_SBG_WriteFrequency} | awk -F '[s]' '{print $1}' ) 117 if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 118 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE. 119 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${WriteInSeconds}s 120 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history 121 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE. 122 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq ${WriteInSeconds}s 123 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history 124 fi 125 (( STOMATE_WRITE_STEP = 1 )) ;; 126 *) 127 IGCM_debug_Exit "SBG_Update " ${config_SBG_WriteFrequency} " invalid WriteFrequency : choose in 1Y, 1M, 5D, 1D." 128 IGCM_debug_Verif_Exit ;; 129 esac 130 131 132 #Use of XIOS library only 133 134 if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 135 (( STOMATE_WRITE_STEP = 0 )) 17 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} 136 46 fi 137 47 138 IGCM_comp_modifyDefFile nonblocker orchidee.def STOMATE_HIST_DT ${STOMATE_WRITE_STEP} 139 IGCM_comp_modifyDefFile nonblocker orchidee.def STOMATE_HISTLEVEL ${stomate_UserChoices_stomate_LEVEL} 48 140 49 50 # Define in orchidee.def if restart file should be used 141 51 if ( [ ${CumulPeriod} -eq 1 ] && [ "${config_SBG_Restart}" = "n" ] ) ; then 142 143 52 echo "STOMATE : without restart" 53 IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_RESTART_FILEIN NONE 144 54 else 145 55 IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_RESTART_FILEIN stomate_rest_in.nc 146 56 fi 147 57 … … 152 62 function SBG_Finalize 153 63 { 154 #set -vx155 64 IGCM_debug_PushStack "SBG_Finalize" 156 157 if [ $( IGCM_date_DaysBetweenGregorianDate ${PeriodDateEnd} ${year}1230 ) -ge 0 ] ; then 158 IGCM_sys_Put_Out stomate_Cforcing.nc ${R_OUT_SBG_R}/${config_UserChoices_JobName}_${PeriodDateEnd}_stomate_Cforcing.nc 159 IGCM_sys_Put_Out stomate_forcing.nc ${R_OUT_SBG_R}/${config_UserChoices_JobName}_${PeriodDateEnd}_stomate_forcing.nc 160 # rm -f stomate_Cforcing.nc 161 # rm -f stomate_forcing.nc 162 fi 163 65 164 66 IGCM_debug_PopStack "SBG_Finalize" 165 67 } -
CONFIG/UNIFORM/v6/IPSLCM6CHT/GENERAL/DRIVER/xios.driver
r2456 r3688 18 18 # Activate server mode 19 19 IGCM_comp_modifyXmlFile force iodef.xml using_server NONE true 20 # If lmdz_UserChoices_XIOS=y add LMDZ as component id : 21 if [ X${lmdz_UserChoices_XIOS} = Xy ] ; then 22 IGCM_comp_modifyXmlFile force iodef.xml oasis_codes_id NONE LMDZ,oceanx 23 fi 20 24 21 if [ -f namcouple ] ; then 25 22 sed -e "s/2 LMDZ oceanx/3 LMDZ oceanx ${config_Executable_IOS[1]}/" namcouple > namcouple.tmp
Note: See TracChangeset
for help on using the changeset viewer.