Changeset 4745


Ignore:
Timestamp:
Nov 7, 2023, 8:27:07 AM (13 months ago)
Author:
evignon
Message:

nettoyage et corrections dans les routines atke pour utilisation en 3D (terre + mars)

Location:
LMDZ6/trunk/libf
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/lmdz_atke_exchange_coeff.F90

    r4714 r4745  
    2626
    2727USE lmdz_atke_turbulence_ini, ONLY : iflag_atke, kappa, l0, ric, cinf, rpi, rcpd, atke_ok_virtual
    28 USE lmdz_atke_turbulence_ini, ONLY : cepsilon, pr_slope, pr_asym, pr_neut, ctkes,rg, rd, rv, atke_ok_vdiff
     28USE lmdz_atke_turbulence_ini, ONLY : cepsilon, pr_slope, pr_asym, pr_neut, ctkes, rg, rd, rv, atke_ok_vdiff
    2929USE lmdz_atke_turbulence_ini, ONLY : viscom, viscoh, clmix, clmixshear, iflag_atke_lmix, lmin, smmin
    3030
  • LMDZ6/trunk/libf/phylmd/lmdz_atke_turbulence_ini.F90

    r4687 r4745  
    33implicit none
    44
     5! declaration of constants and parameters
    56save
    67
     
    1516  real :: rg, rd, rpi, rcpd, rv
    1617  !$OMP THREADPRIVATE(rg, rd, rpi, rcpd, rv)
    17 
    1818  real :: viscom, viscoh
    1919  !$OMP THREADPRIVATE(viscom,viscoh)
    20 
    2120  real :: lmin=0.01              ! minimum mixing length
    2221  !$OMP THREADPRIVATE(lmin)
    23 
    2422  logical :: atke_ok_vdiff, atke_ok_virtual
    2523  !$OMP THREADPRIVATE(atke_ok_vdiff,atke_ok_virtual)
     
    2725CONTAINS
    2826
    29 SUBROUTINE atke_ini(prt_level_in, lunout_in, rg_in, rd_in, rpi_in, rcpd_in, rv_in)
     27SUBROUTINE atke_ini(rg_in, rd_in, rpi_in, rcpd_in, rv_in, viscom_in, viscoh_in)
    3028
    3129   USE ioipsl_getin_p_mod, ONLY : getin_p
    3230
    33   integer, intent(in) :: lunout_in,prt_level_in
    34   real, intent(in) :: rg_in, rd_in, rpi_in, rcpd_in, rv_in
     31  real, intent(in) :: rg_in, rd_in, rpi_in, rcpd_in, rv_in, viscom_in, viscoh_in
    3532
    3633
    37   lunout=lunout_in
    38   prt_level=prt_level_in
     34  ! input arguments (universal constants for planet)
     35  !-------------------------------------------------
     36 
     37  ! gravity acceleration
     38  rg=rg_in
     39  ! dry gas constant (R/M, R=perfect gas constant and M is the molar mass of the fluid)
    3940  rd=rd_in
    40   rg=rg_in
     41  ! Pi number
    4142  rpi=rpi_in
     43  ! cp per unit mass of the gas
    4244  rcpd=rcpd_in
     45  ! water vapor constant (for simulations in Earth's atmosphere)
    4346  rv=rv_in
     47  ! kinematic molecular viscosity for momentum
     48  viscom=viscom_in
     49  ! kinematic molecular viscosity for heat
     50  viscoh=viscoh_in
    4451
    45   viscom=1.46E-5
    46   viscoh=2.06E-5
     52
     53  !viscom=1.46E-5
     54  !viscoh=2.06E-5
     55
     56
     57  ! Read flag values in .def files
     58  !-------------------------------
     59
    4760
    4861  ! flag that controls options in atke_compute_km_kh
     
    124137
    125138  ! minimum anisotropy coefficient (defined here as minsqrt(Ez/Ek)) at large Ri.
    126   ! From Zilitinkevich et al. 2013, it equals sqrt(0.03)~0.17
    127  
     139  ! From Zilitinkevich et al. 2013, it equals sqrt(0.03)~0.17 
    128140  smmin=0.17
    129141  CALL getin_p('atke_smmin',smmin)
  • LMDZ6/trunk/libf/phylmd/lmdz_call_atke.F90

    r4687 r4745  
    5252REAL, DIMENSION(ngrid) ::  wind1
    5353INTEGER i
    54 
    5554
    5655
     
    154153enddo
    155154
    156 !K_big(:,1)=0.
    157 !do  k=1,nlay
    158 !   do i=1,ngrid
    159 !      print*, 'youhou', k, x_in(i,k), x_predict(i,k), K_big(i,k)
    160 !   end do
    161 !enddo
    162 
    163 
    164155
    165156end subroutine atke_explicit_prediction
  • LMDZ6/trunk/libf/phylmd/pbl_surface_mod.F90

    r4737 r4745  
    16991699
    17001700        IF (iflag_pbl>=50) THEN
    1701 
    1702         CALL call_atke(dtime,knon,klev,ycdragm, ycdragh,yus0,yvs0,yts,yu,yv,yt,yq, &
    1703              ypplay,ypaprs,ytke,ycoefm, ycoefh)
     1701        CALL call_atke(dtime,knon,klev,ycdragm(1:knon), ycdragh(1:knon),yus0(1:knon),yvs0(1:knon),yts(1:knon), &
     1702                  yu(1:knon,:),yv(1:knon,:),yt(1:knon,:),yq(1:knon,:),ypplay(1:knon,:),ypaprs(1:knon,:),      &
     1703                  ytke(1:knon,:),ycoefm(1:knon,:), ycoefh(1:knon,:))
    17041704
    17051705        ELSE
     
    17441744        IF (iflag_pbl>=50) THEN
    17451745     
    1746         CALL call_atke(dtime,knon,klev,ycdragm_x,ycdragh_x,yus0,yvs0,yts_x,yu_x,yv_x,yt_x,yq_x, &
    1747              ypplay,ypaprs,ytke_x,ycoefm_x, ycoefh_x)
     1746        CALL call_atke(dtime,knon,klev,ycdragm_x(1:knon),ycdragh_x(1:knon),yus0(1:knon),yvs0(1:knon),yts_x(1:knon),    &
     1747                       yu_x(1:knon,:),yv_x(1:knon,:),yt_x(1:knon,:),yq_x(1:knon,:),ypplay(1:knon,:),ypaprs(1:knon,:),  &
     1748                       ytke_x(1:knon,:),ycoefm_x(1:knon,:), ycoefh_x(1:knon,:))
    17481749
    17491750        ELSE
     
    17831784        IF (iflag_pbl>=50) THEN
    17841785       
    1785         CALL call_atke(dtime,knon,klev,ycdragm_w,ycdragh_w,yus0,yvs0,yts_w,yu_w,yv_w,yt_w,yq_w, &
    1786              ypplay,ypaprs,ytke_w,ycoefm_w, ycoefh_w)
     1786        CALL call_atke(dtime,knon,klev,ycdragm_w(1:knon),ycdragh_w(1:knon),yus0(1:knon),yvs0(1:knon),yts_w(1:knon), &
     1787                yu_w(1:knon,:),yv_w(1:knon,:),yt_w(1:knon,:),yq_w(1:knon,:),ypplay(1:knon,:),ypaprs(1:knon,:),      &
     1788                ytke_w(1:knon,:),ycoefm_w(1:knon,:), ycoefh_w(1:knon,:))
    17871789
    17881790        ELSE
  • LMDZ6/trunk/libf/phylmd/physiq_mod.F90

    r4744 r4745  
    12661266
    12671267    REAL pi
     1268    REAL viscom, viscoh
    12681269    INTEGER ieru
    12691270
     
    18421843       CALL wake_ini(rg,rd,rv,prt_level)
    18431844       CALL yamada_ini(klon,lunout,prt_level)
    1844        CALL atke_ini(prt_level, lunout, RG, RD, RPI, RCPD, RV)
     1845       viscom=1.46E-5
     1846       viscoh=2.06E-5
     1847       CALL atke_ini(RG, RD, RPI, RCPD, RV, viscom, viscoh)
    18451848       CALL thermcell_ini(iflag_thermals,prt_level,tau_thermals,lunout, &
    18461849   &    RG,RD,RCPD,RKAPPA,RLVTT,RETV)
  • LMDZ6/trunk/libf/phylmdiso/pbl_surface_mod.F90

    r4737 r4745  
    19771977
    19781978        IF (iflag_pbl>=50) THEN
    1979 
    1980         CALL call_atke(dtime,knon,klev,ycdragm, ycdragh,yus0,yvs0,yts,yu,yv,yt,yq, &
    1981              ypplay,ypaprs,ytke,ycoefm, ycoefh)
     1979        CALL call_atke(dtime,knon,klev,ycdragm(1:knon), ycdragh(1:knon),yus0(1:knon),yvs0(1:knon),yts(1:knon), &
     1980                  yu(1:knon,:),yv(1:knon,:),yt(1:knon,:),yq(1:knon,:),ypplay(1:knon,:),ypaprs(1:knon,:),      &
     1981                  ytke(1:knon,:),ycoefm(1:knon,:), ycoefh(1:knon,:))
    19821982
    19831983        ELSE
     
    20202020
    20212021        IF (iflag_pbl>=50) THEN
    2022 
    2023         CALL call_atke(dtime,knon,klev,ycdragm_x,ycdragh_x,yus0,yvs0,yts_x,yu_x,yv_x,yt_x,yq_x, &
    2024              ypplay,ypaprs,ytke_x,ycoefm_x, ycoefh_x)
     2022     
     2023        CALL call_atke(dtime,knon,klev,ycdragm_x(1:knon),ycdragh_x(1:knon),yus0(1:knon),yvs0(1:knon),yts_x(1:knon),    &
     2024                       yu_x(1:knon,:),yv_x(1:knon,:),yt_x(1:knon,:),yq_x(1:knon,:),ypplay(1:knon,:),ypaprs(1:knon,:),  &
     2025                       ytke_x(1:knon,:),ycoefm_x(1:knon,:), ycoefh_x(1:knon,:))
    20252026
    20262027        ELSE
    2027 
    20282028
    20292029        CALL coef_diff_turb(dtime, nsrf, knon, ni,  &
     
    20602060
    20612061        IF (iflag_pbl>=50) THEN
    2062 
    2063         CALL call_atke(dtime,knon,klev,ycdragm_w,ycdragh_w,yus0,yvs0,yts_w,yu_w,yv_w,yt_w,yq_w, &
    2064              ypplay,ypaprs,ytke_w,ycoefm_w, ycoefh_w)
     2062       
     2063        CALL call_atke(dtime,knon,klev,ycdragm_w(1:knon),ycdragh_w(1:knon),yus0(1:knon),yvs0(1:knon),yts_w(1:knon), &
     2064                yu_w(1:knon,:),yv_w(1:knon,:),yt_w(1:knon,:),yq_w(1:knon,:),ypplay(1:knon,:),ypaprs(1:knon,:),      &
     2065                ytke_w(1:knon,:),ycoefm_w(1:knon,:), ycoefh_w(1:knon,:))
    20652066
    20662067        ELSE
  • LMDZ6/trunk/libf/phylmdiso/physiq_mod.F90

    r4742 r4745  
    13421342
    13431343    REAL pi
     1344    REAL viscom, viscoh
    13441345    INTEGER ieru
    13451346
     
    19321933       CALL wake_ini(rg,rd,rv,prt_level)
    19331934       CALL yamada_ini(klon,lunout,prt_level)
    1934        CALL atke_ini(prt_level, lunout, RG, RD, RPI, RCPD, RV)
     1935       viscom=1.46E-5
     1936       viscoh=2.06E-5
     1937       CALL atke_ini(RG, RD, RPI, RCPD, RV, viscom, viscoh)
    19351938       CALL thermcell_ini(iflag_thermals,prt_level,tau_thermals,lunout, &
    19361939   &    RG,RD,RCPD,RKAPPA,RLVTT,RETV)
Note: See TracChangeset for help on using the changeset viewer.