1 | #ifdef ISO |
---|
2 | ! $Id: $ |
---|
3 | |
---|
4 | MODULE isotopes_mod |
---|
5 | USE lmdz_strings, ONLY: msg, real2str, int2str, bool2str, maxlen, strIdx, strStack |
---|
6 | USE infotrac_phy, ONLY: isoName |
---|
7 | IMPLICIT NONE |
---|
8 | INTERFACE get_in; MODULE PROCEDURE getinp_s, getinp_i, getinp_r, getinp_l; END INTERFACE get_in |
---|
9 | |
---|
10 | !--- Contains all isotopic variables + their initialization |
---|
11 | !--- Isotopes-specific routines are in isotopes_routines_mod to avoid circular dependencies with isotopes_verif_mod. |
---|
12 | |
---|
13 | !--- Isotopes indices (in [1,niso] ; non-existing => 0 index) |
---|
14 | INTEGER, SAVE :: iso_eau, iso_HDO, iso_O18, iso_O17, iso_HTO |
---|
15 | !$OMP THREADPRIVATE(iso_eau, iso_HDO, iso_O18, iso_O17, iso_HTO) |
---|
16 | |
---|
17 | INTEGER, SAVE :: ntracisoOR |
---|
18 | !$OMP THREADPRIVATE(ntracisoOR) |
---|
19 | |
---|
20 | !--- Variables not depending on isotopes |
---|
21 | REAL, SAVE :: thumxt1 |
---|
22 | !$OMP THREADPRIVATE(thumxt1) |
---|
23 | INTEGER, SAVE :: ntot |
---|
24 | !$OMP THREADPRIVATE(ntot) |
---|
25 | REAL, SAVE :: h_land_ice |
---|
26 | !$OMP THREADPRIVATE(h_land_ice) |
---|
27 | REAL, SAVE :: P_veg |
---|
28 | !$OMP THREADPRIVATE(P_veg) |
---|
29 | REAL, SAVE :: lambda_sursat |
---|
30 | !$OMP THREADPRIVATE(lambda_sursat) |
---|
31 | LOGICAL, SAVE :: bidouille_anti_divergence ! T: regularly, xteau <- q to avoid slow drifts |
---|
32 | !$OMP THREADPRIVATE(bidouille_anti_divergence) |
---|
33 | LOGICAL, SAVE :: essai_convergence ! F: as in LMDZ without isotopes (bad for isotopes) |
---|
34 | !$OMP THREADPRIVATE(essai_convergence) |
---|
35 | INTEGER, SAVE :: initialisation_iso ! 0: file ; 1: R=0 ; 2: R=distill. Rayleigh ; 3: R=Rsmow |
---|
36 | !$OMP THREADPRIVATE(initialisation_iso) |
---|
37 | INTEGER, SAVE :: modif_SST ! 0: default ; 1: modified SST ; 2, 3: SST profiles |
---|
38 | !$OMP THREADPRIVATE(modif_SST) |
---|
39 | REAL, SAVE :: deltaTtest ! Uniform modification of the SST |
---|
40 | !$OMP THREADPRIVATE(deltaTtest) |
---|
41 | INTEGER, SAVE :: modif_sic ! Holes in the Sea Ice |
---|
42 | !$OMP THREADPRIVATE(modif_sic) |
---|
43 | REAL, SAVE :: deltasic ! Minimal holes fraction |
---|
44 | !$OMP THREADPRIVATE(deltasic) |
---|
45 | REAL, SAVE :: deltaTtestpoles |
---|
46 | !$OMP THREADPRIVATE(deltaTtestpoles) |
---|
47 | REAL, SAVE :: sstlatcrit, dsstlatcrit |
---|
48 | !$OMP THREADPRIVATE(sstlatcrit, dsstlatcrit) |
---|
49 | INTEGER, SAVE :: albedo_prescrit ! 0: default ; 1: constant albedo |
---|
50 | !$OMP THREADPRIVATE(albedo_prescrit) |
---|
51 | REAL, SAVE :: lon_min_albedo, lon_max_albedo, lat_min_albedo, lat_max_albedo |
---|
52 | !$OMP THREADPRIVATE(lon_min_albedo, lon_max_albedo, lat_min_albedo, lat_max_albedo) |
---|
53 | REAL, SAVE :: deltaP_BL,tdifexp_sol |
---|
54 | !$OMP THREADPRIVATE(deltaP_BL,tdifexp_sol) |
---|
55 | INTEGER, SAVE :: ruissellement_pluie, alphak_stewart |
---|
56 | !$OMP THREADPRIVATE(ruissellement_pluie, alphak_stewart) |
---|
57 | INTEGER, SAVE :: calendrier_guide |
---|
58 | !$OMP THREADPRIVATE(calendrier_guide) |
---|
59 | INTEGER, SAVE :: cste_surf_cond |
---|
60 | !$OMP THREADPRIVATE(cste_surf_cond) |
---|
61 | REAL, SAVE :: mixlen |
---|
62 | !$OMP THREADPRIVATE(mixlen) |
---|
63 | INTEGER, SAVE :: evap_cont_cste |
---|
64 | !$OMP THREADPRIVATE(evap_cont_cste) |
---|
65 | REAL, SAVE :: deltaO18_evap_cont, d_evap_cont |
---|
66 | !$OMP THREADPRIVATE(deltaO18_evap_cont, d_evap_cont) |
---|
67 | INTEGER, SAVE :: nudge_qsol, region_nudge_qsol |
---|
68 | !$OMP THREADPRIVATE(nudge_qsol, region_nudge_qsol) |
---|
69 | INTEGER, SAVE :: nlevmaxO17 |
---|
70 | !$OMP THREADPRIVATE(nlevmaxO17) |
---|
71 | INTEGER, SAVE :: no_pce |
---|
72 | !$OMP THREADPRIVATE(no_pce) |
---|
73 | REAL, SAVE :: A_satlim |
---|
74 | !$OMP THREADPRIVATE(A_satlim) |
---|
75 | INTEGER, SAVE :: ok_restrict_A_satlim, modif_ratqs |
---|
76 | !$OMP THREADPRIVATE(ok_restrict_A_satlim, modif_ratqs) |
---|
77 | REAL, SAVE :: Pcrit_ratqs, ratqsbasnew |
---|
78 | !$OMP THREADPRIVATE(Pcrit_ratqs, ratqsbasnew) |
---|
79 | REAL, SAVE :: fac_modif_evaoce |
---|
80 | !$OMP THREADPRIVATE(fac_modif_evaoce) |
---|
81 | REAL, SAVE :: deltaO18_oce |
---|
82 | !$OMP THREADPRIVATE(deltaO18_oce) |
---|
83 | INTEGER, SAVE :: ok_bidouille_wake |
---|
84 | !$OMP THREADPRIVATE(ok_bidouille_wake) |
---|
85 | LOGICAL, SAVE :: cond_temp_env |
---|
86 | !$OMP THREADPRIVATE(cond_temp_env) |
---|
87 | |
---|
88 | !--- Vectors of length "niso" |
---|
89 | REAL, ALLOCATABLE, DIMENSION(:), SAVE :: & |
---|
90 | tnat, toce, tcorr, tdifrel |
---|
91 | !$OMP THREADPRIVATE(tnat, toce, tcorr, tdifrel) |
---|
92 | REAL, ALLOCATABLE, DIMENSION(:), SAVE :: & |
---|
93 | talph1, talph2, talph3, talps1, talps2 |
---|
94 | !$OMP THREADPRIVATE(talph1, talph2, talph3, talps1, talps2) |
---|
95 | REAL, ALLOCATABLE, DIMENSION(:), SAVE :: & |
---|
96 | tkcin0, tkcin1, tkcin2 |
---|
97 | !$OMP THREADPRIVATE(tkcin0, tkcin1, tkcin2) |
---|
98 | REAL, ALLOCATABLE, DIMENSION(:), SAVE :: & |
---|
99 | alpha_liq_sol, Rdefault, Rmethox |
---|
100 | !$OMP THREADPRIVATE(alpha_liq_sol, Rdefault, Rmethox) |
---|
101 | ! REAL, SAVE :: fac_coeff_eq17_liq, fac_coeff_eq17_ice |
---|
102 | !!$OMP THREADPRIVATE(fac_coeff_eq17_liq, fac_coeff_eq17_ice) |
---|
103 | |
---|
104 | !--- H2[18]O reference |
---|
105 | REAL, PARAMETER :: fac_enrichoce18=0.0005 |
---|
106 | REAL, PARAMETER :: alpha_liq_sol_O18=1.00291 |
---|
107 | REAL, PARAMETER :: talph1_O18=1137. |
---|
108 | REAL, PARAMETER :: talph2_O18=-0.4156 |
---|
109 | REAL, PARAMETER :: talph3_O18=-2.0667E-3 |
---|
110 | REAL, PARAMETER :: talps1_O18=11.839 |
---|
111 | REAL, PARAMETER :: talps2_O18=-0.028244 |
---|
112 | REAL, PARAMETER :: tdifrel_O18=1./0.9723 |
---|
113 | REAL, PARAMETER :: tkcin0_O18=0.006 |
---|
114 | REAL, PARAMETER :: tkcin1_O18=0.000285 |
---|
115 | REAL, PARAMETER :: tkcin2_O18=0.00082 |
---|
116 | REAL, PARAMETER :: fac_coeff_eq17_liq=0.529 |
---|
117 | REAL, PARAMETER :: fac_coeff_eq17_ice=0.529 |
---|
118 | |
---|
119 | !---- Parameters that do not depend on the nature of water isotopes: |
---|
120 | REAL, PARAMETER :: pxtmelt = 273.15 ! temperature at which ice formation starts |
---|
121 | REAL, PARAMETER :: pxtice = 273.15-10.0 ! -- temperature at which all condensate is ice: |
---|
122 | REAL, PARAMETER :: pxtmin = 273.15 - 120.0 ! On ne calcule qu'au dessus de -120°C |
---|
123 | REAL, PARAMETER :: pxtmax = 273.15 + 60.0 ! On ne calcule qu'au dessus de +60°C |
---|
124 | REAL, PARAMETER :: tdifexp = 0.58 ! -- a constant for alpha_eff for equilibrium below cloud base: |
---|
125 | REAL, PARAMETER :: tv0cin = 7.0 ! wind threshold (m/s) for smooth/rough regime (Merlivat and Jouzel 1979) |
---|
126 | REAL, PARAMETER :: musi=1.0 ! facteurs lambda et mu dans Si=musi-lambda*T |
---|
127 | REAL, PARAMETER :: Kd=2.5e-9 ! m2/s ! diffusion dans le sol |
---|
128 | REAL, PARAMETER :: rh_cste_surf_cond = 0.6 ! cas où cste_surf_cond: on met rhs ou/et Ts cste pour voir |
---|
129 | REAL, PARAMETER :: T_cste_surf_cond = 288.0 |
---|
130 | |
---|
131 | |
---|
132 | !--- Negligible lower thresholds: no need to check for absurd values under these lower limits |
---|
133 | REAL, PARAMETER :: & |
---|
134 | ridicule = 1e-12, & ! For mixing ratios |
---|
135 | ridicule_rain = 1e-8, & ! For rain fluxes (rain, zrfl...) in kg/s <-> 1e-3 mm/day |
---|
136 | ridicule_evap = ridicule_rain*1e-2, & ! For evaporations in kg/s <-> 1e-3 mm/day |
---|
137 | ridicule_qsol = ridicule_rain, & ! For qsol in kg <-> 1e-8 kg |
---|
138 | ridicule_snow = ridicule_qsol ! For snow in kg <-> 1e-8 kg |
---|
139 | REAL, PARAMETER :: expb_max = 30.0 |
---|
140 | |
---|
141 | !--- Specific to HTO: |
---|
142 | LOGICAL, SAVE :: ok_prod_nucl_tritium !--- TRUE => HTO production by nuclear tests |
---|
143 | !$OMP THREADPRIVATE(ok_prod_nucl_tritium) |
---|
144 | INTEGER, PARAMETER :: nessai = 486 |
---|
145 | INTEGER, DIMENSION(nessai) :: & |
---|
146 | day_nucl, month_nucl, year_nucl |
---|
147 | !$OMP THREADPRIVATE(day_nucl, month_nucl, year_nucl) |
---|
148 | REAL, DIMENSION(nessai) :: & |
---|
149 | lat_nucl, lon_nucl, zmin_nucl, zmax_nucl, HTO_nucl |
---|
150 | !$OMP THREADPRIVATE(lat_nucl, lon_nucl, zmin_nucl, zmax_nucl, HTO_nucl) |
---|
151 | |
---|
152 | |
---|
153 | CONTAINS |
---|
154 | |
---|
155 | SUBROUTINE iso_init() |
---|
156 | USE infotrac_phy, ONLY: ntiso, niso, getKey |
---|
157 | USE lmdz_strings, ONLY: maxlen |
---|
158 | IMPLICIT NONE |
---|
159 | |
---|
160 | !=== Local variables: |
---|
161 | INTEGER :: ixt |
---|
162 | LOGICAL :: ltnat1 |
---|
163 | CHARACTER(LEN=maxlen) :: modname, sxt |
---|
164 | |
---|
165 | !--- For H2[17]O |
---|
166 | REAL :: fac_kcin, pente_MWL |
---|
167 | |
---|
168 | !--- Sensitivity tests |
---|
169 | LOGICAL, PARAMETER :: ok_nocinsfc = .FALSE. ! if T: no kinetic effect in sfc evap |
---|
170 | LOGICAL, PARAMETER :: ok_nocinsat = .FALSE. ! if T: no sursaturation effect for ice |
---|
171 | LOGICAL, PARAMETER :: Rdefault_smow = .FALSE. ! if T: Rdefault=smow; if F: nul |
---|
172 | |
---|
173 | !--- For [3]H |
---|
174 | INTEGER :: iessai |
---|
175 | |
---|
176 | modname = 'iso_init' |
---|
177 | CALL msg('219: entree', modname) |
---|
178 | |
---|
179 | !-------------------------------------------------------------- |
---|
180 | ! General: |
---|
181 | !-------------------------------------------------------------- |
---|
182 | |
---|
183 | !--- Check number of isotopes |
---|
184 | CALL msg('64: niso = '//TRIM(int2str(niso)), modname) |
---|
185 | |
---|
186 | !--- Init de ntracisoOR: on ecrasera en cas de traceurs de tagging isotopiques |
---|
187 | ! (nzone>0) si complications avec ORCHIDEE |
---|
188 | ntracisoOR = ntiso |
---|
189 | |
---|
190 | !--- Type of water isotopes: |
---|
191 | iso_eau = strIdx(isoName, 'H216O'); CALL msg('iso_eau='//int2str(iso_eau), modname) |
---|
192 | iso_HDO = strIdx(isoName, 'HDO'); CALL msg('iso_HDO='//int2str(iso_HDO), modname) |
---|
193 | iso_O18 = strIdx(isoName, 'H218O'); CALL msg('iso_O18='//int2str(iso_O18), modname) |
---|
194 | iso_O17 = strIdx(isoName, 'H217O'); CALL msg('iso_O17='//int2str(iso_O17), modname) |
---|
195 | iso_HTO = strIdx(isoName, 'HTO'); CALL msg('iso_HTO='//int2str(iso_HTO), modname) |
---|
196 | |
---|
197 | !--- Initialiaation: reading the isotopic parameters. |
---|
198 | CALL get_in('lambda', lambda_sursat, 0.004) |
---|
199 | CALL get_in('thumxt1', thumxt1, 0.75*1.2) |
---|
200 | CALL get_in('ntot', ntot, 20, .FALSE.) |
---|
201 | CALL get_in('h_land_ice', h_land_ice, 20., .FALSE.) |
---|
202 | CALL get_in('P_veg', P_veg, 1.0, .FALSE.) |
---|
203 | CALL get_in('bidouille_anti_divergence', bidouille_anti_divergence, .FALSE.) |
---|
204 | CALL get_in('essai_convergence', essai_convergence, .FALSE.) |
---|
205 | CALL get_in('initialisation_iso', initialisation_iso, 0) |
---|
206 | |
---|
207 | ! IF(nzone>0 .AND. initialisation_iso==0) & |
---|
208 | ! CALL get_in('initialisation_isotrac',initialisation_isotrac) |
---|
209 | CALL get_in('modif_sst', modif_sst, 0) |
---|
210 | CALL get_in('deltaTtest', deltaTtest, 0.0) !--- For modif_sst>=1 |
---|
211 | CALL get_in('deltaTtestpoles',deltaTtestpoles, 0.0) !--- For modif_sst>=2 |
---|
212 | CALL get_in( 'sstlatcrit', sstlatcrit, 30.0) !--- For modif_sst>=3 |
---|
213 | CALL get_in('dsstlatcrit', dsstlatcrit, 0.0) !--- For modif_sst>=3 |
---|
214 | #ifdef ISOVERIF |
---|
215 | CALL msg('iso_init 270: sstlatcrit='//real2str( sstlatcrit), modname, sstlatcrit < 0.0) !--- For modif_sst>=2 |
---|
216 | CALL msg('iso_init 279: dsstlatcrit='//real2str(dsstlatcrit), modname, sstlatcrit < 0.0) !--- For modif_sst>=3 |
---|
217 | IF(modif_sst >= 2 .AND. sstlatcrit < 0.0) STOP |
---|
218 | #endif |
---|
219 | |
---|
220 | CALL get_in('modif_sic', modif_sic, 0) |
---|
221 | IF(modif_sic >= 1) & |
---|
222 | CALL get_in('deltasic', deltasic, 0.1) |
---|
223 | |
---|
224 | CALL get_in('albedo_prescrit', albedo_prescrit, 0) |
---|
225 | IF(albedo_prescrit == 1) THEN |
---|
226 | CALL get_in('lon_min_albedo', lon_min_albedo, -200.) |
---|
227 | CALL get_in('lon_max_albedo', lon_max_albedo, 200.) |
---|
228 | CALL get_in('lat_min_albedo', lat_min_albedo, -100.) |
---|
229 | CALL get_in('lat_max_albedo', lat_max_albedo, 100.) |
---|
230 | END IF |
---|
231 | CALL get_in('deltaP_BL', deltaP_BL, 10.0) |
---|
232 | CALL get_in('ruissellement_pluie', ruissellement_pluie, 0) |
---|
233 | CALL get_in('alphak_stewart', alphak_stewart, 1) |
---|
234 | CALL get_in('tdifexp_sol', tdifexp_sol, 0.67) |
---|
235 | CALL get_in('calendrier_guide', calendrier_guide, 0) |
---|
236 | CALL get_in('cste_surf_cond', cste_surf_cond, 0) |
---|
237 | CALL get_in('mixlen', mixlen, 35.0) |
---|
238 | CALL get_in('evap_cont_cste', evap_cont_cste, 0) |
---|
239 | CALL get_in('deltaO18_evap_cont', deltaO18_evap_cont,0.0) |
---|
240 | CALL get_in('d_evap_cont', d_evap_cont, 0.0) |
---|
241 | CALL get_in('nudge_qsol', nudge_qsol, 0) |
---|
242 | CALL get_in('region_nudge_qsol', region_nudge_qsol, 1) |
---|
243 | nlevmaxO17 = 50 |
---|
244 | CALL msg('nlevmaxO17='//TRIM(int2str(nlevmaxO17))) |
---|
245 | CALL get_in('no_pce', no_pce, 0) |
---|
246 | CALL get_in('A_satlim', A_satlim, 1.0) |
---|
247 | CALL get_in('ok_restrict_A_satlim', ok_restrict_A_satlim, 0) |
---|
248 | #ifdef ISOVERIF |
---|
249 | CALL msg(' 315: A_satlim='//real2str(A_satlim), modname, A_satlim > 1.0) |
---|
250 | IF(A_satlim > 1.0) STOP |
---|
251 | #endif |
---|
252 | ! CALL get_in('slope_limiterxy', slope_limiterxy, 2.0) |
---|
253 | ! CALL get_in('slope_limiterz', slope_limiterz, 2.0) |
---|
254 | CALL get_in('modif_ratqs', modif_ratqs, 0) |
---|
255 | CALL get_in('Pcrit_ratqs', Pcrit_ratqs, 500.0) |
---|
256 | CALL get_in('ratqsbasnew', ratqsbasnew, 0.05) |
---|
257 | CALL get_in('fac_modif_evaoce', fac_modif_evaoce, 1.0) |
---|
258 | CALL get_in('ok_bidouille_wake', ok_bidouille_wake, 0) |
---|
259 | ! si oui, la temperature de cond est celle de l'environnement, pour eviter |
---|
260 | ! bugs quand temperature dans ascendances convs est mal calculee |
---|
261 | CALL get_in('cond_temp_env', cond_temp_env, .FALSE.) |
---|
262 | IF(ANY(isoName == 'HTO')) & |
---|
263 | CALL get_in('ok_prod_nucl_tritium', ok_prod_nucl_tritium, .FALSE., .FALSE.) |
---|
264 | CALL get_in('tnateq1', ltnat1, .TRUE.) |
---|
265 | |
---|
266 | ! Ocean composition |
---|
267 | CALL get_in('deltaO18_oce', deltaO18_oce, 0.0) |
---|
268 | |
---|
269 | CALL msg('iso_O18, iso_HDO, iso_eau = '//TRIM(strStack(int2str([iso_O18, iso_HDO, iso_eau]))), modname) |
---|
270 | |
---|
271 | !-------------------------------------------------------------- |
---|
272 | ! Isotope fractionation factors and a few isotopic constants |
---|
273 | !-------------------------------------------------------------- |
---|
274 | ALLOCATE(tkcin0(niso)) |
---|
275 | ALLOCATE(tkcin1(niso)) |
---|
276 | ALLOCATE(tkcin2(niso)) |
---|
277 | ALLOCATE(tnat(niso)) |
---|
278 | ALLOCATE(tdifrel(niso)) |
---|
279 | ALLOCATE(toce(niso)) |
---|
280 | ALLOCATE(tcorr(niso)) |
---|
281 | ALLOCATE(talph1(niso)) |
---|
282 | ALLOCATE(talph2(niso)) |
---|
283 | ALLOCATE(talph3(niso)) |
---|
284 | ALLOCATE(talps1(niso)) |
---|
285 | ALLOCATE(talps2(niso)) |
---|
286 | ALLOCATE(alpha_liq_sol(niso)) |
---|
287 | ALLOCATE(Rdefault(niso)) |
---|
288 | ALLOCATE(Rmethox(niso)) |
---|
289 | |
---|
290 | DO ixt=1,niso |
---|
291 | IF (ixt.EQ.iso_HTO) then ! Tritium |
---|
292 | tkcin0(ixt) = 0.01056 |
---|
293 | tkcin1(ixt) = 0.0005016 |
---|
294 | tkcin2(ixt) = 0.0014432 |
---|
295 | tnat(ixt) = 0.0; IF(ltnat1) tnat(ixt)=1 |
---|
296 | toce(ixt)=4.0E-19 ! rapport T/H = 0.2 TU Dreisigacker and Roether 1978 |
---|
297 | tcorr(ixt)=1. |
---|
298 | tdifrel(ixt)=1./0.968 |
---|
299 | talph1(ixt)=46480. |
---|
300 | talph2(ixt)=-103.87 |
---|
301 | talph3(ixt)=0. |
---|
302 | talps1(ixt)=46480. |
---|
303 | talps2(ixt)=-103.87 |
---|
304 | alpha_liq_sol(ixt)=1. |
---|
305 | Rmethox(ixt)=0.0 |
---|
306 | endif |
---|
307 | IF (ixt.EQ.iso_O17) then ! O17 |
---|
308 | pente_MWL=0.528 |
---|
309 | tdifrel(ixt)=1./0.98555 ! valeur utilisée en 1D et dans modèle de LdG ! tdifrel(ixt)=1./0.985452 ! donné par Amaelle |
---|
310 | fac_kcin= (tdifrel(ixt)-1.0)/(tdifrel_O18-1.0) ! fac_kcin=0.5145 ! donné par Amaelle |
---|
311 | tkcin0(ixt) = tkcin0_O18*fac_kcin |
---|
312 | tkcin1(ixt) = tkcin1_O18*fac_kcin |
---|
313 | tkcin2(ixt) = tkcin2_O18*fac_kcin |
---|
314 | tnat(ixt)=0.004/100. ! O17 représente 0.004% de l'oxygène |
---|
315 | IF(ltnat1) tnat(ixt)=1 |
---|
316 | toce(ixt)=tnat(ixt)*(1.0+deltaO18_oce/1000.0)**pente_MWL |
---|
317 | tcorr(ixt)=1.0+fac_enrichoce18*pente_MWL ! donné par Amaelle |
---|
318 | talph1(ixt)=talph1_O18 |
---|
319 | talph2(ixt)=talph2_O18 |
---|
320 | talph3(ixt)=talph3_O18 |
---|
321 | talps1(ixt)=talps1_O18 |
---|
322 | talps2(ixt)=talps2_O18 |
---|
323 | alpha_liq_sol(ixt)=(alpha_liq_sol_O18)**fac_coeff_eq17_liq |
---|
324 | Rdefault(ixt)=tnat(ixt)*(-3.15/1000.0+1.0) |
---|
325 | Rmethox(ixt)=(230./1000.+1.)*tnat(ixt) !Zahn et al 2006 |
---|
326 | endif |
---|
327 | IF (ixt.EQ.iso_O18) then ! Oxygene18 |
---|
328 | tkcin0(ixt) = tkcin0_O18 |
---|
329 | tkcin1(ixt) = tkcin1_O18 |
---|
330 | tkcin2(ixt) = tkcin2_O18 |
---|
331 | tnat(ixt)=2005.2E-6; IF(ltnat1) tnat(ixt)=1 |
---|
332 | toce(ixt)=tnat(ixt)*(1.0+deltaO18_oce/1000.0) |
---|
333 | tcorr(ixt)=1.0+fac_enrichoce18 |
---|
334 | tdifrel(ixt)=tdifrel_O18 |
---|
335 | talph1(ixt)=talph1_O18 |
---|
336 | talph2(ixt)=talph2_O18 |
---|
337 | talph3(ixt)=talph3_O18 |
---|
338 | talps1(ixt)=talps1_O18 |
---|
339 | talps2(ixt)=talps2_O18 |
---|
340 | alpha_liq_sol(ixt)=alpha_liq_sol_O18 |
---|
341 | Rdefault(ixt)=tnat(ixt)*(-6.0/1000.0+1.0) |
---|
342 | Rmethox(ixt)=(130./1000.+1.)*tnat(ixt) !Zahn et al 2006 |
---|
343 | endif |
---|
344 | IF (ixt.EQ.iso_HDO) then ! Deuterium |
---|
345 | pente_MWL=8.0 |
---|
346 | tdifrel(ixt)=1./0.9755 ! fac_kcin=0.88 |
---|
347 | fac_kcin= (tdifrel(ixt)-1)/(tdifrel_O18-1) |
---|
348 | tkcin0(ixt) = tkcin0_O18*fac_kcin |
---|
349 | tkcin1(ixt) = tkcin1_O18*fac_kcin |
---|
350 | tkcin2(ixt) = tkcin2_O18*fac_kcin |
---|
351 | tnat(ixt)=155.76E-6; IF(ltnat1) tnat(ixt)=1 |
---|
352 | toce(ixt)=tnat(ixt)*(1.0+pente_MWL*deltaO18_oce/1000.0) |
---|
353 | tcorr(ixt)=1.0+fac_enrichoce18*pente_MWL |
---|
354 | talph1(ixt)=24844. |
---|
355 | talph2(ixt)=-76.248 |
---|
356 | talph3(ixt)=52.612E-3 |
---|
357 | talps1(ixt)=16288. |
---|
358 | talps2(ixt)=-0.0934 |
---|
359 | !ZXalpha_liq_sol=1.0192 ! Weston, Ralph, 1955 |
---|
360 | alpha_liq_sol(ixt)=1.0212 |
---|
361 | ! valeur de Lehmann & Siegenthaler, 1991, Journal of |
---|
362 | ! Glaciology, vol 37, p 23 |
---|
363 | Rdefault(ixt)=tnat(ixt)*((-6.0*pente_MWL+10.0)/1000.0+1.0) |
---|
364 | Rmethox(ixt)=tnat(ixt)*(-25.0/1000.+1.) ! Zahn et al 2006 |
---|
365 | endif |
---|
366 | IF (ixt.EQ.iso_eau) then ! Oxygene16 |
---|
367 | tkcin0(ixt) = 0.0 |
---|
368 | tkcin1(ixt) = 0.0 |
---|
369 | tkcin2(ixt) = 0.0 |
---|
370 | tnat(ixt)=1. |
---|
371 | toce(ixt)=tnat(ixt) |
---|
372 | tcorr(ixt)=1.0 |
---|
373 | tdifrel(ixt)=1. |
---|
374 | talph1(ixt)=0. |
---|
375 | talph2(ixt)=0. |
---|
376 | talph3(ixt)=0. |
---|
377 | talps1(ixt)=0. |
---|
378 | talph3(ixt)=0. |
---|
379 | alpha_liq_sol(ixt)=1. |
---|
380 | Rdefault(ixt)=tnat(ixt)*1.0 |
---|
381 | Rmethox(ixt)=1.0 |
---|
382 | endif |
---|
383 | enddo ! ixt=1,niso |
---|
384 | |
---|
385 | IF(.NOT.Rdefault_smow) THEN |
---|
386 | Rdefault(:) = 0.0 |
---|
387 | IF (iso_eau.gt.0) Rdefault(iso_eau) = 1.0 ! correction Camille 30 mars 2023 |
---|
388 | ENDIF |
---|
389 | WRITE(*,*) 'Rdefault=',Rdefault |
---|
390 | WRITE(*,*) 'toce=',toce |
---|
391 | |
---|
392 | !--- Sensitivity test: no kinetic effect in sfc evaporation |
---|
393 | IF(ok_nocinsfc) THEN |
---|
394 | tkcin0(1:niso) = 0.0 |
---|
395 | tkcin1(1:niso) = 0.0 |
---|
396 | tkcin2(1:niso) = 0.0 |
---|
397 | END IF |
---|
398 | |
---|
399 | CALL msg('285: verif initialisation:', modname) |
---|
400 | DO ixt=1,niso |
---|
401 | sxt=int2str(ixt) |
---|
402 | CALL msg(' * isoName('//TRIM(sxt)//') = <'//TRIM(isoName(ixt))//'>', modname) |
---|
403 | CALL msg( ' tnat('//TRIM(sxt)//') = '//TRIM(real2str(tnat(ixt))), modname) |
---|
404 | ! CALL msg(' alpha_liq_sol('//TRIM(sxt)//') = '//TRIM(real2str(alpha_liq_sol(ixt))), modname) |
---|
405 | ! CALL msg( ' tkcin0('//TRIM(sxt)//') = '//TRIM(real2str(tkcin0(ixt))), modname) |
---|
406 | ! CALL msg( ' tdifrel('//TRIM(sxt)//') = '//TRIM(real2str(tdifrel(ixt))), modname) |
---|
407 | END DO |
---|
408 | CALL msg('69: lambda = '//TRIM(real2str(lambda_sursat)), modname) |
---|
409 | CALL msg('69: thumxt1 = '//TRIM(real2str(thumxt1)), modname) |
---|
410 | CALL msg('69: h_land_ice = '//TRIM(real2str(h_land_ice)), modname) |
---|
411 | CALL msg('69: P_veg = '//TRIM(real2str(P_veg)), modname) |
---|
412 | |
---|
413 | END SUBROUTINE iso_init |
---|
414 | |
---|
415 | |
---|
416 | SUBROUTINE getinp_s(nam, val, def, lDisp) |
---|
417 | USE IOIPSL, ONLY: getin |
---|
418 | USE lmdz_phys_mpi_data, ONLY: is_mpi_root |
---|
419 | USE lmdz_phys_omp_data, ONLY: is_omp_root |
---|
420 | USE lmdz_phys_transfert_para, ONLY: bcast |
---|
421 | CHARACTER(LEN=*), INTENT(IN) :: nam |
---|
422 | CHARACTER(LEN=*), INTENT(INOUT) :: val |
---|
423 | CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: def |
---|
424 | LOGICAL, OPTIONAL, INTENT(IN) :: lDisp |
---|
425 | LOGICAL :: lD |
---|
426 | !$OMP BARRIER |
---|
427 | IF(is_mpi_root.AND.is_omp_root) THEN |
---|
428 | IF(PRESENT(def)) val=def; CALL getin(nam,val) |
---|
429 | lD=.TRUE.; IF(PRESENT(lDisp)) lD=lDisp |
---|
430 | IF(lD) CALL msg(TRIM(nam)//' = '//TRIM(val)) |
---|
431 | END IF |
---|
432 | CALL bcast(val) |
---|
433 | END SUBROUTINE getinp_s |
---|
434 | |
---|
435 | SUBROUTINE getinp_i(nam, val, def, lDisp) |
---|
436 | USE IOIPSL, ONLY: getin |
---|
437 | USE lmdz_phys_mpi_data, ONLY: is_mpi_root |
---|
438 | USE lmdz_phys_omp_data, ONLY: is_omp_root |
---|
439 | USE lmdz_phys_transfert_para, ONLY: bcast |
---|
440 | CHARACTER(LEN=*), INTENT(IN) :: nam |
---|
441 | INTEGER, INTENT(INOUT) :: val |
---|
442 | INTEGER, OPTIONAL, INTENT(IN) :: def |
---|
443 | LOGICAL, OPTIONAL, INTENT(IN) :: lDisp |
---|
444 | LOGICAL :: lD |
---|
445 | !$OMP BARRIER |
---|
446 | IF(is_mpi_root.AND.is_omp_root) THEN |
---|
447 | IF(PRESENT(def)) val=def; CALL getin(nam,val) |
---|
448 | lD=.TRUE.; IF(PRESENT(lDisp)) lD=lDisp |
---|
449 | IF(lD) CALL msg(TRIM(nam)//' = '//TRIM(int2str(val))) |
---|
450 | END IF |
---|
451 | CALL bcast(val) |
---|
452 | END SUBROUTINE getinp_i |
---|
453 | |
---|
454 | SUBROUTINE getinp_r(nam, val, def, lDisp) |
---|
455 | USE IOIPSL, ONLY: getin |
---|
456 | USE lmdz_phys_mpi_data, ONLY: is_mpi_root |
---|
457 | USE lmdz_phys_omp_data, ONLY: is_omp_root |
---|
458 | USE lmdz_phys_transfert_para, ONLY: bcast |
---|
459 | CHARACTER(LEN=*), INTENT(IN) :: nam |
---|
460 | REAL, INTENT(INOUT) :: val |
---|
461 | REAL, OPTIONAL, INTENT(IN) :: def |
---|
462 | LOGICAL, OPTIONAL, INTENT(IN) :: lDisp |
---|
463 | LOGICAL :: lD |
---|
464 | !$OMP BARRIER |
---|
465 | IF(is_mpi_root.AND.is_omp_root) THEN |
---|
466 | IF(PRESENT(def)) val=def; CALL getin(nam,val) |
---|
467 | lD=.TRUE.; IF(PRESENT(lDisp)) lD=lDisp |
---|
468 | IF(lD) CALL msg(TRIM(nam)//' = '//TRIM(real2str(val))) |
---|
469 | END IF |
---|
470 | CALL bcast(val) |
---|
471 | END SUBROUTINE getinp_r |
---|
472 | |
---|
473 | SUBROUTINE getinp_l(nam, val, def, lDisp) |
---|
474 | USE IOIPSL, ONLY: getin |
---|
475 | USE lmdz_phys_mpi_data, ONLY: is_mpi_root |
---|
476 | USE lmdz_phys_omp_data, ONLY: is_omp_root |
---|
477 | USE lmdz_phys_transfert_para, ONLY: bcast |
---|
478 | CHARACTER(LEN=*), INTENT(IN) :: nam |
---|
479 | LOGICAL, INTENT(INOUT) :: val |
---|
480 | LOGICAL, OPTIONAL, INTENT(IN) :: def |
---|
481 | LOGICAL, OPTIONAL, INTENT(IN) :: lDisp |
---|
482 | LOGICAL :: lD |
---|
483 | !$OMP BARRIER |
---|
484 | IF(is_mpi_root.AND.is_omp_root) THEN |
---|
485 | IF(PRESENT(def)) val=def; CALL getin(nam,val) |
---|
486 | lD=.TRUE.; IF(PRESENT(lDisp)) lD=lDisp |
---|
487 | IF(lD) CALL msg(TRIM(nam)//' = '//TRIM(bool2str(val))) |
---|
488 | END IF |
---|
489 | CALL bcast(val) |
---|
490 | END SUBROUTINE getinp_l |
---|
491 | |
---|
492 | END MODULE isotopes_mod |
---|
493 | #endif |
---|
494 | |
---|
495 | |
---|