- Timestamp:
- May 19, 2022, 10:47:23 AM (3 years ago)
- Location:
- LMDZ6/trunk
- Files:
-
- 3 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/dyn3d_common/infotrac.F90
r4154 r4158 132 132 INTEGER, SAVE, ALLOCATABLE :: conv_flg(:), & !--- Convection activation ; needed for INCA (nbtr) 133 133 pbl_flg(:) !--- Boundary layer activation ; needed for INCA (nbtr) 134 LOGICAL, PARAMETER :: lOldCode = .FALSE.135 134 136 135 CONTAINS … … 202 201 203 202 CALL msg('type_trac = "'//TRIM(type_trac)//'"', modname) 204 IF(lOldCode) THEN 205 str = [type_trac]; nt = 1 206 ELSE 207 IF(strParse(type_trac, ',', str, n=nt)) CALL abort_gcm(modname,'can''t parse "type_trac = '//TRIM(type_trac)//'"',1) 208 END IF 203 IF(strParse(type_trac, ',', str, n=nt)) CALL abort_gcm(modname,'can''t parse "type_trac = '//TRIM(type_trac)//'"',1) 209 204 210 205 !--------------------------------------------------------------------------------------------------------------------------- … … 256 251 ! 1) Get the numbers of: true (first order only) tracers "nqtrue", water tracers "nqo" (vapor/liquid/solid) 257 252 !============================================================================================================================== 258 259 !++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++260 IF(lOldCode) THEN !--- "type_trac" is a single keyword => no need to loop on its parsed version "str(:)"261 !------------------------------------------------------------------------------------------------------------------------------262 !--- Determine nqtrue and (INCA only) nqo, nbtr263 OPEN(90, FILE='traceur.def', FORM='formatted', STATUS='old', IOSTAT=ierr)264 IF(ierr /= 0) CALL abort_gcm(modname, 'file "traceur.def" not found !', 1)265 CALL msg('File "traceur.def" successfully opened.', modname)266 267 IF(ANY(['inca','inco'] == type_trac)) THEN268 #ifdef INCA269 READ(90,*) nqo270 IF(nqCO2==1 .AND. nqo==4) nqo = 3271 CALL Init_chem_inca_trac(nqINCA)272 nbtr = nqINCA + nqCO2273 nqtrue = nbtr + nqo274 IF(ALL([2,3] /= nqo)) CALL abort_gcm(modname, 'Only 2 or 3 water phases allowed ; found nqo='//TRIM(int2str(nqo)), 1)275 ALLOCATE(hadv_inca(nqINCA), conv_flg_inca(nqINCA), solsym_inca(nqINCA))276 ALLOCATE(vadv_inca(nqINCA), pbl_flg_inca(nqINCA))277 CALL init_transport(solsym_inca, conv_flg_inca, pbl_flg_inca, hadv_inca, vadv_inca)278 #endif279 ELSE280 READ(90,*) nqtrue281 END IF282 283 IF (planet_type=="earth" .AND. nqtrue < 2) &284 CALL abort_gcm('infotrac_init', 'Not enough tracers: nqtrue='//TRIM(int2str(nqtrue))//', 2 tracers is the minimum', 1)285 286 !--- Allocate variables depending on nqtrue287 ALLOCATE(hadv(nqtrue), vadv(nqtrue), tnom_0(nqtrue), tnom_transp(nqtrue), tracers(nqtrue))288 289 !--- Continue to read tracer.def290 it = 0291 DO iq = 1, nqtrue292 #ifdef INCA293 IF(iq > nqo+nqCO2) THEN294 it = it+1295 hadv (iq) = hadv_inca (it)296 vadv (iq) = vadv_inca (it)297 tnom_0(iq) = solsym_inca(it)298 tnom_transp(iq) = 'air'299 CYCLE300 END IF301 #endif302 READ(90,'(I2,X,I2,X,A)',IOSTAT=ierr) hadv(iq),vadv(iq),tchaine303 IF(ierr/=0) CALL abort_gcm('infotrac_init', 'Pb dans la lecture de traceur.def', 1)304 jq = INDEX(tchaine(1:LEN_TRIM(tchaine)),' ')305 CALL msg("Ancienne version de traceur.def: traceurs d'air uniquement", modname, iq==1 .AND. jq==0)306 CALL msg("Nouvelle version de traceur.def", modname, iq==1 .AND. jq/=0)307 CALL msg('iq, hadv, vadv, tchaine ='//TRIM(strStack(int2str([iq, hadv(iq), vadv(iq)])))//', '//TRIM(tchaine), modname)308 IF(jq /= 0) THEN !--- Space in the string chain => new format309 tnom_0 (iq) = tchaine(1:jq-1)310 tnom_transp(iq) = tchaine(jq+1:)311 ELSE312 tnom_0 (iq) = tchaine313 tnom_transp(iq) = 'air'314 END IF315 END DO316 CLOSE(90)317 318 #ifndef INCA319 IF(planet_type /= 'earth') nqo = 0 !--- Same number of tracers in dynamics and physics320 IF(planet_type == 'earth') nqo = COUNT(delPhase(tnom_0) == 'H2O') !--- for all planets except for Earth321 nbtr = nqtrue - nqo322 #endif323 324 CALL msg('RAW CONTENT OF "traceur.def" FILE:', modname)325 IF(dispTable('iiss', ['hadv ', 'vadv ', 'name ', 'parent'], cat(tnom_0, tnom_transp), cat(hadv, vadv))) &326 CALL abort_gcm(modname, "problem with the tracers table content", 1)327 328 !--- SET FIELDS %name, %parent, %phase, %component329 tracers(:)%name = old2newName(tnom_0)330 tracers(:)%parent = old2newName(tnom_transp)331 tracers(:)%phase = [( getPhase(tracers(iq)%name), iq=1, nqtrue )]332 tracers(:)%component = type_trac333 DO iq = 1, nqtrue334 IF(addPhase('H2O',tracers(iq)%phase) == tracers(iq)%name) tracers(iq)%component = 'lmdz'335 END DO336 IF(ANY(['inca','inco'] == type_trac)) tracers(1+nqo:nqCO2+nqo)%component = 'co2i'337 CALL setGeneration(tracers) !--- SET FIELDS %iGeneration, %gen0Name338 WHERE(tracers(:)%iGeneration == 2) tracers(:)%type = 'tag' !--- DEFAULT VALUE: "tracer"339 340 !--- FINALIZE341 DEALLOCATE(tnom_0, tnom_transp)342 #ifdef INCA343 DEALLOCATE(hadv_inca, vadv_inca, conv_flg_inca, pbl_flg_inca, solsym_inca)344 #endif345 346 !++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++347 ELSE348 !++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++349 253 IF(readTracersFiles(type_trac, fType, tracers)) CALL abort_gcm(modname, 'problem with tracers file(s)',1) 350 254 IF(fType == 0) CALL abort_gcm(modname, 'Missing tracers file: "traceur.def", "tracer.def" or "tracer_<keyword>.def file.',1) … … 389 293 END IF 390 294 !--------------------------------------------------------------------------------------------------------------------------- 391 END IF392 !++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++393 295 394 296 CALL getKey_init(tracers) … … 495 397 modname, iad == 14 .AND. ll)) t1%iadv = 10 496 398 END DO 497 498 IF(lOldCode) THEN499 500 CALL infotrac_setHeredity !--- SET FIELDS %iqParent, %nqChilds, %iGeneration, %gen0Name, %iqDescen, %nqDescen501 CALL infotrac_isoinit !--- SET FIELDS %type, %iso_iName, %iso_iZone, %iso_iPhase502 CALL getKey_init(tracers, isotopes)503 IF(isoSelect('H2O')) RETURN !--- Select water isotopes ; finished if no water isotopes504 iH2O = ixIso !--- Keep track of water family index505 506 !--- Remove the isotopic tracers from the tracers list passed to phytrac507 nbtr = nbtr -nqo* ntiso !--- ISOTOPIC TAGGING TRACERS ARE NOT PASSED TO THE PHYSICS508 nqtottr = nqtot-nqo*(1+ntiso) !--- NO H2O-FAMILY TRACER IS PASSED TO THE PHYSICS509 510 ELSE511 399 512 400 niso = 0; nzone=0; nphas=nqo; ntiso = 0; isoCheck=.FALSE. … … 542 430 END DO 543 431 END IF 544 545 END IF546 432 547 433 !--- Convection / boundary layer activation for all tracers … … 586 472 587 473 END SUBROUTINE infotrac_init 588 589 590 591 SUBROUTINE infotrac_setHeredity592 !--- Purpose: Set fields %iqParent, %nqChilds, %iGeneration, %iqDescen, %nqDescen (old method)593 USE strings_mod, ONLY: strIdx594 INTEGER :: iq, jq, ipere, ifils595 INTEGER, ALLOCATABLE :: iqfils(:,:)596 CHARACTER(LEN=maxlen) :: msg1, modname='infotrac_init'597 INCLUDE "iniprint.h"598 599 !=== SET FIELDS %iqParent, %nqChilds600 ALLOCATE(iqfils(nqtot,nqtot)); iqfils(:,:) = 0601 tracers(:)%nqChilds = 0602 tracers(:)%iqParent = 0603 604 DO iq = 1, nqtot605 msg1 = 'Tracer nr. '//TRIM(int2str(iq))//', called "'//TRIM(tracers(iq)%name)//'" is '606 607 !--- IS IT A GENERATION 0 TRACER ? IF SO, tracers(iq)%iqParent KEEPS ITS DEFAULT VALUE (0)608 IF(fmsg(TRIM(msg1)//' a parent', modname, tracers(iq)%parent == tran0)) CYCLE609 610 !--- TRACERS OF GENERATION > 0 ; FIND ITS PARENT INDEX611 ipere = strIdx(tracers(:)%name, tracers(iq)%parent)612 IF(ipere == 0) CALL abort_gcm('infotrac_init', TRIM(msg1)//' an orphan', 1)613 IF(iq == ipere) CALL abort_gcm('infotrac_init', TRIM(msg1)//' its own parent',1)614 615 CALL msg(TRIM(msg1)//' the child of '//TRIM(tracers(ipere)%name), modname)616 tracers(iq)%iqParent = ipere617 tracers(ipere)%nqChilds = tracers(ipere)%nqChilds+1618 iqfils(tracers(ipere)%nqChilds,ipere) = iq619 END DO620 621 CALL msg('nqGen0 = '//int2str(COUNT(tracers(:)%parent == 'air')), modname)622 CALL msg('nqChilds = '//strStack(int2str(tracers(:)%nqChilds)), modname)623 CALL msg('iqParent = '//strStack(int2str(tracers(:)%iqParent)), modname)624 CALL msg('iqChilds = '//strStack(int2str(PACK(iqfils,MASK=.TRUE.))),modname)625 626 !=== SET FIELDS %iGeneration, %iqDescen, %nqDescen627 tracers(:)%iGeneration = 0628 tracers(:)%nqDescen = 0629 DO iq = 1, nqtot630 ifils = iq631 DO WHILE(tracers(ifils)%iqParent > 0)632 ipere = tracers(ifils)%iqParent633 tracers(ipere)%nqDescen = tracers(ipere)%nqDescen+1634 tracers(iq)%iGeneration = tracers(iq)%iGeneration+1635 iqfils(tracers(ipere)%nqDescen,ipere) = iq636 ifils = ipere637 END DO638 msg1 = 'Tracer nr. '//TRIM(int2str(iq))//', called "'//TRIM(tracers(iq)%name)//'" is '639 CALL msg(TRIM(msg1)//' of generation '//TRIM(int2str(tracers(iq)%iGeneration)), modname)640 END DO641 DO iq=1,nqtot642 tracers(iq)%iqDescen = iqfils(1:tracers(iq)%nqDescen,iq)643 END DO644 645 !=== SET FIELD %gen0Name646 DO iq = 1, nqtot647 jq=iq; DO WHILE(tracers(jq)%iGeneration > 0); jq=tracers(jq)%iqParent; END DO648 tracers(iq)%gen0Name = tracers(jq)%name649 END DO650 651 CALL msg('nqDescen = '//TRIM(strStack(int2str(tracers(:)%nqDescen))), modname)652 CALL msg('nqDescen_tot = ' //TRIM(int2str(SUM(tracers(:)%nqDescen))), modname)653 CALL msg('iqDescen = '//strStack(int2str(PACK(iqfils, MASK=.TRUE.))), modname)654 655 END SUBROUTINE infotrac_setHeredity656 657 658 659 SUBROUTINE infotrac_isoinit660 661 #ifdef CPP_IOIPSL662 USE IOIPSL663 #else664 USE ioipsl_getincom665 #endif666 USE readTracFiles_mod, ONLY: tnom_iso => newH2OIso667 IMPLICIT NONE668 INTEGER, ALLOCATABLE :: nb_iso(:), nb_tiso(:), nb_zone(:), ix(:), iy(:)669 INTEGER :: ii, ip, iq, it, iz, ixt670 TYPE(isot_type), POINTER :: i671 TYPE(trac_type), POINTER :: t(:), t1672 CHARACTER(LEN=maxlen) :: tnom_trac, modname, t0673 CHARACTER(LEN=maxlen), ALLOCATABLE :: str(:)674 LOGICAL, DIMENSION(:), ALLOCATABLE :: mask675 REAL, ALLOCATABLE :: tnat0(:), alpha_ideal0(:)676 INCLUDE "iniprint.h"677 678 modname = 'infotrac_isoinit'679 tnat0 = [ 1.0 , 155.76e-6, 2005.2e-6, 0.004/100., 0.0 ] !--- Same length as tnom_iso680 alpha_ideal0= [ 1.0 , 1.01, 1.006, 1.003, 1.0 ] !--- Same length as tnom_iso681 ALLOCATE(isotopes(1)) !--- Only water682 nbIso = SIZE(isotopes)683 t => tracers684 i => isotopes(1)685 i%parent = 'H2O'686 687 !--- Effective isotopes names list (embedded in the "keys" field)688 mask = t%type=='tracer' .AND. t%gen0Name==addPhase('H2O', 'g') .AND. t%iGeneration==1689 str = PACK(delPhase(t%name), MASK=mask)690 CALL strReduce(str)691 i%niso = SIZE(str)692 ALLOCATE(i%keys(i%niso))693 i%keys(:)%name = str694 695 !--- Check whether found isotopes are known696 mask = [(ALL(tnom_iso /= str(ii)), ii=1, i%niso)]697 IF(ANY(mask)) CALL abort_gcm(modname, 'The following isotopes are unknown: '//strStack(PACK(str, MASK=mask)), 1)698 699 !--- Full isotopes list, with isotopes tagging tracers (if any) following the previous list700 mask = t%type=='tag' .AND. t%gen0Name==addPhase('H2O', 'g') .AND. t%iGeneration==2701 str = PACK(delPhase(t%name), MASK=mask)702 i%ntiso = i%niso + SIZE(str)703 ALLOCATE(i%trac(i%ntiso))704 i%trac(:) = [i%keys(:)%name, str]705 706 !--- Effective tagging zones names list707 i%zone = strTail(str, '_', .TRUE.)708 CALL strReduce(i%zone)709 i%nzone = SIZE(i%zone)710 IF(i%ntiso /= i%niso*(i%nzone+1)) CALL abort_gcm(modname, 'Error in "ntiso" calculation', 1)711 712 !--- Effective phases list713 i%phase = ''714 DO ip=1,nphases; IF(strIdx(t%name, addPhase('H2O', ip))/=0) i%phase=TRIM(i%phase)//known_phases(ip:ip); END DO715 i%nphas = LEN_TRIM(i%phase)716 717 !--- Indexes related to isotopes718 DO iq = 1, nqtot719 t1 => tracers(iq)720 t0 = t1%gen0Name721 IF(t1%iGeneration==0 .OR. .NOT.t1%isAdvected .OR. delPhase(t0)/='H2O') CYCLE722 t1%iso_iGroup = 1723 t1%iso_iPhase = INDEX(i%phase, getPhase(t0))724 t1%iso_iZone = strIdx(i%zone, strTail(t1%name, '_'))725 IF(t1%iso_iZone /= 0) t1%iso_iName = strIdx(i%keys(:)%name, delPhase(t1%parent))726 IF(t1%iso_iZone == 0) t1%iso_iName = strIdx(i%keys(:)%name, delPhase(t1%name ))727 END DO728 729 !--- Get vectors, one value each "isotope%trac" element (and in the same order)730 ix = strIdx(tnom_iso, i%trac)731 iy = PACK(ix, MASK = ix/=0)732 tnat = tnat0 (iy)733 alpha_ideal = alpha_ideal0(iy)734 735 !--- Tests736 nb_iso = [(COUNT(t%iso_iPhase == ip .AND. t%iGeneration == 1), ip=1, i%nphas)]737 nb_tiso = [(COUNT(t%iso_iPhase == ip .AND. t%iGeneration == 2), ip=1, i%nphas)]738 nb_zone = [(COUNT(t%iso_iZone == iz), iz=1, i%nzone)]739 IF(ANY(nb_iso (:) /= nb_iso (1))) CALL abort_gcm(modname, 'Phases must have same number of isotopes', 1)740 IF(ANY(nb_tiso(:) /= nb_tiso(1))) CALL abort_gcm(modname, 'Phases must have same number of tagging tracers', 1)741 IF(i%nzone >= 1) THEN742 IF(ANY(nb_zone(:) /= nb_zone(1))) CALL abort_gcm(modname, 'Isotopes must have the same number of tagging tracers', 1)743 END IF744 745 !--- Isotopic checking routines activation flag746 i%check = .FALSE.; IF(i%niso > 0) CALL getin('ok_iso_verif', i%check)747 748 !--- Table: index in "qx(:)" of an isotope, knowing its indices "it","ip" in "isotope%iName,%iPhase"749 i%iqIsoPha = RESHAPE([((strIdx(t%name, TRIM(addPhase(i%trac(it),ip,i%phase))),it=1,i%ntiso),ip=1,i%nphas)],[i%ntiso,i%nphas])750 751 !--- Table: index in "isotope%tracs(:)%name" of an isotopic tagging tracer, knowing its indices "iz","ip" in "isotope%iZone,%iName"752 i%itZonIso = RESHAPE([((strIdx(i%trac,TRIM(i%trac(it))//'_'//TRIM(i%zone(iz))),iz=1,i%nzone),it=1,i%niso )],[i%nzone,i%niso])753 754 DO it=1,i%ntiso; CALL msg('iqIsoPha('//TRIM(int2str(it))//',:) = '//strStack(int2str(i%iqIsoPha(it,:))), modname); END DO755 DO iz=1,i%nzone; CALL msg('itZonIso('//TRIM(int2str(iz))//',:) = '//strStack(int2str(i%itZonIso(iz,:))), modname); END DO756 757 !--- Finalize :758 DEALLOCATE(nb_iso)759 760 END SUBROUTINE infotrac_isoinit761 474 762 475 -
LMDZ6/trunk/libf/phylmdiso/isotopes_mod.F90
r4155 r4158 11 11 !--- Contains all isotopic variables + their initialization 12 12 !--- Isotopes-specific routines are in isotopes_routines_mod to avoid circular dependencies with isotopes_verif_mod. 13 14 LOGICAL, PARAMETER :: lOldCode=.FALSE.15 13 16 14 !--- Isotopes indices (in [1,niso] ; non-existing => 0 index) … … 165 163 CALL msg('219: entree', modname) 166 164 167 !--- Memory allocations168 IF(lOldCode) THEN169 ALLOCATE(talph1(niso), tkcin0(niso), talps1(niso), tnat(niso))170 ALLOCATE(talph2(niso), tkcin1(niso), talps2(niso), toce(niso))171 ALLOCATE(talph3(niso), tkcin2(niso), tdifrel(niso), tcorr(niso))172 ALLOCATE(alpha_liq_sol(niso), Rdefault(niso), Rmethox(niso))173 END IF174 175 176 165 !-------------------------------------------------------------- 177 166 ! General: … … 231 220 CALL get_in('lat_max_albedo', lat_max_albedo, 100.) 232 221 END IF 233 IF(lOldCode) &234 CALL get_in('deltaO18_oce', deltaO18_oce, 0.0)235 222 deltaO18_oce=0.0 236 223 CALL get_in('deltaP_BL', deltaP_BL, 10.0) … … 306 293 ! Parameters that depend on the nature of water isotopes: 307 294 !-------------------------------------------------------------- 308 309 !===========================================================================================================================310 IF(lOldCode) THEN311 !===========================================================================================================================312 313 ! Local constants314 fac_enrichoce18 = 0.0005 ! Then: tcorO18 = 1 + fac_enrichoce18315 ! tcorD = 1 + fac_enrichoce18*8316 ! tcorO17 = 1 + fac_enrichoce18*0.528317 alpha_liq_sol_O18 = 1.00291 ! From Lehmann & Siegenthaler, 1991,318 ! Journal of Glaciology, vol 37, p 23319 talph1_O18 = 1137. ; talph2_O18 = -0.4156 ; talph3_O18 = -2.0667E-3320 talps1_O18 = 11.839 ; talps2_O18 = -0.028244321 tkcin0_O18 = 0.006 ; tkcin1_O18 = 0.000285 ; tkcin2_O18 = 0.00082322 tdifrel_O18 = 1./0.9723323 324 ! ln(alphaeq) ratio between O18 and O17325 fac_coeff_eq17_liq = 0.529 ! From Amaelle326 !fac_coeff_eq17_ice = 0.528 ! slope MWL327 fac_coeff_eq17_ice = 0.529328 329 !--- Kinetic factor for surface evaporation:330 ! (cf: kcin = tkcin0 if |V|<tv0cin331 ! kcin = tkcin1*|Vsurf| + tkcin2 if |V|>tv0cin )332 ! (Rq: formula discontinuous for |V|=tv0cin... )333 334 DO ixt = 1, niso335 sxt=int2str(ixt)336 CALL msg('80: ixt='//TRIM(int2str(ixt)),modname)337 338 Rdefault(ixt) = 0.0339 IF(ixt == iso_HTO) THEN !=== H[3]HO340 tdifrel(ixt) = 1./0.968341 tkcin0(ixt) = 0.01056342 tkcin1(ixt) = 0.0005016343 tkcin2(ixt) = 0.0014432344 tnat (ixt) = 0.345 toce (ixt) = 4.0E-19 ! Ratio T/H = 0.2 TU, Dreisigacker and Roether 1978346 !toce (ixt) = 2.2222E-8 ! Corrected by Alex Cauquoin347 !toce (ixt) = 1.0E-18 ! Ratio 3H/1H ocean348 tcorr (ixt) = 1.349 talph1(ixt) = 46480. ; talph2(ixt) = -103.87 ; talph3(ixt) = 0.350 talps1(ixt) = 46480. ; talps2(ixt) = -103.87351 alpha_liq_sol(ixt) = 1.352 Rmethox(ixt) = 0.0353 ELSE IF(ixt == iso_O17) THEN !=== H2[17]O354 tdifrel(ixt)=1./0.98555 ! Used in 1D and in LdG's model355 !tdifrel(ixt)=1./0.985452 ! From Amaelle356 !fac_kcin=0.5145 ! From Amaelle357 fac_kcin= (tdifrel(ixt)-1.0)/(tdifrel_O18-1.0)358 tkcin0(ixt) = tkcin0_O18*fac_kcin359 tkcin1(ixt) = tkcin1_O18*fac_kcin360 tkcin2(ixt) = tkcin2_O18*fac_kcin361 tnat (ixt) = 0.004/100. ! O17 = 0.004% of oxygen362 pente_MWL=0.528363 toce (ixt) = tnat(ixt)*(1.0+deltaO18_oce/1000.0)**pente_MWL364 tcorr (ixt) = 1.0+fac_enrichoce18*pente_MWL ! From Amaelle365 talph1(ixt) = talph1_O18 ; talph2(ixt) = talph2_O18 ; talph3(ixt) = talph3_O18366 talps1(ixt) = talps1_O18 ; talps2(ixt) = talps2_O18367 alpha_liq_sol(ixt) = (alpha_liq_sol_O18)**fac_coeff_eq17_liq368 IF(Rdefault_smow) Rdefault(ixt) = tnat(ixt)*(-3.15/1000.0+1.0)369 Rmethox(ixt) = (230./1000.+1.)*tnat(ixt) ! Zahn et al 2006370 ELSE IF(ixt == iso_O18) THEN !=== H2[18]O371 tdifrel(ixt) = tdifrel_O18372 tkcin0(ixt) = tkcin0_O18373 tkcin1(ixt) = tkcin1_O18374 tkcin2(ixt) = tkcin2_O18375 tnat (ixt) = 2005.2E-6376 toce (ixt) = tnat(ixt)*(1.0+deltaO18_oce/1000.0)377 tcorr (ixt) = 1.0+fac_enrichoce18378 talph1(ixt) = talph1_O18 ; talph2(ixt) = talph2_O18 ; talph3(ixt) = talph3_O18379 talps1(ixt) = talps1_O18 ; talps2(ixt) = talps2_O18380 alpha_liq_sol(ixt) = alpha_liq_sol_O18381 IF(Rdefault_smow) Rdefault(ixt) = tnat(ixt)*(-6.0/1000.0+1.0)382 Rmethox(ixt) = (130./1000.+1.)*tnat(ixt) ! Zahn et al 2006383 ELSE IF(ixt == iso_HDO) THEN !=== H[2]HO384 tdifrel(ixt) = 1./0.9755385 !fac_kcin=0.88386 fac_kcin= (tdifrel(ixt)-1.0)/(tdifrel_O18-1.0)387 tkcin0(ixt) = tkcin0_O18*fac_kcin388 tkcin1(ixt) = tkcin1_O18*fac_kcin389 tkcin2(ixt) = tkcin2_O18*fac_kcin390 tnat (ixt) = 155.76E-6391 pente_MWL = 8.0392 toce (ixt) = tnat(ixt)*(1.0+pente_MWL*deltaO18_oce/1000.0)393 tcorr (ixt) = 1.0+fac_enrichoce18*pente_MWL394 talph1(ixt) = 24844. ; talph2(ixt) = -76.248 ; talph3(ixt) = 52.612E-3395 talps1(ixt) = 16288. ; talps2(ixt) = -0.0934396 !alpha_liq_sol(ixt)=1.0192 ZX ! From Weston, Ralph, 1955397 alpha_liq_sol(ixt)=1.0212 ! From Lehmann & Siegenthaler, 1991,398 ! Journal of Glaciology, vol 37, p 23399 IF(Rdefault_smow) Rdefault(ixt) = tnat(ixt)*((-6.0*pente_MWL+10.0)/1000.0+1.0)400 Rmethox(ixt) = tnat(ixt)*(-25.0/1000.+1.) ! Zahn et al 2006401 ELSE IF(ixt == iso_eau) THEN !=== H2O[16]402 tkcin0(ixt) = 0.0403 tkcin1(ixt) = 0.0404 tkcin2(ixt) = 0.0405 tnat (ixt) = 1.406 toce (ixt)=tnat(ixt)407 tcorr (ixt) = 1.0408 tdifrel(ixt) = 1.409 talph1(ixt) = 0. ; talph2(ixt) = 0. ; talph3(ixt) = 0.410 talps1(ixt) = 0. ; talps2(ixt) = 0.411 alpha_liq_sol(ixt)=1.412 IF(Rdefault_smow) Rdefault(ixt) = tnat(ixt)*1.0413 Rmethox(ixt) = 1.0414 END IF415 END DO416 !===========================================================================================================================417 ELSE418 !===========================================================================================================================419 420 295 IF(getKey('tnat', tnat, isoName)) CALL abort_physic(modname, 'can''t get tnat', 1) 421 296 IF(getKey('toce', toce, isoName)) CALL abort_physic(modname, 'can''t get toce', 1) … … 430 305 IF(getKey('tkcin2', tkcin2, isoName)) CALL abort_physic(modname, 'can''t get tkcin2', 1) 431 306 IF(getKey('tdifrel', tdifrel, isoName)) CALL abort_physic(modname, 'can''t get tdifrel', 1) 432 DO ixt = 1, niso433 IF (ixt == iso_HTO) THEN; tdifrel(ixt) = 1./0.968434 ELSE IF(ixt == iso_HDO) THEN; tdifrel(ixt) = 1./0.9755435 ELSE IF(ixt == iso_O17) THEN; tdifrel(ixt) = 1./0.98555436 ELSE IF(ixt == iso_O18) THEN; tdifrel(ixt) = 1./0.9723437 ELSE IF(ixt == iso_eau) THEN; tdifrel(ixt) = 1.; END IF438 END DO439 307 IF(getKey('alpha_liq_sol', alpha_liq_sol, isoName)) CALL abort_physic(modname, 'can''t get alpha_liq_sol', 1) 440 308 IF(getKey('Rdefault',Rdefault,isoName)) CALL abort_physic(modname, 'can''t get Rdefault',1) 441 309 IF(getKey('Rmethox', Rmethox, isoName)) CALL abort_physic(modname, 'can''t get Rmethox', 1) 442 310 IF(.NOT.Rdefault_smow) Rdefault(:) = 0.0 443 444 !===========================================================================================================================445 END IF446 !===========================================================================================================================447 311 448 312 !--- Sensitivity test: no kinetic effect in sfc evaporation
Note: See TracChangeset
for help on using the changeset viewer.