Ignore:
Timestamp:
Nov 19, 2021, 4:58:59 PM (3 years ago)
Author:
lguez
Message:

Sync latest trunk changes to Ocean_skin

Location:
LMDZ6/branches/Ocean_skin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Ocean_skin

  • LMDZ6/branches/Ocean_skin/libf/phylmd/calcratqs.F90

    r2534 r4013  
    22           iflag_ratqs,iflag_con,iflag_cld_th,pdtphys, &
    33           ratqsbas,ratqshaut,ratqsp0,ratqsdp, &
    4            tau_ratqs,fact_cldcon,   &
    5            ptconv,ptconvth,clwcon0th, rnebcon0th,      &
    6            paprs,pplay,q_seri,zqsat,fm_therm,          &
    7            ratqs,ratqsc)
     4           tau_ratqs,fact_cldcon,wake_s, wake_deltaq,   &
     5           ptconv,ptconvth,clwcon0th, rnebcon0th,       &
     6           paprs,pplay,t_seri,q_seri,                   &
     7           qtc_cv, sigt_cv, zqsat,             &
     8           tke,tke_dissip,lmix,wprime, &
     9           t2m,q2m,fm_therm, &
     10           ratqs,ratqsc,ratqs_inter)
     11
     12
     13USE indice_sol_mod
     14USE phys_state_var_mod, ONLY: pctsrf
     15USE calcratqs_multi_mod, ONLY: calcratqs_inter, calcratqs_oro, calcratqs_hetero, calcratqs_tke
    816
    917implicit none
     
    2331real,intent(in) :: pdtphys,ratqsbas,ratqshaut,fact_cldcon,tau_ratqs
    2432real,intent(in) :: ratqsp0, ratqsdp
    25 real, dimension(klon,klev+1),intent(in) :: paprs
    26 real, dimension(klon,klev),intent(in) :: pplay,q_seri,zqsat,fm_therm
     33real, dimension(klon,klev+1),intent(in) :: paprs,tke,tke_dissip,lmix,wprime
     34real, dimension(klon,klev),intent(in) :: pplay,t_seri,q_seri,zqsat,fm_therm, qtc_cv, sigt_cv
    2735logical, dimension(klon,klev),intent(in) :: ptconv
    2836real, dimension(klon,klev),intent(in) :: rnebcon0th,clwcon0th
    29 
     37real, dimension(klon,klev),intent(in) :: wake_deltaq,wake_s
     38real, dimension(klon,nbsrf),intent(in) :: t2m,q2m
    3039! Output
    31 real, dimension(klon,klev),intent(inout) :: ratqs,ratqsc
     40real, dimension(klon,klev),intent(inout) :: ratqs,ratqsc,ratqs_inter
     41
    3242logical, dimension(klon,klev),intent(inout) :: ptconvth
    3343
     
    3646real, dimension(klon,klev) :: ratqss
    3747real facteur,zfratqs1,zfratqs2
     48real, dimension(klon,klev) :: ratqs_hetero,ratqs_oro,ratqs_tke
     49
    3850
    3951!-------------------------------------------------------------------------
     
    124136         enddo
    125137
    126       else if (iflag_ratqs==4) then
     138      else if (iflag_ratqs==4) then 
    127139         do k=1,klev
    128140           ratqss(:,k)=ratqsbas+0.5*(ratqshaut-ratqsbas) &
     
    131143         enddo
    132144
     145       else if (iflag_ratqs .GT. 9) then
     146 
     147       ! interactive ratqs calculations that depend on cold pools, orography, surface heterogeneity and small-scale turbulence
     148       ! This should help getting a more realistic ratqs in the low and mid troposphere
     149       ! We however need a "background" ratqs to account for subgrid distribution of qt (or qt/qs)
     150       ! in the high troposphere
     151       
     152       ! background ratqs and initialisations
     153          do k=1,klev
     154             do i=1,klon
     155              ratqss(i,k)=ratqsbas+0.5*(ratqshaut-ratqsbas) &
     156              *( tanh( (ratqsp0-pplay(i,k))/ratqsdp) + 1.)
     157              ratqss(i,k)=max(ratqss(i,k),0.0)
     158
     159              ratqs_hetero(i,k)=0.
     160              ratqs_oro(i,k)=0.
     161              ratqs_tke(i,k)=0.
     162              ratqs_inter(i,k)=0
     163             enddo
     164          enddo
     165     
     166          if (iflag_ratqs .EQ. 10) then
     167             ! interactive ratqs in presence of cold pools     
     168             call calcratqs_inter(klon,klev,iflag_ratqs,pdtphys,ratqsbas,wake_deltaq,wake_s,q_seri,qtc_cv, sigt_cv,ratqs_inter)
     169             do k=1,klev
     170                do i=1,klon
     171                    ratqs_inter(i,k)=ratqs_inter(i,k)-0.5*ratqs_inter(i,k)*(tanh((ratqsp0-pplay(i,k))/ratqsdp)+1.)
     172                enddo
     173             enddo
     174             ratqss=ratqss+ratqs_inter
     175          else if (iflag_ratqs .EQ. 11) then
     176            ! interactive ratqs with several sources
     177            call calcratqs_inter(klon,klev,iflag_ratqs,pdtphys,ratqsbas,wake_deltaq,wake_s,q_seri,qtc_cv, sigt_cv,ratqs_inter)
     178             ratqss=ratqss+ratqs_inter
     179          else if (iflag_ratqs .EQ. 12) then
     180             ! contribution of surface heterogeneities to ratqs
     181             call calcratqs_hetero(klon,klev,t2m,q2m,t_seri,q_seri,pplay,paprs,ratqs_hetero)
     182             ratqss=ratqss+ratqs_hetero
     183          else if (iflag_ratqs .EQ. 13) then
     184             ! contribution of ubgrid orography to ratqs
     185             call calcratqs_oro(klon,klev,zqsat,t_seri,pplay,paprs,ratqs_oro)
     186             ratqss=ratqss+ratqs_oro
     187          else if (iflag_ratqs .EQ. 14) then
     188             ! effect of subgrid-scale TKE on ratqs (in development)
     189             call calcratqs_tke(klon,klev,pdtphys,t_seri,q_seri,zqsat,pplay,paprs,tke,tke_dissip,lmix,wprime,ratqs_tke)     
     190             ratqss=ratqss+ratqs_tke
     191          endif
     192         
     193     
    133194      endif
    134 
    135 
    136195
    137196
Note: See TracChangeset for help on using the changeset viewer.