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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 328 - (show annotations)
Thu Jun 13 14:40:06 2019 UTC (4 years, 11 months ago) by guez
File size: 1454 byte(s)
Change all `.f` suffixes to `.f90`. (The opposite was done in revision
82.)  Because of change of philosopy in GNUmakefile: we already had a
rewritten rule for `.f`, so it does not make the makefile longer to
replace it by a rule for `.f90`. And it spares us options of
makedepf90 and of the compiler. Also we prepare the way for a simpler
`CMakeLists.txt`.

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