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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 298 - (show annotations)
Thu Jul 26 16:45:51 2018 UTC (5 years, 9 months ago) by guez
File size: 4788 byte(s)
Use directly dtphys from module comconst when possible instead of
having it trickle down through procedure arguments.

1 module clqh_m
2
3 IMPLICIT none
4
5 contains
6
7 SUBROUTINE clqh(julien, debut, nisurf, knindex, tsoil, qsol, rmu0, rugos, &
8 rugoro, u1lay, v1lay, coef, tq_cdrag, t, q, ts, paprs, pplay, delp, &
9 radsol, albedo, snow, qsurf, precip_rain, precip_snow, fluxlat, &
10 pctsrf_new_sic, agesno, d_t, d_q, d_ts, z0_new, flux_t, flux_q, &
11 dflux_s, dflux_l, fqcalving, ffonte, run_off_lic_0)
12
13 ! Author: Z. X. Li (LMD/CNRS)
14 ! Date: 1993 Aug. 18th
15 ! Objet : diffusion verticale de "q" et de "h"
16
17 use climb_hq_down_m, only: climb_hq_down
18 use climb_hq_up_m, only: climb_hq_up
19 use comconst, only: dtphys
20 USE dimphy, ONLY: klev, klon
21 USE interfsurf_hq_m, ONLY: interfsurf_hq
22 USE suphec_m, ONLY: rkappa
23
24 integer, intent(in):: julien ! jour de l'annee en cours
25 logical, intent(in):: debut
26 integer, intent(in):: nisurf
27 integer, intent(in):: knindex(:) ! (knon)
28 REAL, intent(inout):: tsoil(:, :) ! (knon, nsoilmx)
29
30 REAL, intent(inout):: qsol(:) ! (knon)
31 ! column-density of water in soil, in kg m-2
32
33 real, intent(in):: rmu0(klon) ! cosinus de l'angle solaire zenithal
34 real, intent(in):: rugos(:) ! (knon) rugosite
35 REAL, intent(in):: rugoro(:) ! (knon)
36
37 REAL, intent(in):: u1lay(:), v1lay(:) ! (knon)
38 ! vitesse de la 1ere couche (m / s)
39
40 REAL, intent(in):: coef(:, 2:) ! (knon, 2:klev)
41 ! Le coefficient d'echange (m**2 / s) multiplie par le cisaillement
42 ! du vent (dV / dz)
43
44 REAL, intent(in):: tq_cdrag(:) ! (knon) sans unite
45
46 REAL, intent(in):: t(:, :) ! (knon, klev) temperature (K)
47 REAL, intent(in):: q(:, :) ! (knon, klev) humidite specifique (kg / kg)
48 REAL, intent(in):: ts(:) ! (knon) temperature du sol (K)
49
50 REAL, intent(in):: paprs(:, :) ! (knon, klev + 1)
51 ! pression a inter-couche (Pa)
52
53 REAL, intent(in):: pplay(:, :) ! (knon, klev)
54 ! pression au milieu de couche (Pa)
55
56 REAL, intent(in):: delp(:, :) ! (knon, klev)
57 ! epaisseur de couche en pression (Pa)
58
59 REAL, intent(in):: radsol(:) ! (knon)
60 ! rayonnement net au sol (Solaire + IR) W / m2
61
62 REAL, intent(inout):: albedo(:) ! (knon) albedo de la surface
63 REAL, intent(inout):: snow(:) ! (knon) ! hauteur de neige
64
65 REAL, intent(out):: qsurf(:) ! (knon)
66 ! humidite de l'air au dessus de la surface
67
68 real, intent(in):: precip_rain(klon)
69 ! liquid water mass flux (kg / m2 / s), positive down
70
71 real, intent(in):: precip_snow(klon)
72 ! solid water mass flux (kg / m2 / s), positive down
73
74 real, intent(out):: fluxlat(:) ! (knon)
75 real, intent(in):: pctsrf_new_sic(:) ! (klon)
76 REAL, intent(inout):: agesno(:) ! (knon)
77 REAL, intent(out):: d_t(:, :) ! (knon, klev) incrementation de "t"
78 REAL, intent(out):: d_q(:, :) ! (knon, klev) incrementation de "q"
79 REAL, intent(out):: d_ts(:) ! (knon) variation of surface temperature
80 real, intent(out):: z0_new(:) ! (knon)
81
82 REAL, intent(out):: flux_t(:) ! (knon)
83 ! (diagnostic) flux de chaleur sensible (Cp T) à la surface,
84 ! positif vers le bas, W / m2
85
86 REAL, intent(out):: flux_q(:) ! (knon)
87 ! flux de la vapeur d'eau à la surface, en kg / (m**2 s)
88
89 REAL, intent(out):: dflux_s(:) ! (knon) derivee du flux sensible dF / dTs
90 REAL, intent(out):: dflux_l(:) ! (knon) derivee du flux latent dF / dTs
91
92 REAL, intent(out):: fqcalving(:) ! (knon)
93 ! Flux d'eau "perdue" par la surface et n\'ecessaire pour que limiter la
94 ! hauteur de neige, en kg / m2 / s
95
96 REAL ffonte(klon)
97 ! Flux thermique utiliser pour fondre la neige
98
99 REAL run_off_lic_0(klon)! runof glacier au pas de temps precedent
100
101 ! Local:
102
103 INTEGER k
104 REAL evap(size(knindex)) ! (knon) evaporation au sol
105 REAL, dimension(size(knindex), klev):: cq, dq, ch, dh ! (knon, klev)
106 REAL pkf(size(knindex), klev) ! (knon, klev)
107 real tsurf_new(size(knindex)) ! (knon)
108
109 !----------------------------------------------------------------
110
111 forall (k = 1:klev) pkf(:, k) = (paprs(:, 1) / pplay(:, k))**RKAPPA
112 ! (La pression de r\'ef\'erence est celle au sol.)
113
114 call climb_hq_down(pkf, cq, dq, ch, dh, paprs, pplay, t, coef, dtphys, &
115 delp, q)
116 CALL interfsurf_hq(dtphys, julien, rmu0, nisurf, knindex, debut, tsoil, &
117 qsol, u1lay, v1lay, t(:, 1), q(:, 1), tq_cdrag, ch(:, 1), cq(:, 1), &
118 dh(:, 1), dq(:, 1), precip_rain, precip_snow, rugos, rugoro, snow, &
119 qsurf, ts, pplay(:, 1), paprs(:, 1), radsol, evap, flux_t, fluxlat, &
120 dflux_l, dflux_s, tsurf_new, albedo, z0_new, pctsrf_new_sic, agesno, &
121 fqcalving, ffonte, run_off_lic_0)
122 flux_q = - evap
123 d_ts = tsurf_new - ts
124 call climb_hq_up(d_t, d_q, cq, dq, ch, dh, flux_t, flux_q, dtphys, pkf, t, &
125 q)
126
127 END SUBROUTINE clqh
128
129 end module clqh_m

  ViewVC Help
Powered by ViewVC 1.1.21