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