source: LMDZ6/trunk/libf/phylmdiso/reevap.F90 @ 5435

Last change on this file since 5435 was 5285, checked in by abarral, 8 weeks ago

As discussed internally, remove generic ONLY: ... for new _mod_h modules

File size: 3.9 KB
Line 
1  SUBROUTINE reevap (klon,klev,iflag_ice_thermo,t_seri,qx, &
2   &         d_t_eva,d_qx_eva)
3
4    ! flag to include modifications to ensure energy conservation (if flag >0)
5    USE add_phys_tend_mod, only : fl_cor_ebil
6#ifdef ISO
7    USE infotrac_phy, ONLY: ntiso,nqtot,ivap,iliq,isol,iqWIsoPha
8#ifdef ISOVERIF
9    USE isotopes_verif_mod
10!, ONLY: errmax,errmaxrel, iso_verif_o18_aberrant_nostop,deltaD,deltaO
11    USE isotopes_mod, ONLY: iso_eau,iso_hdo,iso_o18,ridicule
12#ifdef ISOTRAC
13    USE isotrac_routines_mod, ONLY: iso_verif_traceur_pbidouille   
14#endif
15#endif
16#endif
17    USE yomcst_mod_h
18    USE yoethf_mod_h
19IMPLICIT none
20    !>======================================================================
21
22    INTEGER klon,klev,iflag_ice_thermo
23    REAL, DIMENSION(klon,klev), INTENT(in) :: t_seri
24    REAL, DIMENSION(klon,klev,nqtot), INTENT(in) ::     qx
25    REAL, DIMENSION(klon,klev), INTENT(out) :: d_t_eva
26    REAL, DIMENSION(klon,klev,nqtot), INTENT(out) ::    d_qx_eva
27
28    REAL za,zb,zdelta,zlvdcp,zlsdcp
29    INTEGER i,k,ixt,ivapcur,iliqcur,isolcur
30
31
32    !--------Stochastic Boundary Layer Triggering: ALE_BL--------
33    !---Propri\'et\'es du thermiques au LCL
34
35    include "FCTTRE.h"
36    !IM 100106 BEG : pouvoir sortir les ctes de la physique
37    !
38    DO ixt = 1, 1+ntiso
39    ! Re-evaporer l'eau liquide nuageuse
40    !
41    iliqcur= iqWIsoPha(ixt,iliq)   
42    ivapcur= iqWIsoPha(ixt,ivap)   
43    isolcur= iqWIsoPha(ixt,isol)   
44!print *,'rrevap ; fl_cor_ebil:',fl_cor_ebil,' iflag_ice_thermo:',iflag_ice_thermo,' RVTMP2',RVTMP2
45    DO k = 1, klev  ! re-evaporation de l'eau liquide nuageuse
46      DO i = 1, klon
47
48        IF (ixt == 1) THEN ! water
49          IF (fl_cor_ebil > 0) THEN
50            !zlvdcp=RLVTT/RCPD/(1.0+RVTMP2*(q_seri(i,k)+ql_seri(i,k)+qs_seri(i,k)))
51            !zlsdcp=RLSTT/RCPD/(1.0+RVTMP2*(q_seri(i,k)+ql_seri(i,k)+qs_seri(i,k)))
52            zlvdcp=RLVTT/RCPD/(1.0+RVTMP2*(qx(i,k,ivapcur)+qx(i,k,iliqcur)+qx(i,k,isolcur)))
53            zlsdcp=RLSTT/RCPD/(1.0+RVTMP2*(qx(i,k,ivapcur)+qx(i,k,iliqcur)+qx(i,k,isolcur)))
54          ELSE
55            zlvdcp=RLVTT/RCPD/(1.0+RVTMP2*qx(i,k,ivapcur))
56            !jyg<
57            !  Attention : Arnaud a propose des formules completement differentes
58            !                  A verifier !!!
59            zlsdcp=RLSTT/RCPD/(1.0+RVTMP2*qx(i,k,ivapcur))
60         ENDIF
61          IF (iflag_ice_thermo == 0) THEN
62            zlsdcp=zlvdcp
63          ENDIF
64          !>jyg
65        ENDIF
66        IF (iflag_ice_thermo == 0) THEN   
67           !pas necessaire a priori
68
69            zdelta = MAX(0.,SIGN(1.,RTT-t_seri(i,k)))
70            zdelta = 0.
71            zb = MAX(0.0,qx(i,k,iliqcur))
72            IF (ixt == 1) THEN
73              za = - MAX(0.0,qx(i,k,iliqcur)) &
74                   * (zlvdcp*(1.-zdelta)+zlsdcp*zdelta)
75              d_t_eva(i,k) = za
76            ENDIF
77            d_qx_eva(i,k,ivapcur)  = zb
78            d_qx_eva(i,k,iliqcur) = -qx(i,k,iliqcur)
79            d_qx_eva(i,k,isolcur) = 0.
80
81        ELSE
82             
83             !CR: on r\'e-\'evapore eau liquide et glace
84
85             !        zdelta = MAX(0.,SIGN(1.,RTT-t_seri(i,k)))
86             !        zb = MAX(0.0,ql_seri(i,k))
87             !        za = - MAX(0.0,ql_seri(i,k)) &
88             !             * (zlvdcp*(1.-zdelta)+zlsdcp*zdelta)
89            IF (ixt == 1) THEN
90              za = - MAX(0.0,qx(i,k,iliqcur))*zlvdcp &
91                   - MAX(0.0,qx(i,k,iliqcur))*zlsdcp
92              d_t_eva(i,k) = za
93            ENDIF
94            !zb = MAX(0.0,ql_seri(i,k)+qs_seri(i,k))
95            !d_q_eva(i,k) = zb
96            !d_ql_eva(i,k) = -ql_seri(i,k)
97            !d_qs_eva(i,k) = -qs_seri(i,k)
98
99            zb = MAX(0.0,qx(i,k,iliqcur)+qx(i,k,isolcur))
100            d_qx_eva(i,k,ivapcur) = zb
101            d_qx_eva(i,k,iliqcur) = -qx(i,k,iliqcur)
102            d_qx_eva(i,k,isolcur) = -qx(i,k,isolcur)
103        ENDIF
104
105
106      ENDDO
107    ENDDO
108
109    ENDDO ! DO ixt = 1, 1+niso*(nzone +1)
110
111RETURN
112
113END SUBROUTINE reevap
Note: See TracBrowser for help on using the repository browser.