Changeset 1761 for LMDZ5/trunk


Ignore:
Timestamp:
Jun 4, 2013, 12:11:38 PM (11 years ago)
Author:
Laurent Fairhead
Message:

New version of Mellor et Yamada pronostic TKE

... based on energy transfer from the mean state.

The new version is yamada_c.
It must be called after vertical diffusion rather than just before
since the source terms u_z w'u' + v_z w'theta' and g/theta w'theta'
are diagnosed from the vertical diffusion (as energy loss from the mean
state) rather than computed as K (u_z2+v_z2) or g/\theta K theta_z
(where _z means vertical derivative).
The call to this version is controled by iflag_pbl.

iflag_pbl = 20 : with TKE computed at interfaces between layers
iflag_pbl = 25 : with TKE computed within the layer
In both cases, the dissipation of turbulence is translated into heat, and
passed to the physics as dtdiss (temperature tendency due to dissipation

of TKE).

The diffusion coefficient being computed after dissipation, it must be
kept for diffusion at the next time step, and thus be stored in the
restartphy file.
This coefficient must be computed and stored for each sub-surface.

A new way of managing subsurface variables is introduced.
For arrays of the form X(:,nbsrf) are extented to X(:,nbsrf+1), where
is_ave=nbsrf+1, is an additional sub-surface which contains the averaged values.

coef_diff_turb_mod.F90 : change of flags.
ener_conserv.F90 : energy conservation must not be applied in those

cases

indicesol.h : definition of is_ave
pbl_surface_mod.F90 : call to yamada_c and changes in the management of

coefh/coefm

physiq.F : Change in the initialisation of pmflxr/s and

modified calls to pbl_surface_mod (introduction
of dtdiss, initialisation
of pbl_tke and coefh in 1D).

phys_local_var_mod.F90 : declaration of d_t_diss
phys_output_mod.F90 : new outputs (bils_tke and bils_diss) and

coefh->coefh(:,:,is_ave)

phys_state_var_mod.F90 : modified declaration for coefh and coefm

(nbsrf -> nbsrf+1)

FH

Location:
LMDZ5/trunk/libf/phylmd
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/phylmd/coef_diff_turb_mod.F90

    r1738 r1761  
    158158         
    159159!   iflag_pbl peut etre utilise comme longuer de melange
    160        IF (iflag_pbl.GE.18) THEN
     160       IF (iflag_pbl.GE.31) THEN
    161161          CALL vdif_kcay(knon,dtime,RG,RD,ypaprs,yt, &
    162162               yzlev,yzlay,yu,yv,yteta, &
    163163               ycdragm,yq2,q2diag,ykmm,ykmn,yustar, &
    164164               iflag_pbl)
    165        ELSE
     165       ELSE IF (iflag_pbl<20) THEN
    166166          CALL yamada4(knon,dtime,RG,RD,ypaprs,yt, &
    167167               yzlev,yzlay,yu,yv,yteta, &
  • LMDZ5/trunk/libf/phylmd/ener_conserv.F90

    r1754 r1761  
    11subroutine ener_conserv(klon,klev,pdtphys, &
    2  &    puo,pvo,pto,pqo,pun,pvn,ptn,pqn,masse,exner,d_t_ec)
     2 &    puo,pvo,pto,pqo,pun,pvn,ptn,pqn,dtke,masse,exner,d_t_ec)
    33
    44!=============================================================
     
    1919
    2020! From module
    21 USE phys_local_var_mod, ONLY : d_u_vdf,d_v_vdf,d_t_vdf,d_u_ajs,d_v_ajs,d_t_ajs,d_u_con,d_v_con,d_t_con
    22 USE phys_output_var_mod, ONLY : bils_ec,bils_kinetic,bils_enthalp,bils_latent
     21USE phys_local_var_mod, ONLY : d_u_vdf,d_v_vdf,d_t_vdf,d_u_ajs,d_v_ajs,d_t_ajs,d_u_con,d_v_con,d_t_con,d_t_diss
     22USE phys_output_var_mod, ONLY : bils_ec,bils_tke,bils_kinetic,bils_enthalp,bils_latent,bils_diss
    2323
    2424IMPLICIT none
     
    2626#include "YOETHF.h"
    2727#include "clesphys.h"
     28#include "compbl.h"
    2829
    2930! Arguments
     
    3334REAL, DIMENSION(klon,klev),INTENT(IN) :: pun,pvn,ptn,pqn
    3435REAL, DIMENSION(klon,klev),INTENT(IN) :: masse,exner
     36REAL, DIMENSION(klon,klev+1),INTENT(IN) :: dtke
    3537REAL, DIMENSION(klon,klev),INTENT(OUT) :: d_t_ec
    3638      integer k,i
     
    6567
    6668   IF (iflag_ener_conserv<=2) THEN
    67       d_t(:,:)=d_t_vdf(:,:)+d_t_ajs(:,:)   ! d_t_ajs = adjust + thermals
    68       d_u(:,:)=d_u_vdf(:,:)+d_u_ajs(:,:)+d_u_con(:,:)
    69       d_v(:,:)=d_v_vdf(:,:)+d_v_ajs(:,:)+d_v_con(:,:)
     69!     print*,'ener_conserv pbl=',iflag_pbl
     70      IF (iflag_pbl>=20 .AND. iflag_pbl<=27) THEN !d_t_diss accounts for conserv
     71         d_t(:,:)=d_t_ajs(:,:)   ! d_t_ajs = adjust + thermals
     72         d_u(:,:)=d_u_ajs(:,:)+d_u_con(:,:)
     73         d_v(:,:)=d_v_ajs(:,:)+d_v_con(:,:)
     74      ELSE
     75         d_t(:,:)=d_t_vdf(:,:)+d_t_ajs(:,:)   ! d_t_ajs = adjust + thermals
     76         d_u(:,:)=d_u_vdf(:,:)+d_u_ajs(:,:)+d_u_con(:,:)
     77         d_v(:,:)=d_v_vdf(:,:)+d_v_ajs(:,:)+d_v_con(:,:)
     78      ENDIF
    7079   ELSEIF (iflag_ener_conserv==101) THEN
    7180      d_t(:,:)=0.
     
    8998      zv(:,:)=pvo(:,:)
    9099   else
    91       zu(:,:)=puo(:,:)+0.5*d_u(:,:)
    92       zv(:,:)=pvo(:,:)+0.5*d_v(:,:)
     100      IF (iflag_pbl>=20 .AND. iflag_pbl<=27) THEN
     101         zu(:,:)=puo(:,:)+d_u_vdf(:,:)+0.5*d_u(:,:)
     102         zv(:,:)=pvo(:,:)+d_v_vdf(:,:)+0.5*d_v(:,:)
     103      ELSE
     104         zu(:,:)=puo(:,:)+0.5*d_u(:,:)
     105         zv(:,:)=pvo(:,:)+0.5*d_v(:,:)
     106      ENDIF
    93107   endif
    94108
     
    130144
    131145      bils_ec(:)=0.
     146      bils_tke(:)=0.
     147      bils_diss(:)=0.
    132148      bils_kinetic(:)=0.
    133149      bils_enthalp(:)=0.
     
    135151      DO k=1,klev
    136152        bils_ec(:)=bils_ec(:)-d_t_ec(:,k)*masse(:,k)
     153        bils_tke(:)=bils_tke(:)+0.5*(dtke(:,k)+dtke(:,k+1))*masse(:,k)
     154        bils_diss(:)=bils_diss(:)-d_t_diss(:,k)*masse(:,k)
    137155        bils_kinetic(:)=bils_kinetic(:)+masse(:,k)* &
    138156     &           (pun(:,k)*pun(:,k)+pvn(:,k)*pvn(:,k) &
     
    144162      ENDDO
    145163      bils_ec(:)=rcpd*bils_ec(:)/pdtphys
     164      bils_tke(:)=bils_tke(:)/pdtphys
     165      bils_diss(:)=rcpd*bils_diss(:)/pdtphys
    146166      bils_kinetic(:)= 0.5*bils_kinetic(:)/pdtphys
    147167      bils_enthalp(:)=rcpd*bils_enthalp(:)/pdtphys
    148168      bils_latent(:)=rlvtt*bils_latent(:)/pdtphys
    149 
    150 
    151169RETURN
    152170
  • LMDZ5/trunk/libf/phylmd/indicesol.h

    r1279 r1761  
    2121      PARAMETER (is_lic=2) ! glacier continental
    2222!
     23      INTEGER is_ave
     24      PARAMETER (is_ave=nbsrf+1) ! glacier continental
     25!
    2326      REAL epsfra
    2427      PARAMETER (epsfra=1.0E-05)
  • LMDZ5/trunk/libf/phylmd/pbl_surface_mod.F90

    r1670 r1761  
    176176       alb1_m,    alb2_m,    zxsens,   zxevap,        &
    177177       zxtsol,    zxfluxlat, zt2m,     qsat2m,        &
    178        d_t,       d_q,       d_u,      d_v,           &
     178       d_t,       d_q,       d_u,      d_v, d_t_diss, &
    179179       zcoefh,    zcoefm,    slab_wfbils,             &
    180180       qsol_d,    zq2m,      s_pblh,   s_plcl,        &
     
    259259    INCLUDE "YOETHF.h"
    260260    INCLUDE "temps.h"
     261!****************************************************************************************
     262! Declarations specifiques pour le 1D. A reprendre
    261263! Input variables
    262264!****************************************************************************************
     
    291293    REAL, DIMENSION(klon, nbsrf), INTENT(INOUT)     :: u10m    ! u speed at 10m
    292294    REAL, DIMENSION(klon, nbsrf), INTENT(INOUT)     :: v10m    ! v speed at 10m
    293     REAL, DIMENSION(klon, klev+1, nbsrf), INTENT(INOUT) :: tke
     295    REAL, DIMENSION(klon, klev+1, nbsrf+1), INTENT(INOUT) :: tke
    294296
    295297! Output variables
     
    310312    REAL, DIMENSION(klon),        INTENT(OUT)       :: qsat2m
    311313    REAL, DIMENSION(klon, klev),  INTENT(OUT)       :: d_t        ! change in temperature
     314    REAL, DIMENSION(klon, klev),  INTENT(OUT)       :: d_t_diss       ! change in temperature
    312315    REAL, DIMENSION(klon, klev),  INTENT(OUT)       :: d_q        ! change in water vapour
    313316    REAL, DIMENSION(klon, klev),  INTENT(OUT)       :: d_u        ! change in u speed
    314317    REAL, DIMENSION(klon, klev),  INTENT(OUT)       :: d_v        ! change in v speed
    315     REAL, DIMENSION(klon, klev),  INTENT(OUT)       :: zcoefh     ! coef for turbulent diffusion of T and Q, mean for each grid point
    316     REAL, DIMENSION(klon, klev),  INTENT(OUT)       :: zcoefm     ! coef for turbulent diffusion of U and V (?), mean for each grid point
     318    REAL, DIMENSION(klon, klev,nbsrf+1),  INTENT(OUT)       :: zcoefh     ! coef for turbulent diffusion of T and Q, mean for each grid point
     319    REAL, DIMENSION(klon, klev,nbsrf+1),  INTENT(OUT)       :: zcoefm     ! coef for turbulent diffusion of U and V (?), mean for each grid point
    317320
    318321! Output only for diagnostics
     
    424427    REAL, DIMENSION(klon)              :: ztsol
    425428    REAL, DIMENSION(klon)              :: alb_m  ! mean albedo for whole SW interval
    426     REAL, DIMENSION(klon,klev)         :: y_d_t, y_d_q
     429    REAL, DIMENSION(klon,klev)         :: y_d_t, y_d_q, y_d_t_diss
    427430    REAL, DIMENSION(klon,klev)         :: y_d_u, y_d_v
    428431    REAL, DIMENSION(klon,klev)         :: y_flux_t, y_flux_q
    429432    REAL, DIMENSION(klon,klev)         :: y_flux_u, y_flux_v
    430     REAL, DIMENSION(klon,klev)         :: ycoefh, ycoefm
     433    REAL, DIMENSION(klon,klev)         :: ycoefh, ycoefm,ycoefq
    431434    REAL, DIMENSION(klon)              :: ycdragh, ycdragm
    432435    REAL, DIMENSION(klon,klev)         :: yu, yv
     
    470473!****************************************************************************************
    471474! Declarations specifiques pour le 1D. A reprendre
     475!****************************************************************************************
    472476  REAL  :: fsens,flat
    473477  LOGICAL :: ok_flux_surf ! initialized during first_call below
    474478  COMMON /flux_arp/fsens,flat,ok_flux_surf
    475 !****************************************************************************************
    476479! End of declarations
    477480!****************************************************************************************
     
    546549    d_ts = 0.0    ; yfluxlat=0.0     ; flux_t = 0.0    ; flux_q = 0.0     
    547550    flux_u = 0.0  ; flux_v = 0.0     ; d_t = 0.0       ; d_q = 0.0     
    548     d_u = 0.0     ; d_v = 0.0        ; yqsol = 0.0   
     551    d_t_diss= 0.0 ;d_u = 0.0     ; d_v = 0.0        ; yqsol = 0.0   
    549552    ytherm = 0.0  ; ytke=0.
    550553   
    551     zcoefh(:,:) = 0.0
    552     zcoefh(:,1) = 999999. ! zcoefh(:,k=1) should never be used
    553     zcoefm(:,:) = 0.0
    554     zcoefm(:,1) = 999999. !
     554    tke(:,:,is_ave)=0.
     555    IF (iflag_pbl<20.or.iflag_pbl>=30) THEN
     556       zcoefh(:,:,:) = 0.0
     557       zcoefh(:,1,:) = 999999. ! zcoefh(:,k=1) should never be used
     558       zcoefm(:,:,:) = 0.0
     559       zcoefm(:,1,:) = 999999. !
     560    ELSE
     561      zcoefm(:,:,is_ave)=0.
     562      zcoefh(:,:,is_ave)=0.
     563    ENDIF
    555564    ytsoil = 999999.
    556565
     
    713722          ENDDO
    714723       ENDDO
    715        
     724
    716725       DO k = 1, nsoilmx
    717726          DO j = 1, knon
     
    747756            ypaprs, ypplay, yu, yv, yq, yt, yts, yrugos, yqsurf, ycdragm, &
    748757            ycoefm, ycoefh, ytke)
     758
     759       IF (iflag_pbl>=20.AND.iflag_pbl<30) THEN
     760! In this case, coef_diff_turb is called for the Cd only
     761       DO k = 2, klev
     762          DO j = 1, knon
     763             i = ni(j)
     764             ycoefh(j,k)   = zcoefh(i,k,nsrf)
     765             ycoefm(j,k)   = zcoefm(i,k,nsrf)
     766          ENDDO
     767       ENDDO
     768       ENDIF
    749769       
    750770!****************************************************************************************
     
    924944
    925945
     946     y_d_t_diss(:,:)=0.
     947     IF (iflag_pbl>=20 .and. iflag_pbl<30) THEN
     948        CALL yamada_c(knon,dtime,ypaprs,ypplay &
     949    &   ,yu,yv,yt,y_d_u,y_d_v,y_d_t,ycdragm,ytke,ycoefm,ycoefh,ycoefq,y_d_t_diss,yustar &
     950    &   ,iflag_pbl,nsrf)
     951     ENDIF
     952!     print*,'yamada_c OK'
     953
    926954       DO j = 1, knon
    927955          y_dflux_t(j) = y_dflux_t(j) * ypct(j)
     
    937965!****************************************************************************************
    938966
    939        tke(:,:,nsrf) = 0.
    940967       DO k = 1, klev
    941968          DO j = 1, knon
    942969             i = ni(j)
     970             y_d_t_diss(j,k)  = y_d_t_diss(j,k) * ypct(j)
    943971             y_d_t(j,k)  = y_d_t(j,k) * ypct(j)
    944972             y_d_q(j,k)  = y_d_q(j,k) * ypct(j)
     
    951979             flux_v(i,k,nsrf) = y_flux_v(j,k)
    952980
    953              tke(i,k,nsrf)    = ytke(j,k)
    954981
    955982          ENDDO
    956983       ENDDO
     984
     985!      print*,'Dans pbl OK1'
    957986
    958987       evap(:,nsrf) = - flux_q(:,1,nsrf)
     
    9801009       END DO
    9811010
     1011!      print*,'Dans pbl OK2'
     1012
    9821013       DO k = 2, klev
    9831014          DO j = 1, knon
    9841015             i = ni(j)
    985              zcoefh(i,k) = zcoefh(i,k) + ycoefh(j,k)*ypct(j)
    986              zcoefm(i,k) = zcoefm(i,k) + ycoefm(j,k)*ypct(j)
     1016             tke(i,k,nsrf)    = ytke(j,k)
     1017             zcoefh(i,k,nsrf) = ycoefh(j,k)
     1018             zcoefm(i,k,nsrf) = ycoefm(j,k)
     1019             tke(i,k,is_ave) = tke(i,k,is_ave) + ytke(j,k)*ypct(j)
     1020             zcoefh(i,k,is_ave) = zcoefh(i,k,is_ave) + ycoefh(j,k)*ypct(j)
     1021             zcoefm(i,k,is_ave) = zcoefm(i,k,is_ave) + ycoefm(j,k)*ypct(j)
    9871022          END DO
    9881023       END DO
     1024
     1025!      print*,'Dans pbl OK3'
    9891026
    9901027       IF ( nsrf .EQ. is_ter ) THEN
     
    10071044          DO j = 1, knon
    10081045             i = ni(j)
     1046             d_t_diss(i,k) = d_t_diss(i,k) + y_d_t_diss(j,k)
    10091047             d_t(i,k) = d_t(i,k) + y_d_t(j,k)
    10101048             d_q(i,k) = d_q(i,k) + y_d_q(j,k)
     
    10131051          END DO
    10141052       END DO
     1053
     1054!      print*,'Dans pbl OK4'
    10151055
    10161056!****************************************************************************************
     
    10401080! Calculations of diagnostic t,q at 2m and u, v at 10m
    10411081
     1082!      print*,'Dans pbl OK41'
     1083!      print*,'tair1,yt(:,1),y_d_t(:,1)'
     1084!      print*, tair1,yt(:,1),y_d_t(:,1)
    10421085       DO j=1, knon
    10431086          i = ni(j)
    10441087          uzon(j) = yu(j,1) + y_d_u(j,1)
    10451088          vmer(j) = yv(j,1) + y_d_v(j,1)
    1046           tair1(j) = yt(j,1) + y_d_t(j,1)
     1089          tair1(j) = yt(j,1) + y_d_t(j,1) + y_d_t_diss(j,1)
    10471090          qair1(j) = yq(j,1) + y_d_q(j,1)
    10481091          zgeo1(j) = RD * tair1(j) / (0.5*(ypaprs(j,1)+ypplay(j,1))) &
     
    10581101       END DO
    10591102       
     1103!      print*,'Dans pbl OK42A'
     1104!      print*,'tair1,yt(:,1),y_d_t(:,1)'
     1105!      print*, tair1,yt(:,1),y_d_t(:,1)
    10601106
    10611107! Calculate the temperature et relative humidity at 2m and the wind at 10m
     
    10641110            tairsol, qairsol, rugo1, psfce, patm, &
    10651111            yt2m, yq2m, yt10m, yq10m, yu10m, yustar)
     1112!      print*,'Dans pbl OK42B'
    10661113
    10671114       DO j=1, knon
     
    10771124       END DO
    10781125
     1126!      print*,'Dans pbl OK43'
    10791127!IM Calcule de l'humidite relative a 2m (rh2m) pour diagnostique
    10801128!IM Ajoute dependance type surface
     
    10931141       END IF
    10941142
     1143!   print*,'OK pbl 5'
    10951144       CALL HBTM(knon, ypaprs, ypplay, &
    10961145            yt2m,yt10m,yq2m,yq10m,yustar, &
     
    11131162       END DO
    11141163       
     1164!   print*,'OK pbl 6'
    11151165#else
    11161166! T2m not defined
     
    11301180!****************************************************************************************
    11311181   
     1182!   print*,'OK pbl 7'
    11321183    zxfluxt(:,:) = 0.0 ; zxfluxq(:,:) = 0.0
    11331184    zxfluxu(:,:) = 0.0 ; zxfluxv(:,:) = 0.0
     
    11431194    END DO
    11441195
     1196!   print*,'OK pbl 8'
    11451197    DO i = 1, klon
    11461198       zxsens(i)     = - zxfluxt(i,1) ! flux de chaleur sensible au sol
     
    11611213    s_trmb2(:) = 0.0 ; s_trmb3(:) = 0.0
    11621214   
     1215!   print*,'OK pbl 9'
    11631216   
    11641217    DO nsrf = 1, nbsrf
     
    11921245       END DO
    11931246    END DO
     1247!   print*,'OK pbl 10'
    11941248
    11951249    IF (check) THEN
  • LMDZ5/trunk/libf/phylmd/phys_local_var_mod.F90

    r1742 r1761  
    5555      REAL, SAVE, ALLOCATABLE :: d_u_oli(:,:), d_v_oli(:,:)
    5656      !$OMP THREADPRIVATE(d_u_oli, d_v_oli)
    57       REAL, SAVE, ALLOCATABLE :: d_t_vdf(:,:), d_q_vdf(:,:)
    58       !$OMP THREADPRIVATE( d_t_vdf, d_q_vdf)
     57      REAL, SAVE, ALLOCATABLE :: d_t_vdf(:,:), d_q_vdf(:,:), d_t_diss(:,:)
     58      !$OMP THREADPRIVATE( d_t_vdf, d_q_vdf,d_t_diss)
    5959      REAL, SAVE, ALLOCATABLE :: d_u_vdf(:,:), d_v_vdf(:,:)
    6060      !$OMP THREADPRIVATE(d_u_vdf, d_v_vdf)
     
    216216      allocate(d_t_lscth(klon,klev),d_q_lscth(klon,klev))
    217217      allocate(plul_st(klon),plul_th(klon))
    218       allocate(d_t_vdf(klon,klev),d_q_vdf(klon,klev))
     218      allocate(d_t_vdf(klon,klev),d_q_vdf(klon,klev),d_t_diss(klon,klev))
    219219      allocate(d_u_vdf(klon,klev),d_v_vdf(klon,klev))
    220220      allocate(d_t_oli(klon,klev),d_t_oro(klon,klev))
     
    305305      deallocate(d_t_lscth,d_q_lscth)
    306306      deallocate(plul_st,plul_th)
    307       deallocate(d_t_vdf,d_q_vdf)
     307      deallocate(d_t_vdf,d_q_vdf,d_t_diss)
    308308      deallocate(d_u_vdf,d_v_vdf)
    309309      deallocate(d_t_oli,d_t_oro)
  • LMDZ5/trunk/libf/phylmd/phys_output_mod.F90

    r1753 r1761  
    156156  type(ctrl_out),save :: o_LWdnSFCclr   = ctrl_out((/ 1, 4, 10, 10, 5, 10 /),'LWdnSFCclr')
    157157  type(ctrl_out),save :: o_bils         = ctrl_out((/ 1, 2, 10, 5, 10, 10 /),'bils')
     158  type(ctrl_out),save :: o_bils_tke         = ctrl_out((/ 1, 2, 10, 5, 10, 10 /),'bils_tke')
     159  type(ctrl_out),save :: o_bils_diss         = ctrl_out((/ 1, 2, 10, 5, 10, 10 /),'bils_diss')
    158160  type(ctrl_out),save :: o_bils_ec         = ctrl_out((/ 1, 2, 10, 5, 10, 10 /),'bils_ec')
    159161  type(ctrl_out),save :: o_bils_kinetic         = ctrl_out((/ 1, 2, 10, 5, 10, 10 /),'bils_kinetic')
     
    554556  type(ctrl_out),save :: o_beta_prec    = ctrl_out((/ 4, 10, 10, 10, 10, 10 /),'beta_prec')
    555557  type(ctrl_out),save :: o_dtvdf        = ctrl_out((/ 4, 10, 10, 10, 10, 10 /),'dtvdf')
     558  type(ctrl_out),save :: o_dtdis        = ctrl_out((/ 4, 10, 10, 10, 10, 10 /),'dtdis')
    556559  type(ctrl_out),save :: o_dqvdf        = ctrl_out((/ 4, 10, 10, 10, 10, 10 /),'dqvdf')
    557560  type(ctrl_out),save :: o_dteva        = ctrl_out((/ 4, 10, 10, 10, 10, 10 /),'dteva')
     
    10431046          CALL histdef2d(iff,clef_stations(iff),o_bils%flag,o_bils%name, "Surf. total heat flux", "W/m2")
    10441047          CALL histdef2d(iff,clef_stations(iff),o_bils_ec%flag,o_bils_ec%name, "Surf. total heat flux", "W/m2")
     1048          CALL histdef2d(iff,clef_stations(iff),o_bils_tke%flag,o_bils_tke%name, "Surf. total heat flux", "W/m2")
     1049          CALL histdef2d(iff,clef_stations(iff),o_bils_diss%flag,o_bils_diss%name, "Surf. total heat flux", "W/m2")
    10451050          CALL histdef2d(iff,clef_stations(iff),o_bils_kinetic%flag,o_bils_kinetic%name, "Surf. total heat flux", "W/m2")
    10461051          CALL histdef2d(iff,clef_stations(iff),o_bils_enthalp%flag,o_bils_enthalp%name, "Surf. total heat flux", "W/m2")
     
    16251630          CALL histdef3d(iff,clef_stations(iff),o_beta_prec%flag,o_beta_prec%name, "LS Conversion rate to prec", "(kg/kg)/s")
    16261631          CALL histdef3d(iff,clef_stations(iff),o_dtvdf%flag,o_dtvdf%name, "Boundary-layer dT", "K/s")
     1632          CALL histdef3d(iff,clef_stations(iff),o_dtdis%flag,o_dtdis%name, "TKE dissipation dT", "K/s")
    16271633          CALL histdef3d(iff,clef_stations(iff),o_dqvdf%flag,o_dqvdf%name, "Boundary-layer dQ", "(kg/kg)/s")
    16281634          CALL histdef3d(iff,clef_stations(iff),o_dteva%flag,o_dteva%name, "Reevaporation dT", "K/s")
  • LMDZ5/trunk/libf/phylmd/phys_output_var_mod.F90

    r1758 r1761  
    1717!$OMP THREADPRIVATE(itau_con)
    1818      REAL, ALLOCATABLE :: bils_ec(:) ! Contribution of energy conservation
     19      REAL, ALLOCATABLE :: bils_tke(:) ! Contribution of energy conservation
     20      REAL, ALLOCATABLE :: bils_diss(:) ! Contribution of energy conservation
    1921      REAL, ALLOCATABLE :: bils_kinetic(:) ! bilan de chaleur au sol, kinetic
    2022      REAL, ALLOCATABLE :: bils_enthalp(:) ! bilan de chaleur au sol
    2123      REAL, ALLOCATABLE :: bils_latent(:) ! bilan de chaleur au sol
    22 !$OMP THREADPRIVATE(bils_ec,bils_kinetic,bils_enthalp,bils_latent)
     24!$OMP THREADPRIVATE(bils_ec,bils_tke,bils_diss,bils_kinetic,bils_enthalp,bils_latent)
     25
    2326
    2427CONTAINS
     
    3235      allocate(snow_o(klon), zfra_o(klon))
    3336      allocate(itau_con(klon))
    34       allocate (bils_ec(klon),bils_kinetic(klon),bils_enthalp(klon),bils_latent(klon))
     37      allocate (bils_ec(klon),bils_tke(klon),bils_diss(klon),bils_kinetic(klon),bils_enthalp(klon),bils_latent(klon))
    3538
    3639END SUBROUTINE phys_output_var_init
     
    4245
    4346      deallocate(snow_o,zfra_o,itau_con)
    44       deallocate (bils_ec,bils_kinetic,bils_enthalp,bils_latent)
     47      deallocate (bils_ec,bils_tke,bils_diss,bils_kinetic,bils_enthalp,bils_latent)
    4548
    4649END SUBROUTINE phys_output_var_end
  • LMDZ5/trunk/libf/phylmd/phys_output_write.h

    r1753 r1761  
    360360       ENDIF
    361361
     362       IF (o_bils_diss%flag(iff)<=lev_files(iff)) THEN
     363      CALL histwrite_phy(nid_files(iff),clef_stations(iff),
     364     $o_bils_diss%name,itau_w,bils_diss)
     365       ENDIF
     366
    362367       IF (o_bils_ec%flag(iff)<=lev_files(iff)) THEN
    363368      CALL histwrite_phy(nid_files(iff),clef_stations(iff),
    364369     $o_bils_ec%name,itau_w,bils_ec)
     370       ENDIF
     371
     372       IF (o_bils_tke%flag(iff)<=lev_files(iff)) THEN
     373      CALL histwrite_phy(nid_files(iff),clef_stations(iff),
     374     $o_bils_tke%name,itau_w,bils_tke)
    365375       ENDIF
    366376
     
    13331343
    13341344!====MS forcing diagnostics
    1335         if (new_aod) then             
     1345        if (new_aod) then
    13361346        IF (o_swtoaas_nat%flag(iff)<=lev_files(iff)) THEN
    13371347        CALL histwrite_phy(nid_files(iff),clef_stations(iff),
     
    17151725       IF (o_kz%flag(iff)<=lev_files(iff)) THEN
    17161726      CALL histwrite_phy(nid_files(iff),clef_stations(iff),
    1717      $o_kz%name,itau_w,coefh)
     1727     $o_kz%name,itau_w,coefh(:,:,is_ave))
    17181728       ENDIF
    17191729
     
    17211731       IF (o_kz_max%flag(iff)<=lev_files(iff)) THEN
    17221732      CALL histwrite_phy(nid_files(iff),clef_stations(iff),
    1723      $o_kz_max%name,itau_w,coefh)
     1733     $o_kz_max%name,itau_w,coefh(:,:,is_ave))
    17241734       ENDIF
    17251735      ENDIF
     
    19081918       ENDIF
    19091919
     1920       IF (o_dtdis%flag(iff)<=lev_files(iff)) THEN
     1921      zx_tmp_fi3d(1:klon,1:klev)=d_t_diss(1:klon,1:klev)/pdtphys
     1922      CALL histwrite_phy(nid_files(iff),clef_stations(iff),
     1923     $o_dtdis%name,itau_w,zx_tmp_fi3d)
     1924       ENDIF
     1925
    19101926       IF (o_dqvdf%flag(iff)<=lev_files(iff)) THEN
    19111927      zx_tmp_fi3d(1:klon,1:klev)=d_q_vdf(1:klon,1:klev)/pdtphys
     
    21912207       IF (o_evu%flag(iff)<=lev_files(iff)) THEN
    21922208      CALL histwrite_phy(nid_files(iff),clef_stations(iff),
    2193      $o_evu%name,itau_w,coefm)
     2209     $o_evu%name,itau_w,coefm(:,:,is_ave))
    21942210       ENDIF
    21952211
  • LMDZ5/trunk/libf/phylmd/phys_state_var_mod.F90

    r1742 r1761  
    6363!$OMP THREADPRIVATE(ratqs)
    6464      REAL, ALLOCATABLE, SAVE :: pbl_tke(:,:,:) ! turb kinetic energy
    65 !$OMP THREADPRIVATE(pbl_tke)
     65      REAL, ALLOCATABLE, SAVE :: coefh(:,:,:) ! Kz enthalpie
     66      REAL, ALLOCATABLE, SAVE :: coefm(:,:,:) ! Kz momentum
     67!$OMP THREADPRIVATE(pbl_tke, coefh,coefm)
    6668      REAL, ALLOCATABLE, SAVE :: zmax0(:), f0(:) !
    6769!$OMP THREADPRIVATE(zmax0,f0)
     
    394396      ALLOCATE(clwcon(klon,klev),rnebcon(klon,klev))
    395397      ALLOCATE(ratqs(klon,klev))
    396       ALLOCATE(pbl_tke(klon,klev+1,nbsrf))
     398      ALLOCATE(pbl_tke(klon,klev+1,nbsrf+1))
     399      ALLOCATE(coefh(klon,klev+1,nbsrf+1))
     400      ALLOCATE(coefm(klon,klev+1,nbsrf+1))
    397401      ALLOCATE(zmax0(klon), f0(klon))
    398402      ALLOCATE(ema_work1(klon,klev), ema_work2(klon,klev))
     
    530534      deallocate(        u_ancien, v_ancien                 )
    531535      deallocate(        tr_ancien)                           !RomP
    532       deallocate(ratqs, pbl_tke)
     536      deallocate(ratqs, pbl_tke,coefh,coefm)
    533537      deallocate(zmax0, f0)
    534538      deallocate(ema_work1, ema_work2)
  • LMDZ5/trunk/libf/phylmd/physiq.F

    r1753 r1761  
    655655      real w0(klon)                                          ! Vitesse des thermiques au LCL
    656656      real w_conv(klon)                                      ! Vitesse verticale de grande \'echelle au LCL
     657      real tke0(klon,klev+1)                              ! TKE au début du pas de temps
    657658      real therm_tke_max0(klon)                              ! TKE dans les thermiques au LCL
    658659      real env_tke_max0(klon)                                ! TKE dans l'environnement au LCL
     
    694695cAA
    695696cAA  Pour phytrac
    696 cAA
    697       REAL coefh(klon,klev)     ! coef d'echange pour phytrac, valable pour 2<=k<=klev
    698       REAL coefm(klon,klev)     ! coef d'echange pour U, V
    699697      REAL u1(klon)             ! vents dans la premiere couche U
    700698      REAL v1(klon)             ! vents dans la premiere couche V
     
    12881286          pbase=0
    12891287cIM 180608
    1290 c         pmflxr=0.
    1291 c         pmflxs=0.
    12921288
    12931289        itau_con=0
     
    13961392
    13971393         CALL phyetat0 ("startphy.nc",clesphy0,tabcntr0)
     1394         IF (klon_glo==1) THEN
     1395         coefh=0. ; coefm=0. ; pbl_tke=0.
     1396         coefh(:,2,:)=1.e-2 ; coefm(:,2,:)=1.e-2 ; pbl_tke(:,2,:)=1.e-2
     1397         PRINT*,'FH WARNING : lignes a supprimer'
     1398         ENDIF
    13981399cIM begin
    13991400          print*,'physiq: clwcon rnebcon ratqs',clwcon(1,1),rnebcon(1,1)
     
    17701771      d1a(:,:)=0.
    17711772      dam(:,:)=0.
     1773          pmflxr=0.
     1774          pmflxs=0.
    17721775! RomP <<<
    17731776
     
    17851788      ENDDO
    17861789      ENDDO
     1790      tke0(:,:)=pbl_tke(:,:,is_ave)
    17871791      IF (nqtot.GE.3) THEN
    17881792      DO iq = 3, nqtot
     
    20732077     s     albsol1,   albsol2,   sens,    evap, 
    20742078     s     zxtsol,    zxfluxlat, zt2m,    qsat2m,
    2075      s     d_t_vdf,   d_q_vdf,   d_u_vdf, d_v_vdf,
     2079     s     d_t_vdf,   d_q_vdf,   d_u_vdf, d_v_vdf, d_t_diss,
    20762080     s     coefh,     coefm,     slab_wfbils,               
    20772081     d     qsol,      zq2m,      s_pblh,  s_lcl,
     
    20892093!-----------------------------------------------------------------------------------------
    20902094! ajout des tendances de la diffusion turbulente
    2091       CALL add_phys_tend(d_u_vdf,d_v_vdf,d_t_vdf,d_q_vdf,dql0,'vdf')
     2095      CALL add_phys_tend
     2096     s     (d_u_vdf,d_v_vdf,d_t_vdf+d_t_diss,d_q_vdf,dql0,'vdf')
    20922097!-----------------------------------------------------------------------------------------
    20932098
     
    31753180     $                          paprs,
    31763181     $                          pplay,
    3177      $                          coefh,
     3182     $                          coefh(:,:,is_ave),
    31783183     $                          pphi,
    31793184     $                          t_seri,
     
    36963701     I     paprs,    pplay,     pmfu,     pmfd,
    36973702     I     pen_u,    pde_u,     pen_d,    pde_d,
    3698      I     cdragh,   coefh,     fm_therm, entr_therm,
     3703     I     cdragh,   coefh(:,:,is_ave),     fm_therm, entr_therm,
    36993704     I     u1,       v1,        ftsol,    pctsrf,
    37003705     I     ustar,     u10m,      v10m,
     
    37233728     I                   t,pmfu, pmfd, pen_u, pde_u, pen_d, pde_d,
    37243729     I                   fm_therm,entr_therm,
    3725      I                   cdragh,coefh,u1,v1,ftsol,pctsrf,
     3730     I                   cdragh,coefh(:,:,is_ave),u1,v1,ftsol,pctsrf,
    37263731     I                   frac_impa, frac_nucl,
    37273732     I                   pphis,airephy,dtime,itap,
     
    37583763      forall (k=1: llm) exner(:, k) = (pplay(:, k)/paprs(:,1))**RKAPPA
    37593764      CALL ener_conserv(klon,klev,pdtphys,u,v,t,qx(:,:,ivap),
    3760      s        u_seri,v_seri,t_seri,q_seri,
     3765     s        u_seri,v_seri,t_seri,q_seri,pbl_tke(:,:,is_ave)-tke0(:,:),
    37613766     s        zmasse,exner,d_t_ec)
    37623767      t_seri(:,:)=t_seri(:,:)+d_t_ec(:,:)
     
    39633968
    39643969
     3970
    39653971c=============================================================
    39663972! Separation entre thermiques et non thermiques dans les sorties
     
    39913997      endif
    39923998
    3993  
    39943999#include "phys_output_write.h"
    39954000
     
    40704075         ENDIF !if callstats
    40714076     
    4072 
    40734077      IF (lafin) THEN
    40744078         itau_phy = itau_phy + itap
Note: See TracChangeset for help on using the changeset viewer.