/[lmdze]/trunk/phylmd/Interface_surf/climb_hq_up.f
ViewVC logotype

Contents of /trunk/phylmd/Interface_surf/climb_hq_up.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 299 - (show annotations)
Thu Aug 2 14:27:11 2018 UTC (5 years, 10 months ago) by guez
File size: 1454 byte(s)
Use directly dtphys from module comconst when possible instead of
having it trickle down through procedure arguments.

1 module climb_hq_up_m
2
3 IMPLICIT none
4
5 contains
6
7 subroutine climb_hq_up(d_t, d_q, cq, dq, ch, dh, flux_t, flux_q, pkf, t, q)
8
9 use comconst, only: dtphys
10 USE dimphy, ONLY: klev
11 USE suphec_m, ONLY: rcpd
12
13 REAL, intent(out):: d_t(:, :) ! (knon, klev) incrementation de "t"
14 REAL, intent(out):: d_q(:, :) ! (knon, klev) incrementation de "q"
15 REAL, intent(in), dimension(:, :):: cq, dq, ch, dh ! (knon, klev)
16
17 REAL, intent(in):: flux_t(:) ! (knon)
18 ! (diagnostic) flux de chaleur sensible (Cp T) à la surface,
19 ! positif vers le bas, W / m2
20
21 REAL, intent(out):: flux_q(:) ! (knon)
22 ! flux de la vapeur d'eau à la surface, en kg / (m**2 s)
23
24 REAL, intent(in):: pkf(:, :) ! (knon, klev)
25 REAL, intent(in):: t(:, :) ! (knon, klev) temperature (K)
26 REAL, intent(in):: q(:, :) ! (knon, klev) humidite specifique (kg / kg)
27
28 ! Local:
29 REAL h(size(flux_t), klev) ! (knon, klev) enthalpie potentielle
30 INTEGER k
31 REAL local_q(size(flux_t), klev) ! (knon, klev)
32
33 !----------------------------------------------------------------------
34
35 h(:, 1) = ch(:, 1) + dh(:, 1) * flux_t * dtphys
36 local_q(:, 1) = cq(:, 1) + dq(:, 1) * flux_q * dtphys
37
38 DO k = 2, klev
39 h(:, k) = ch(:, k) + dh(:, k) * h(:, k - 1)
40 local_q(:, k) = cq(:, k) + dq(:, k) * local_q(:, k - 1)
41 ENDDO
42
43 d_t = h / pkf / RCPD - t
44 d_q = local_q - q
45
46 end subroutine climb_hq_up
47
48 end module climb_hq_up_m

  ViewVC Help
Powered by ViewVC 1.1.21