Ignore:
Timestamp:
May 19, 2022, 10:47:23 AM (2 years ago)
Author:
dcugnet
Message:
  • include new type "tracer.def" tracers description files in DefLists/?
  • Remove the old code (lOldCode=.TRUE.)
  • Remove the hard-coded part in isotopes_mod that was ensuring the convergence => this version will not converge with previous isotopic physics, but the

difference, only due to round off errors on "tdifrel", is acceptable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmdiso/isotopes_mod.F90

    r4155 r4158  
    1111  !--- Contains all isotopic variables + their initialization
    1212  !--- Isotopes-specific routines are in isotopes_routines_mod to avoid circular dependencies with isotopes_verif_mod.
    13 
    14   LOGICAL, PARAMETER :: lOldCode=.FALSE.
    1513
    1614   !--- Isotopes indices (in [1,niso] ; non-existing => 0 index)
     
    165163   CALL msg('219: entree', modname)
    166164
    167    !--- Memory allocations
    168    IF(lOldCode) THEN
    169    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 IF
    174 
    175 
    176165   !--------------------------------------------------------------
    177166   ! General:
     
    231220      CALL get_in('lat_max_albedo', lat_max_albedo,  100.)
    232221   END IF
    233    IF(lOldCode) &
    234    CALL get_in('deltaO18_oce',        deltaO18_oce,   0.0)
    235222   deltaO18_oce=0.0
    236223   CALL get_in('deltaP_BL',           deltaP_BL,     10.0)
     
    306293   ! Parameters that depend on the nature of water isotopes:
    307294   !--------------------------------------------------------------
    308 
    309    !===========================================================================================================================
    310    IF(lOldCode) THEN
    311    !===========================================================================================================================
    312 
    313    ! Local constants
    314    fac_enrichoce18 = 0.0005            ! Then: tcorO18 = 1 + fac_enrichoce18
    315                                        !       tcorD   = 1 + fac_enrichoce18*8
    316                                        !       tcorO17 = 1 + fac_enrichoce18*0.528
    317    alpha_liq_sol_O18 = 1.00291         ! From Lehmann & Siegenthaler, 1991,
    318                                        ! Journal of Glaciology, vol 37, p 23
    319    talph1_O18 = 1137.  ; talph2_O18 = -0.4156   ; talph3_O18 = -2.0667E-3
    320    talps1_O18 = 11.839 ; talps2_O18 = -0.028244
    321    tkcin0_O18 = 0.006  ; tkcin1_O18 =  0.000285 ; tkcin2_O18 =  0.00082
    322    tdifrel_O18 = 1./0.9723
    323 
    324    ! ln(alphaeq) ratio between O18 and O17
    325    fac_coeff_eq17_liq = 0.529          ! From Amaelle
    326   !fac_coeff_eq17_ice = 0.528          ! slope MWL
    327    fac_coeff_eq17_ice = 0.529
    328 
    329    !--- Kinetic factor for surface evaporation:
    330    ! (cf: kcin = tkcin0                  if |V|<tv0cin
    331    !      kcin = tkcin1*|Vsurf| + tkcin2 if |V|>tv0cin )
    332    ! (Rq: formula discontinuous for |V|=tv0cin... )       
    333 
    334    DO ixt = 1, niso
    335       sxt=int2str(ixt)
    336       CALL msg('80: ixt='//TRIM(int2str(ixt)),modname)
    337 
    338       Rdefault(ixt) = 0.0
    339       IF(ixt == iso_HTO) THEN          !=== H[3]HO
    340          tdifrel(ixt) = 1./0.968
    341          tkcin0(ixt) = 0.01056
    342          tkcin1(ixt) = 0.0005016
    343          tkcin2(ixt) = 0.0014432
    344          tnat  (ixt) = 0.
    345          toce  (ixt) = 4.0E-19         ! Ratio T/H = 0.2 TU, Dreisigacker and Roether 1978
    346         !toce  (ixt) = 2.2222E-8       ! Corrected by Alex Cauquoin
    347         !toce  (ixt) = 1.0E-18         ! Ratio 3H/1H ocean
    348          tcorr (ixt) = 1.
    349          talph1(ixt) = 46480. ; talph2(ixt) = -103.87 ; talph3(ixt) = 0.
    350          talps1(ixt) = 46480. ; talps2(ixt) = -103.87
    351          alpha_liq_sol(ixt) = 1.
    352          Rmethox(ixt) = 0.0
    353       ELSE IF(ixt == iso_O17) THEN     !=== H2[17]O
    354          tdifrel(ixt)=1./0.98555       ! Used in 1D and in LdG's model
    355         !tdifrel(ixt)=1./0.985452      ! From Amaelle
    356         !fac_kcin=0.5145               ! From Amaelle
    357          fac_kcin= (tdifrel(ixt)-1.0)/(tdifrel_O18-1.0)
    358          tkcin0(ixt) = tkcin0_O18*fac_kcin
    359          tkcin1(ixt) = tkcin1_O18*fac_kcin
    360          tkcin2(ixt) = tkcin2_O18*fac_kcin
    361          tnat  (ixt) = 0.004/100.      ! O17 = 0.004% of oxygen
    362          pente_MWL=0.528
    363          toce  (ixt) = tnat(ixt)*(1.0+deltaO18_oce/1000.0)**pente_MWL
    364          tcorr (ixt) = 1.0+fac_enrichoce18*pente_MWL  ! From Amaelle           
    365          talph1(ixt) = talph1_O18 ; talph2(ixt) = talph2_O18 ; talph3(ixt) = talph3_O18
    366          talps1(ixt) = talps1_O18 ; talps2(ixt) = talps2_O18     
    367          alpha_liq_sol(ixt) = (alpha_liq_sol_O18)**fac_coeff_eq17_liq
    368          IF(Rdefault_smow) Rdefault(ixt) = tnat(ixt)*(-3.15/1000.0+1.0)
    369          Rmethox(ixt) = (230./1000.+1.)*tnat(ixt)     ! Zahn et al 2006
    370       ELSE IF(ixt == iso_O18) THEN     !=== H2[18]O
    371          tdifrel(ixt) = tdifrel_O18
    372          tkcin0(ixt) = tkcin0_O18
    373          tkcin1(ixt) = tkcin1_O18
    374          tkcin2(ixt) = tkcin2_O18
    375          tnat  (ixt) = 2005.2E-6
    376          toce  (ixt) = tnat(ixt)*(1.0+deltaO18_oce/1000.0)
    377          tcorr (ixt) = 1.0+fac_enrichoce18
    378          talph1(ixt) = talph1_O18 ; talph2(ixt) = talph2_O18 ; talph3(ixt) = talph3_O18
    379          talps1(ixt) = talps1_O18 ; talps2(ixt) = talps2_O18
    380          alpha_liq_sol(ixt) = alpha_liq_sol_O18   
    381          IF(Rdefault_smow) Rdefault(ixt) = tnat(ixt)*(-6.0/1000.0+1.0)
    382          Rmethox(ixt) = (130./1000.+1.)*tnat(ixt) ! Zahn et al 2006   
    383       ELSE IF(ixt == iso_HDO) THEN     !=== H[2]HO
    384          tdifrel(ixt) = 1./0.9755
    385         !fac_kcin=0.88
    386          fac_kcin= (tdifrel(ixt)-1.0)/(tdifrel_O18-1.0)
    387          tkcin0(ixt) = tkcin0_O18*fac_kcin
    388          tkcin1(ixt) = tkcin1_O18*fac_kcin
    389          tkcin2(ixt) = tkcin2_O18*fac_kcin
    390          tnat  (ixt) = 155.76E-6
    391          pente_MWL = 8.0
    392          toce  (ixt) = tnat(ixt)*(1.0+pente_MWL*deltaO18_oce/1000.0)
    393          tcorr (ixt) = 1.0+fac_enrichoce18*pente_MWL         
    394          talph1(ixt) = 24844. ; talph2(ixt) = -76.248 ; talph3(ixt) = 52.612E-3
    395          talps1(ixt) = 16288. ; talps2(ixt) = -0.0934
    396         !alpha_liq_sol(ixt)=1.0192 ZX  ! From Weston, Ralph, 1955
    397          alpha_liq_sol(ixt)=1.0212     ! From Lehmann & Siegenthaler, 1991,
    398                                        ! Journal of Glaciology, vol 37, p 23
    399          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 2006
    401       ELSE IF(ixt  == iso_eau) THEN    !=== H2O[16]
    402          tkcin0(ixt) = 0.0
    403          tkcin1(ixt) = 0.0
    404          tkcin2(ixt) = 0.0
    405          tnat  (ixt) = 1.
    406          toce  (ixt)=tnat(ixt)
    407          tcorr (ixt) = 1.0
    408          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.0
    413          Rmethox(ixt) = 1.0
    414       END IF
    415    END DO
    416    !===========================================================================================================================
    417    ELSE
    418    !===========================================================================================================================
    419 
    420295   IF(getKey('tnat',    tnat,    isoName)) CALL abort_physic(modname, 'can''t get tnat',    1)
    421296   IF(getKey('toce',    toce,    isoName)) CALL abort_physic(modname, 'can''t get toce',    1)
     
    430305   IF(getKey('tkcin2',  tkcin2,  isoName)) CALL abort_physic(modname, 'can''t get tkcin2',  1)
    431306   IF(getKey('tdifrel', tdifrel, isoName)) CALL abort_physic(modname, 'can''t get tdifrel', 1)
    432    DO ixt = 1, niso
    433       IF     (ixt == iso_HTO) THEN; tdifrel(ixt) = 1./0.968
    434       ELSE IF(ixt == iso_HDO) THEN; tdifrel(ixt) = 1./0.9755
    435       ELSE IF(ixt == iso_O17) THEN; tdifrel(ixt) = 1./0.98555
    436       ELSE IF(ixt == iso_O18) THEN; tdifrel(ixt) = 1./0.9723
    437       ELSE IF(ixt == iso_eau) THEN; tdifrel(ixt) = 1.; END IF
    438    END DO
    439307   IF(getKey('alpha_liq_sol', alpha_liq_sol, isoName)) CALL abort_physic(modname, 'can''t get alpha_liq_sol',  1)
    440308   IF(getKey('Rdefault',Rdefault,isoName)) CALL abort_physic(modname, 'can''t get Rdefault',1)
    441309   IF(getKey('Rmethox', Rmethox, isoName)) CALL abort_physic(modname, 'can''t get Rmethox', 1)
    442310   IF(.NOT.Rdefault_smow) Rdefault(:) = 0.0
    443 
    444    !===========================================================================================================================
    445    END IF
    446    !===========================================================================================================================
    447311
    448312   !--- Sensitivity test: no kinetic effect in sfc evaporation
Note: See TracChangeset for help on using the changeset viewer.