GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: phylmd/reevap.F90 Lines: 15 24 62.5 %
Date: 2023-06-30 12:56:34 Branches: 7 10 70.0 %

Line Branch Exec Source
1
288
  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
4
    ! flag to include modifications to ensure energy conservation (if flag >0)
5
    USE add_phys_tend_mod, only : fl_cor_ebil
6
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
    !
26
!print *,'rrevap ; fl_cor_ebil:',fl_cor_ebil,' iflag_ice_thermo:',iflag_ice_thermo,' RVTMP2',RVTMP2
27
11520
    DO k = 1, klev  ! re-evaporation de l'eau liquide nuageuse
28
11176128
       DO i = 1, klon
29
11164608
        if (fl_cor_ebil .GT. 0) then
30
11164608
          zlvdcp=RLVTT/RCPD/(1.0+RVTMP2*(q_seri(i,k)+ql_seri(i,k)+qs_seri(i,k)))
31
11164608
          zlsdcp=RLSTT/RCPD/(1.0+RVTMP2*(q_seri(i,k)+ql_seri(i,k)+qs_seri(i,k)))
32
        else
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))
38
        end if
39
11164608
          IF (iflag_ice_thermo .EQ. 0) THEN
40
             zlsdcp=zlvdcp
41
          ENDIF
42
          !>jyg
43
44
11175840
          IF (iflag_ice_thermo.eq.0) THEN
45
             !pas necessaire a priori
46
47
             zdelta = MAX(0.,SIGN(1.,RTT-t_seri(i,k)))
48
  zdelta = 0.
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
11164608
             zb = MAX(0.0,ql_seri(i,k)+qs_seri(i,k))
66
             za = - MAX(0.0,ql_seri(i,k))*zlvdcp &
67
11164608
                  - MAX(0.0,qs_seri(i,k))*zlsdcp
68
11164608
             d_t_eva(i,k) = za
69
11164608
             d_q_eva(i,k) = zb
70
11164608
             d_ql_eva(i,k) = -ql_seri(i,k)
71
11164608
             d_qs_eva(i,k) = -qs_seri(i,k)
72
          ENDIF
73
74
       ENDDO
75
    ENDDO
76
77
288
RETURN
78
79
END SUBROUTINE reevap