source: LMDZ5/branches/testing/libf/phylmd/reevap.F90 @ 5423

Last change on this file since 5423 was 2839, checked in by Laurent Fairhead, 8 years ago

Merged trunk changes r2785:2838 into testing branch

File size: 2.7 KB
RevLine 
[2705]1  SUBROUTINE reevap (klon,klev,iflag_ice_thermo,t_seri,q_seri,ql_seri,qs_seri, &
2   &         d_t_eva,d_q_eva,d_ql_eva,d_qs_eva)
3
[2839]4    ! flag to include modifications to ensure energy conservation (if flag >0)
5    USE add_phys_tend_mod, only : fl_cor_ebil
6   
[2705]7    IMPLICIT none
8    !>======================================================================
9
10    INTEGER klon,klev,iflag_ice_thermo
11    REAL, DIMENSION(klon,klev), INTENT(in) :: t_seri,q_seri,ql_seri,qs_seri
12    REAL, DIMENSION(klon,klev), INTENT(out) :: d_t_eva,d_q_eva,d_ql_eva,d_qs_eva
13
14    REAL za,zb,zdelta,zlvdcp,zlsdcp
15    INTEGER i,k
16
17    !--------Stochastic Boundary Layer Triggering: ALE_BL--------
18    !---Propri\'et\'es du thermiques au LCL
19    include "YOMCST.h"
20    include "YOETHF.h"
21    include "FCTTRE.h"
22    !IM 100106 BEG : pouvoir sortir les ctes de la physique
23    !
24    ! Re-evaporer l'eau liquide nuageuse
25    !
[2839]26!print *,'rrevap ; fl_cor_ebil:',fl_cor_ebil,' iflag_ice_thermo:',iflag_ice_thermo,' RVTMP2',RVTMP2
[2705]27    DO k = 1, klev  ! re-evaporation de l'eau liquide nuageuse
28       DO i = 1, klon
[2839]29        if (fl_cor_ebil .GT. 0) then
30          zlvdcp=RLVTT/RCPD/(1.0+RVTMP2*(q_seri(i,k)+ql_seri(i,k)+qs_seri(i,k)))
31          zlsdcp=RLSTT/RCPD/(1.0+RVTMP2*(q_seri(i,k)+ql_seri(i,k)+qs_seri(i,k)))
32        else
[2705]33          zlvdcp=RLVTT/RCPD/(1.0+RVTMP2*q_seri(i,k))
34          !jyg<
35          !  Attention : Arnaud a propose des formules completement differentes
36          !                  A verifier !!!
37          zlsdcp=RLSTT/RCPD/(1.0+RVTMP2*q_seri(i,k))
[2839]38        end if
[2705]39          IF (iflag_ice_thermo .EQ. 0) THEN
40             zlsdcp=zlvdcp
41          ENDIF
42          !>jyg
43
44          IF (iflag_ice_thermo.eq.0) THEN   
45             !pas necessaire a priori
46
47             zdelta = MAX(0.,SIGN(1.,RTT-t_seri(i,k)))
[2839]48  zdelta = 0.
[2705]49             zb = MAX(0.0,ql_seri(i,k))
50             za = - MAX(0.0,ql_seri(i,k)) &
51                  * (zlvdcp*(1.-zdelta)+zlsdcp*zdelta)
52             d_t_eva(i,k) = za
53             d_q_eva(i,k) = zb
54             d_ql_eva(i,k) = -ql_seri(i,k)
55             d_qs_eva(i,k) = 0.
56
57          ELSE
58
59             !CR: on r\'e-\'evapore eau liquide et glace
60
61             !        zdelta = MAX(0.,SIGN(1.,RTT-t_seri(i,k)))
62             !        zb = MAX(0.0,ql_seri(i,k))
63             !        za = - MAX(0.0,ql_seri(i,k)) &
64             !             * (zlvdcp*(1.-zdelta)+zlsdcp*zdelta)
65             zb = MAX(0.0,ql_seri(i,k)+qs_seri(i,k))
66             za = - MAX(0.0,ql_seri(i,k))*zlvdcp &
67                  - MAX(0.0,qs_seri(i,k))*zlsdcp
68             d_t_eva(i,k) = za
69             d_q_eva(i,k) = zb
70             d_ql_eva(i,k) = -ql_seri(i,k)
71             d_qs_eva(i,k) = -qs_seri(i,k)
72          ENDIF
73
74       ENDDO
75    ENDDO
76
77RETURN
78
79END SUBROUTINE reevap
Note: See TracBrowser for help on using the repository browser.