source: LMDZ6/branches/Amaury_dev/libf/phylmd/reevap.F90

Last change on this file was 5160, checked in by abarral, 3 months ago

Put .h into modules

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