Changeset 4887


Ignore:
Timestamp:
Apr 2, 2024, 1:14:33 PM (9 months ago)
Author:
oboucher
Message:

Correction of another small bug on the water mass fixer (not activated)
Introduction of a water_budget diagnostic that quantifies non-conservation from the LMDZ physics

Location:
LMDZ6/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/DefLists/field_def_lmdz.xml

    r4846 r4887  
    311311        <field id="prsw"   long_name="Precipitable solid water"  unit="kg/m2" />
    312312        <field id="prbsw"   long_name="Precipitable blowing snow"  unit="kg/m2" />
     313        <field id="water_budget"   long_name="Residual non-conservation water budget from physics"  unit="kg/m2" />
    313314        <field id="s_pblh"    long_name="Boundary Layer Height"    unit="m" />
    314315        <field id="s_pblt"    long_name="t at Boundary Layer Height"    unit="K" />
  • LMDZ6/trunk/DefLists/field_def_lmdz_cospv2.xml

    r3625 r4887  
    265265        <field id="prlw"   long_name="Precipitable liquid water"  unit="kg/m2" />
    266266        <field id="prsw"   long_name="Precipitable solid water"  unit="kg/m2" />
     267        <field id="water_budget"   long_name="Residual non-conservation water budget from physics"  unit="kg/m2" />
    267268        <field id="s_pblh"    long_name="Boundary Layer Height"    unit="m" />
    268269        <field id="s_pblt"    long_name="t at Boundary Layer Height"    unit="K" />
  • LMDZ6/trunk/DefLists/file_def_histmth_lmdz.xml

    r4846 r4887  
    254254                <field field_ref="prlw" level="1" />
    255255                <field field_ref="prsw" level="1" />
     256                <field field_ref="water_budget" level="1" />
    256257                <field field_ref="s_pblh" level="1" />
    257258                <field field_ref="s_pblt" level="1" />
  • LMDZ6/trunk/libf/phylmd/phys_local_var_mod.F90

    r4881 r4887  
    319319      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: JrNt
    320320!$OMP THREADPRIVATE(JrNt)
    321       REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: dthmin, evap, snowerosion, fder, plcl, plfc, prw, prlw, prsw, prbsw
    322 !$OMP THREADPRIVATE(dthmin, evap, snowerosion, fder, plcl, plfc, prw, prlw, prsw, prbsw)
     321      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: dthmin, evap, snowerosion, fder, plcl, plfc, prw, prlw, prsw, prbsw, water_budget
     322!$OMP THREADPRIVATE(dthmin, evap, snowerosion, fder, plcl, plfc, prw, prlw, prsw, prbsw, water_budget)
    323323      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zustar, zu10m, zv10m, rh2m
    324324!$OMP THREADPRIVATE(zustar, zu10m, zv10m, rh2m)
     
    829829      ALLOCATE(JrNt(klon))
    830830      ALLOCATE(dthmin(klon), evap(klon), snowerosion(klon), fder(klon), plcl(klon), plfc(klon))
    831       ALLOCATE(prw(klon), prlw(klon), prsw(klon), prbsw(klon), zustar(klon), zu10m(klon), zv10m(klon), rh2m(klon))
     831      ALLOCATE(prw(klon), prlw(klon), prsw(klon), prbsw(klon), water_budget(klon), zustar(klon), zu10m(klon), zv10m(klon), rh2m(klon))
    832832      ALLOCATE(s_lcl(klon))
    833833      ALLOCATE(s_pblh(klon), s_pblt(klon), s_therm(klon))
     
    11631163      DEALLOCATE(JrNt)
    11641164      DEALLOCATE(dthmin, evap, snowerosion, fder, plcl, plfc)
    1165       DEALLOCATE(prw, prlw, prsw, prbsw, zustar, zu10m, zv10m, rh2m, s_lcl)
     1165      DEALLOCATE(prw, prlw, prsw, prbsw, water_budget, zustar, zu10m, zv10m, rh2m, s_lcl)
    11661166      DEALLOCATE(s_pblh, s_pblt, s_therm)
    11671167!
  • LMDZ6/trunk/libf/phylmd/phys_output_ctrlout_mod.F90

    r4843 r4887  
    833833  TYPE(ctrl_out), SAVE :: o_prbsw = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
    834834    'prbsw', 'Precipitable blowing snow', 'kg/m2', (/ ('', i=1, 10) /))
     835  TYPE(ctrl_out), SAVE :: o_water_budget = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
     836    'water_budget', 'Water budget', 'kg/m2', (/ ('', i=1, 10) /))
    835837  TYPE(ctrl_out), SAVE :: o_s_pblh = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
    836838    's_pblh', 'Boundary Layer Height', 'm', (/ ('', i=1, 10) /))
  • LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90

    r4881 r4887  
    8383         o_Mipsh, o_Ma, &
    8484         o_dnwd, o_dnwd0, o_ftime_deepcv, o_ftime_con, o_mc, &
    85          o_prw, o_prlw, o_prsw, o_prbsw, o_s_pblh, o_s_pblt, o_s_lcl, &
     85         o_prw, o_prlw, o_prsw, o_prbsw, o_water_budget, o_s_pblh, o_s_pblt, o_s_lcl, &
    8686         o_s_therm, o_uSTDlevs, o_vSTDlevs, &
    8787         o_wSTDlevs, o_zSTDlevs, o_qSTDlevs, &
     
    324324         uwat, vwat, &
    325325         rneb_seri, d_rneb_dyn, &
    326          plcl, plfc, wbeff, convoccur, upwd, dnwd, dnwd0, prw, prlw, prsw,prbsw, &
     326         plcl, plfc, wbeff, convoccur, upwd, dnwd, dnwd0, prw, prlw, prsw, prbsw, water_budget, &
    327327         s_pblh, s_pblt, s_lcl, s_therm, uwriteSTD, &
    328328         vwriteSTD, wwriteSTD, phiwriteSTD, qwriteSTD, &
     
    14001400       CALL histwrite_phy(o_prbsw, prbsw)
    14011401       ENDIF
     1402       CALL histwrite_phy(o_water_budget, water_budget)
    14021403       CALL histwrite_phy(o_s_pblh, s_pblh)
    14031404       CALL histwrite_phy(o_s_pblt, s_pblt)
  • LMDZ6/trunk/libf/phylmd/physiq_mod.F90

    r4886 r4887  
    259259       JrNt,                             &
    260260       dthmin, evap, snowerosion,fder, plcl, plfc,   &
    261        prw, prlw, prsw, prbsw,                  &
     261       prw, prlw, prsw, prbsw, water_budget,         &
    262262       s_lcl, s_pblh, s_pblt, s_therm,   &
    263263       cdragm, cdragh,                   &
     
    24642464    qql1(:)=0.0
    24652465    DO k = 1, klev
    2466       qql1(:)=qql1(:)+(q_seri(:,k)+ql_seri(:,k)+qs_seri(:,k)+qbs_seri(:,k))*zmasse(:,k)
     2466      qql1(:)=qql1(:)+(q_seri(:,k)+ql_seri(:,k))*zmasse(:,k)
     2467      IF (nqo >= 3) THEN
     2468        qql1(:)=qql1(:)+qs_seri(:,k)*zmasse(:,k)
     2469      ENDIF
     2470      IF (ok_bs) THEN
     2471        qql1(:)=qql1(:)+qbs_seri(:,k)*zmasse(:,k)
     2472      ENDIF
    24672473    ENDDO
    24682474    ENDIF
     
    54655471    t_seri(:,:)=t_seri(:,:)+d_t_ec(:,:)
    54665472
    5467     !=======================================================================
    5468     !   SORTIES
    5469     !=======================================================================
    5470     !
    5471     !IM initialisation + calculs divers diag AMIP2
    5472     !
    5473     include "calcul_divers.h"
    5474     !
    5475     !IM Interpolation sur les niveaux de pression du NMC
    5476     !   -------------------------------------------------
    5477     !
    5478     include "calcul_STDlev.h"
    5479     !
    5480     ! slp sea level pressure derived from Arpege-IFS : CALL ctstar + CALL pppmer
    5481     CALL diag_slp(klon,t_seri,paprs,pplay,pphis,ptstar,pt0,slp)
    5482     !
     5473    !==================================================================
     5474    !--OB water mass fixer for the physics
     5475    !--water profiles are corrected to force mass conservation of water
     5476    !--currently flag is turned off
     5477    !==================================================================
     5478    IF (mass_fixer) THEN
     5479    qql2(:)=0.0
     5480    DO k = 1, klev
     5481      qql2(:)=qql2(:)+(q_seri(:,k)+ql_seri(:,k))*zmasse(:,k)
     5482      IF (nqo >= 3) THEN
     5483        qql2(:)=qql2(:)+qs_seri(:,k)*zmasse(:,k)
     5484      ENDIF
     5485      IF (ok_bs) THEN
     5486        qql2(:)=qql2(:)+qbs_seri(:,k)*zmasse(:,k)
     5487      ENDIF
     5488    ENDDO
     5489
     5490#ifdef CPP_StratAer
     5491    IF (ok_qemiss) THEN
     5492       DO k = 1, klev
     5493          qql1(:) = qql1(:)+d_q_emiss(:,k)*zmasse(:,k)
     5494       ENDDO
     5495    ENDIF
     5496#endif
     5497    IF (ok_qch4) THEN
     5498       DO k = 1, klev
     5499          qql1(:) = qql1(:)+d_q_ch4_dtime(:,k)*zmasse(:,k)
     5500       ENDDO
     5501    ENDIF
     5502   
     5503    DO i = 1, klon
     5504      !--compute ratio of what q+ql should be with conservation to what it is
     5505      IF (ok_bs) THEN
     5506        corrqql=(qql1(i)+(evap(i)-rain_fall(i)-snow_fall(i)-bs_fall(i))*pdtphys)/qql2(i)
     5507      ELSE
     5508        corrqql=(qql1(i)+(evap(i)-rain_fall(i)-snow_fall(i))*pdtphys)/qql2(i)
     5509      ENDIF
     5510      DO k = 1, klev
     5511        q_seri(i,k) =q_seri(i,k)*corrqql
     5512        ql_seri(i,k)=ql_seri(i,k)*corrqql
     5513        IF (nqo >= 3) THEN
     5514          qs_seri(i,k)=qs_seri(i,k)*corrqql
     5515        ENDIF
     5516        IF (ok_bs) THEN
     5517          qbs_seri(i,k)=qbs_seri(i,k)*corrqql
     5518        ENDIF
     5519      ENDDO
     5520    ENDDO
     5521    ENDIF
     5522    !--fin mass fixer
     5523
    54835524    !cc prw  = eau precipitable
    54845525    !   prlw = colonne eau liquide
    54855526    !   prlw = colonne eau solide
    54865527    !   prbsw = colonne neige soufflee
     5528    !   water_budget = non-conservation residual from the LMDZ physics
     5529    !                  (should be equal to machine precision if mass fixer is activated)
    54875530    prw(:) = 0.
    54885531    prlw(:) = 0.
    54895532    prsw(:) = 0.
    54905533    prbsw(:) = 0.
     5534    water_budget(:) = 0.0
    54915535    DO k = 1, klev
    54925536       prw(:)  = prw(:)  + q_seri(:,k)*zmasse(:,k)
    54935537       prlw(:) = prlw(:) + ql_seri(:,k)*zmasse(:,k)
    5494        prsw(:) = prsw(:) + qs_seri(:,k)*zmasse(:,k)
    5495        prbsw(:)= prbsw(:) + qbs_seri(:,k)*zmasse(:,k)
     5538       water_budget(:) = water_budget(:) + (q_seri(:,k)-qx(:,k,ivap)+ql_seri(:,k)-qx(:,k,iliq))*zmasse(:,k)
     5539       IF (nqo >= 3) THEN
     5540         prsw(:) = prsw(:) + qs_seri(:,k)*zmasse(:,k)
     5541         water_budget(:) = water_budget(:) + (qs_seri(:,k)-qx(:,k,isol))*zmasse(:,k)
     5542       ENDIF
     5543       IF (nqo >= 4 .AND. ok_bs) THEN
     5544         prbsw(:)= prbsw(:) + qbs_seri(:,k)*zmasse(:,k)
     5545         water_budget(:) = water_budget(:) + (qbs_seri(:,k)-qx(:,k,ibs))*zmasse(:,k)
     5546       ENDIF
    54965547    ENDDO
     5548    water_budget(:)=water_budget(:)+(rain_fall(:)+snow_fall(:)-evap(:))*pdtphys
     5549    IF (ok_bs) THEN
     5550      water_budget(:)=water_budget(:)+bs_fall(:)*pdtphys
     5551    ENDIF
     5552
     5553    !=======================================================================
     5554    !   SORTIES
     5555    !=======================================================================
     5556    !
     5557    !IM initialisation + calculs divers diag AMIP2
     5558    !
     5559    include "calcul_divers.h"
     5560    !
     5561    !IM Interpolation sur les niveaux de pression du NMC
     5562    !   -------------------------------------------------
     5563    !
     5564    include "calcul_STDlev.h"
     5565    !
     5566    ! slp sea level pressure derived from Arpege-IFS : CALL ctstar + CALL pppmer
     5567    CALL diag_slp(klon,t_seri,paprs,pplay,pphis,ptstar,pt0,slp)
     5568    !
    54975569    !
    54985570    IF (ANY(type_trac == ['inca','inco'])) THEN
     
    55795651    !IM global posePB      include "write_bilKP_ave.h"
    55805652    !
    5581 
    5582     !--OB mass fixer
    5583     !--profile is corrected to force mass conservation of water
    5584     IF (mass_fixer) THEN
    5585     qql2(:)=0.0
    5586     DO k = 1, klev
    5587       qql2(:)=qql2(:)+(q_seri(:,k)+ql_seri(:,k)+qs_seri(:,k)+qbs_seri(:,k))*zmasse(:,k)
    5588     ENDDO
    5589 
    5590 #ifdef CPP_StratAer
    5591     IF (ok_qemiss) THEN
    5592        DO k = 1, klev
    5593           qql1(:) = qql1(:)+d_q_emiss(:,k)*zmasse(:,k)
    5594        ENDDO
    5595     ENDIF
    5596 #endif
    5597     IF (ok_qch4) THEN
    5598        DO k = 1, klev
    5599           qql1(:) = qql1(:)+d_q_ch4_dtime(:,k)*zmasse(:,k)
    5600        ENDDO
    5601     ENDIF
    5602    
    5603     DO i = 1, klon
    5604       !--compute ratio of what q+ql should be with conservation to what it is
    5605       corrqql=(qql1(i)+(evap(i)-rain_fall(i)-snow_fall(i))*pdtphys)/qql2(i)
    5606       DO k = 1, klev
    5607         q_seri(i,k) =q_seri(i,k)*corrqql
    5608         ql_seri(i,k)=ql_seri(i,k)*corrqql
    5609         qs_seri(i,k)=qs_seri(i,k)*corrqql
    5610         qbs_seri(i,k)=qbs_seri(i,k)*corrqql
    5611       ENDDO
    5612     ENDDO
    5613     ENDIF
    5614     !--fin mass fixer
    5615 
    56165653    ! Sauvegarder les valeurs de t et q a la fin de la physique:
    56175654    !
Note: See TracChangeset for help on using the changeset viewer.