4 |
|
|
5 |
contains |
contains |
6 |
|
|
7 |
SUBROUTINE clqh(dtime, jour, debut, rlat, nisurf, knindex, tsoil, qsol, & |
SUBROUTINE clqh(dtime, julien, debut, nisurf, knindex, tsoil, qsol, rmu0, & |
8 |
rmu0, rugos, rugoro, u1lay, v1lay, coef, t, q, ts, paprs, pplay, delp, & |
rugos, rugoro, u1lay, v1lay, coef, tq_cdrag, t, q, ts, paprs, pplay, & |
9 |
radsol, albedo, snow, qsurf, precip_rain, precip_snow, fder, fluxlat, & |
delp, 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, & |
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) |
dflux_s, dflux_l, fqcalving, ffonte, run_off_lic_0) |
12 |
|
|
13 |
! Author: Z. X. Li (LMD/CNRS) |
! Author: Z. X. Li (LMD/CNRS) |
14 |
! Date: 1993/08/18 |
! Date: 1993 Aug. 18th |
15 |
! Objet : diffusion verticale de "q" et de "h" |
! Objet : diffusion verticale de "q" et de "h" |
16 |
|
|
17 |
USE conf_phys_m, ONLY: iflag_pbl |
USE conf_phys_m, ONLY: iflag_pbl |
18 |
USE dimphy, ONLY: klev, klon |
USE dimphy, ONLY: klev, klon |
|
USE dimsoil, ONLY: nsoilmx |
|
|
USE indicesol, ONLY: nbsrf |
|
19 |
USE interfsurf_hq_m, ONLY: interfsurf_hq |
USE interfsurf_hq_m, ONLY: interfsurf_hq |
20 |
USE suphec_m, ONLY: rcpd, rd, rg, rkappa |
USE suphec_m, ONLY: rcpd, rd, rg, rkappa |
21 |
|
|
22 |
REAL, intent(in):: dtime ! intervalle du temps (s) |
REAL, intent(in):: dtime ! intervalle du temps (s) |
23 |
integer, intent(in):: jour ! jour de l'annee en cours |
integer, intent(in):: julien ! jour de l'annee en cours |
24 |
logical, intent(in):: debut |
logical, intent(in):: debut |
|
real, intent(in):: rlat(klon) |
|
25 |
integer, intent(in):: nisurf |
integer, intent(in):: nisurf |
26 |
integer, intent(in):: knindex(:) ! (knon) |
integer, intent(in):: knindex(:) ! (knon) |
27 |
|
REAL, intent(inout):: tsoil(:, :) ! (knon, nsoilmx) |
28 |
|
|
29 |
REAL tsoil(klon, nsoilmx) |
REAL, intent(inout):: qsol(:) ! (knon) |
|
|
|
|
REAL, intent(inout):: qsol(klon) |
|
30 |
! column-density of water in soil, in kg m-2 |
! column-density of water in soil, in kg m-2 |
31 |
|
|
32 |
real, intent(in):: rmu0(klon) ! cosinus de l'angle solaire zenithal |
real, intent(in):: rmu0(klon) ! cosinus de l'angle solaire zenithal |
33 |
real rugos(klon) ! rugosite |
real, intent(in):: rugos(:) ! (knon) rugosite |
34 |
REAL rugoro(klon) |
REAL, intent(in):: rugoro(:) ! (knon) |
35 |
REAL u1lay(klon) ! vitesse u de la 1ere couche (m / s) |
|
36 |
REAL v1lay(klon) ! vitesse v de la 1ere couche (m / s) |
REAL, intent(in):: u1lay(:), v1lay(:) ! (knon) |
37 |
|
! vitesse de la 1ere couche (m / s) |
38 |
|
|
39 |
REAL, intent(in):: coef(:, :) ! (knon, klev) |
REAL, intent(in):: coef(:, 2:) ! (knon, 2:klev) |
40 |
! Le coefficient d'echange (m**2 / s) multiplie par le cisaillement |
! Le coefficient d'echange (m**2 / s) multiplie par le cisaillement |
41 |
! du vent (dV / dz). La premiere valeur indique la valeur de Cdrag |
! du vent (dV / dz) |
42 |
! (sans unite). |
|
43 |
|
REAL, intent(in):: tq_cdrag(:) ! (knon) sans unite |
44 |
|
|
45 |
|
REAL, intent(in):: t(:, :) ! (knon, klev) temperature (K) |
46 |
|
REAL, intent(in):: q(:, :) ! (knon, klev) humidite specifique (kg / kg) |
47 |
|
REAL, intent(in):: ts(:) ! (knon) temperature du sol (K) |
48 |
|
|
49 |
|
REAL, intent(in):: paprs(:, :) ! (knon, klev + 1) |
50 |
|
! pression a inter-couche (Pa) |
51 |
|
|
52 |
|
REAL, intent(in):: pplay(:, :) ! (knon, klev) |
53 |
|
! pression au milieu de couche (Pa) |
54 |
|
|
55 |
|
REAL, intent(in):: delp(:, :) ! (knon, klev) |
56 |
|
! epaisseur de couche en pression (Pa) |
57 |
|
|
58 |
|
REAL, intent(in):: radsol(:) ! (knon) |
59 |
|
! rayonnement net au sol (Solaire + IR) W / m2 |
60 |
|
|
|
REAL t(klon, klev) ! temperature (K) |
|
|
REAL q(klon, klev) ! humidite specifique (kg / kg) |
|
|
REAL, intent(in):: ts(klon) ! temperature du sol (K) |
|
|
REAL paprs(klon, klev+1) ! pression a inter-couche (Pa) |
|
|
REAL pplay(klon, klev) ! pression au milieu de couche (Pa) |
|
|
REAL delp(klon, klev) ! epaisseur de couche en pression (Pa) |
|
|
REAL radsol(klon) ! ray. net au sol (Solaire+IR) W / m2 |
|
61 |
REAL, intent(inout):: albedo(:) ! (knon) albedo de la surface |
REAL, intent(inout):: albedo(:) ! (knon) albedo de la surface |
62 |
REAL, intent(inout):: snow(klon) ! hauteur de neige |
REAL, intent(inout):: snow(:) ! (knon) ! hauteur de neige |
63 |
REAL qsurf(klon) ! humidite de l'air au dessus de la surface |
|
64 |
|
REAL, intent(out):: qsurf(:) ! (knon) |
65 |
|
! humidite de l'air au dessus de la surface |
66 |
|
|
67 |
real, intent(in):: precip_rain(klon) |
real, intent(in):: precip_rain(klon) |
68 |
! liquid water mass flux (kg / m2 / s), positive down |
! liquid water mass flux (kg / m2 / s), positive down |
70 |
real, intent(in):: precip_snow(klon) |
real, intent(in):: precip_snow(klon) |
71 |
! solid water mass flux (kg / m2 / s), positive down |
! solid water mass flux (kg / m2 / s), positive down |
72 |
|
|
73 |
real, intent(inout):: fder(klon) |
real, intent(out):: fluxlat(:) ! (knon) |
|
real fluxlat(klon) |
|
74 |
real, intent(in):: pctsrf_new_sic(:) ! (klon) |
real, intent(in):: pctsrf_new_sic(:) ! (klon) |
75 |
REAL, intent(inout):: agesno(:) ! (knon) |
REAL, intent(inout):: agesno(:) ! (knon) |
76 |
REAL d_t(klon, klev) ! incrementation de "t" |
REAL, intent(out):: d_t(:, :) ! (knon, klev) incrementation de "t" |
77 |
REAL d_q(klon, klev) ! incrementation de "q" |
REAL, intent(out):: d_q(:, :) ! (knon, klev) incrementation de "q" |
78 |
REAL, intent(out):: d_ts(:) ! (knon) incrementation de "ts" |
REAL, intent(out):: d_ts(:) ! (knon) variation of surface temperature |
79 |
real z0_new(klon) |
real, intent(out):: z0_new(:) ! (knon) |
80 |
|
|
81 |
REAL, intent(out):: flux_t(:) ! (knon) |
REAL, intent(out):: flux_t(:) ! (knon) |
82 |
! (diagnostic) flux de chaleur sensible (Cp T) à la surface, |
! (diagnostic) flux de chaleur sensible (Cp T) à la surface, |
85 |
REAL, intent(out):: flux_q(:) ! (knon) |
REAL, intent(out):: flux_q(:) ! (knon) |
86 |
! flux de la vapeur d'eau à la surface, en kg / (m**2 s) |
! flux de la vapeur d'eau à la surface, en kg / (m**2 s) |
87 |
|
|
88 |
REAL dflux_s(klon) ! derivee du flux sensible dF / dTs |
REAL, intent(out):: dflux_s(:) ! (knon) derivee du flux sensible dF / dTs |
89 |
REAL dflux_l(klon) ! derivee du flux latent dF / dTs |
REAL, intent(out):: dflux_l(:) ! (knon) derivee du flux latent dF / dTs |
90 |
|
|
91 |
|
REAL, intent(out):: fqcalving(:) ! (knon) |
92 |
! Flux d'eau "perdue" par la surface et n\'ecessaire pour que limiter la |
! Flux d'eau "perdue" par la surface et n\'ecessaire pour que limiter la |
93 |
! hauteur de neige, en kg / m2 / s |
! hauteur de neige, en kg / m2 / s |
|
REAL fqcalving(klon) |
|
94 |
|
|
|
! Flux thermique utiliser pour fondre la neige |
|
95 |
REAL ffonte(klon) |
REAL ffonte(klon) |
96 |
|
! Flux thermique utiliser pour fondre la neige |
97 |
|
|
98 |
REAL run_off_lic_0(klon)! runof glacier au pas de temps precedent |
REAL run_off_lic_0(klon)! runof glacier au pas de temps precedent |
99 |
|
|
100 |
! Local: |
! Local: |
101 |
|
|
102 |
INTEGER knon |
INTEGER k |
103 |
REAL evap(size(knindex)) ! (knon) evaporation au sol |
REAL evap(size(knindex)) ! (knon) evaporation au sol |
104 |
|
REAL, dimension(size(knindex), klev):: cq, dq, ch, dh ! (knon, klev) |
105 |
|
REAL buf1(size(knindex)), buf2(size(knindex)) |
106 |
|
REAL zx_coef(size(knindex), 2:klev) ! (knon, 2:klev) |
107 |
|
REAL h(size(knindex), klev) ! (knon, klev) enthalpie potentielle |
108 |
|
REAL local_q(size(knindex), klev) ! (knon, klev) |
109 |
|
|
110 |
|
REAL psref(size(knindex)) ! (knon) |
111 |
|
! pression de reference pour temperature potentielle |
112 |
|
|
113 |
|
REAL pkf(size(knindex), klev) ! (knon, klev) |
114 |
|
|
115 |
INTEGER i, k |
REAL gamt(size(knindex), 2:klev) ! (knon, 2:klev) |
116 |
REAL zx_cq(klon, klev) |
! contre-gradient pour la chaleur sensible, en K m-1 |
|
REAL zx_dq(klon, klev) |
|
|
REAL zx_ch(klon, klev) |
|
|
REAL zx_dh(klon, klev) |
|
|
REAL zx_buf1(klon) |
|
|
REAL zx_buf2(klon) |
|
|
REAL zx_coef(klon, klev) |
|
|
REAL local_h(klon, klev) ! enthalpie potentielle |
|
|
REAL local_q(klon, klev) |
|
|
REAL psref(klon) ! pression de reference pour temperature potent. |
|
|
REAL zx_pkh(klon, klev), zx_pkf(klon, klev) |
|
|
|
|
|
! contre-gradient pour la vapeur d'eau: (kg / kg) / metre |
|
|
REAL gamq(klon, 2:klev) |
|
|
! contre-gradient pour la chaleur sensible: Kelvin / metre |
|
|
REAL gamt(klon, 2:klev) |
|
|
REAL z_gamaq(klon, 2:klev), z_gamah(klon, 2:klev) |
|
|
REAL zdelz |
|
|
|
|
|
real temp_air(klon), spechum(klon) |
|
|
real tq_cdrag(klon), petAcoef(klon), peqAcoef(klon) |
|
|
real petBcoef(klon), peqBcoef(klon) |
|
|
real p1lay(klon) |
|
117 |
|
|
118 |
|
REAL gamah(size(knindex), 2:klev) ! (knon, 2:klev) |
119 |
real tsurf_new(size(knindex)) ! (knon) |
real tsurf_new(size(knindex)) ! (knon) |
|
real zzpk |
|
120 |
|
|
121 |
!---------------------------------------------------------------- |
!---------------------------------------------------------------- |
122 |
|
|
123 |
knon = size(knindex) |
psref = paprs(:, 1) ! pression de reference est celle au sol |
124 |
|
forall (k = 1:klev) pkf(:, k) = (psref / pplay(:, k))**RKAPPA |
125 |
if (iflag_pbl == 1) then |
h = RCPD * t * pkf |
|
do k = 3, klev |
|
|
do i = 1, knon |
|
|
gamq(i, k)= 0.0 |
|
|
gamt(i, k)= - 1.0e-03 |
|
|
enddo |
|
|
enddo |
|
|
do i = 1, knon |
|
|
gamq(i, 2) = 0.0 |
|
|
gamt(i, 2) = - 2.5e-03 |
|
|
enddo |
|
|
else |
|
|
do k = 2, klev |
|
|
do i = 1, knon |
|
|
gamq(i, k) = 0.0 |
|
|
gamt(i, k) = 0.0 |
|
|
enddo |
|
|
enddo |
|
|
endif |
|
|
|
|
|
DO i = 1, knon |
|
|
psref(i) = paprs(i, 1) !pression de reference est celle au sol |
|
|
ENDDO |
|
|
DO k = 1, klev |
|
|
DO i = 1, knon |
|
|
zx_pkh(i, k) = (psref(i) / paprs(i, k))**RKAPPA |
|
|
zx_pkf(i, k) = (psref(i) / pplay(i, k))**RKAPPA |
|
|
local_h(i, k) = RCPD * t(i, k) * zx_pkf(i, k) |
|
|
local_q(i, k) = q(i, k) |
|
|
ENDDO |
|
|
ENDDO |
|
126 |
|
|
127 |
! Convertir les coefficients en variables convenables au calcul: |
! Convertir les coefficients en variables convenables au calcul: |
128 |
|
forall (k = 2:klev) zx_coef(:, k) = coef(:, k) & |
129 |
DO k = 2, klev |
/ (pplay(:, k - 1) - pplay(:, k)) & |
130 |
DO i = 1, knon |
* (paprs(:, k) * 2 / (t(:, k) + t(:, k - 1)) / RD)**2 * dtime * RG**2 |
|
zx_coef(i, k) = coef(i, k) * RG / (pplay(i, k - 1) - pplay(i, k)) & |
|
|
* (paprs(i, k) * 2 / (t(i, k)+t(i, k - 1)) / RD)**2 |
|
|
zx_coef(i, k) = zx_coef(i, k) * dtime * RG |
|
|
ENDDO |
|
|
ENDDO |
|
131 |
|
|
132 |
! Preparer les flux lies aux contre-gardients |
! Preparer les flux lies aux contre-gardients |
133 |
|
|
134 |
DO k = 2, klev |
if (iflag_pbl == 1) then |
135 |
DO i = 1, knon |
gamt(:, 2) = - 2.5e-3 |
136 |
zdelz = RD * (t(i, k - 1)+t(i, k)) / 2.0 / RG / paprs(i, k) & |
gamt(:, 3:)= - 1e-3 |
137 |
* (pplay(i, k - 1) - pplay(i, k)) |
forall (k = 2:klev) gamah(:, k) = gamt(:, k) * (RD * (t(:, k - 1) & |
138 |
z_gamaq(i, k) = gamq(i, k) * zdelz |
+ t(:, k)) / 2. / RG / paprs(:, k) * (pplay(:, k - 1) & |
139 |
z_gamah(i, k) = gamt(i, k) * zdelz * RCPD * zx_pkh(i, k) |
- pplay(:, k))) * RCPD * (psref / paprs(:, k))**RKAPPA |
140 |
ENDDO |
else |
141 |
ENDDO |
gamah = 0. |
142 |
DO i = 1, knon |
endif |
|
zx_buf1(i) = zx_coef(i, klev) + delp(i, klev) |
|
|
zx_cq(i, klev) = (local_q(i, klev) * delp(i, klev) & |
|
|
- zx_coef(i, klev) * z_gamaq(i, klev)) / zx_buf1(i) |
|
|
zx_dq(i, klev) = zx_coef(i, klev) / zx_buf1(i) |
|
|
|
|
|
zzpk=(pplay(i, klev) / psref(i))**RKAPPA |
|
|
zx_buf2(i) = zzpk * delp(i, klev) + zx_coef(i, klev) |
|
|
zx_ch(i, klev) = (local_h(i, klev) * zzpk * delp(i, klev) & |
|
|
- zx_coef(i, klev) * z_gamah(i, klev)) / zx_buf2(i) |
|
|
zx_dh(i, klev) = zx_coef(i, klev) / zx_buf2(i) |
|
|
ENDDO |
|
|
DO k = klev - 1, 2, - 1 |
|
|
DO i = 1, knon |
|
|
zx_buf1(i) = delp(i, k)+zx_coef(i, k) & |
|
|
+zx_coef(i, k+1) * (1. - zx_dq(i, k+1)) |
|
|
zx_cq(i, k) = (local_q(i, k) * delp(i, k) & |
|
|
+zx_coef(i, k+1) * zx_cq(i, k+1) & |
|
|
+zx_coef(i, k+1) * z_gamaq(i, k+1) & |
|
|
- zx_coef(i, k) * z_gamaq(i, k)) / zx_buf1(i) |
|
|
zx_dq(i, k) = zx_coef(i, k) / zx_buf1(i) |
|
|
|
|
|
zzpk=(pplay(i, k) / psref(i))**RKAPPA |
|
|
zx_buf2(i) = zzpk * delp(i, k)+zx_coef(i, k) & |
|
|
+zx_coef(i, k+1) * (1. - zx_dh(i, k+1)) |
|
|
zx_ch(i, k) = (local_h(i, k) * zzpk * delp(i, k) & |
|
|
+zx_coef(i, k+1) * zx_ch(i, k+1) & |
|
|
+zx_coef(i, k+1) * z_gamah(i, k+1) & |
|
|
- zx_coef(i, k) * z_gamah(i, k)) / zx_buf2(i) |
|
|
zx_dh(i, k) = zx_coef(i, k) / zx_buf2(i) |
|
|
ENDDO |
|
|
ENDDO |
|
|
|
|
|
DO i = 1, knon |
|
|
zx_buf1(i) = delp(i, 1) + zx_coef(i, 2) * (1. - zx_dq(i, 2)) |
|
|
zx_cq(i, 1) = (local_q(i, 1) * delp(i, 1) & |
|
|
+zx_coef(i, 2) * (z_gamaq(i, 2)+zx_cq(i, 2))) & |
|
|
/ zx_buf1(i) |
|
|
zx_dq(i, 1) = - 1. * RG / zx_buf1(i) |
|
|
|
|
|
zzpk=(pplay(i, 1) / psref(i))**RKAPPA |
|
|
zx_buf2(i) = zzpk * delp(i, 1) + zx_coef(i, 2) * (1. - zx_dh(i, 2)) |
|
|
zx_ch(i, 1) = (local_h(i, 1) * zzpk * delp(i, 1) & |
|
|
+zx_coef(i, 2) * (z_gamah(i, 2)+zx_ch(i, 2))) & |
|
|
/ zx_buf2(i) |
|
|
zx_dh(i, 1) = - 1. * RG / zx_buf2(i) |
|
|
ENDDO |
|
143 |
|
|
144 |
! Appel a interfsurf (appel generique) routine d'interface avec la surface |
buf1 = zx_coef(:, klev) + delp(:, klev) |
145 |
|
cq(:, klev) = q(:, klev) * delp(:, klev) / buf1 |
146 |
|
dq(:, klev) = zx_coef(:, klev) / buf1 |
147 |
|
|
148 |
|
buf2 = delp(:, klev) / pkf(:, klev) + zx_coef(:, klev) |
149 |
|
ch(:, klev) = (h(:, klev) / pkf(:, klev) * delp(:, klev) & |
150 |
|
- zx_coef(:, klev) * gamah(:, klev)) / buf2 |
151 |
|
dh(:, klev) = zx_coef(:, klev) / buf2 |
152 |
|
|
153 |
! initialisation |
DO k = klev - 1, 2, - 1 |
154 |
petAcoef =0. |
buf1 = delp(:, k) + zx_coef(:, k) & |
155 |
peqAcoef = 0. |
+ zx_coef(:, k + 1) * (1. - dq(:, k + 1)) |
156 |
petBcoef =0. |
cq(:, k) = (q(:, k) * delp(:, k) & |
157 |
peqBcoef = 0. |
+ zx_coef(:, k + 1) * cq(:, k + 1)) / buf1 |
158 |
p1lay =0. |
dq(:, k) = zx_coef(:, k) / buf1 |
159 |
|
|
160 |
petAcoef(1:knon) = zx_ch(1:knon, 1) |
buf2 = delp(:, k) / pkf(:, k) + zx_coef(:, k) & |
161 |
peqAcoef(1:knon) = zx_cq(1:knon, 1) |
+ zx_coef(:, k + 1) * (1. - dh(:, k + 1)) |
162 |
petBcoef(1:knon) = zx_dh(1:knon, 1) |
ch(:, k) = (h(:, k) / pkf(:, k) * delp(:, k) & |
163 |
peqBcoef(1:knon) = zx_dq(1:knon, 1) |
+ zx_coef(:, k + 1) * ch(:, k + 1) & |
164 |
tq_cdrag(1:knon) =coef(:knon, 1) |
+ zx_coef(:, k + 1) * gamah(:, k + 1) & |
165 |
temp_air(1:knon) =t(1:knon, 1) |
- zx_coef(:, k) * gamah(:, k)) / buf2 |
166 |
spechum(1:knon)=q(1:knon, 1) |
dh(:, k) = zx_coef(:, k) / buf2 |
167 |
p1lay(1:knon) = pplay(1:knon, 1) |
ENDDO |
168 |
|
|
169 |
CALL interfsurf_hq(dtime, jour, rmu0, nisurf, knon, knindex, rlat, debut, & |
buf1 = delp(:, 1) + zx_coef(:, 2) * (1. - dq(:, 2)) |
170 |
nsoilmx, tsoil, qsol, u1lay, v1lay, temp_air, spechum, tq_cdrag, & |
cq(:, 1) = (q(:, 1) * delp(:, 1) + zx_coef(:, 2) * cq(:, 2)) / buf1 |
171 |
petAcoef, peqAcoef, petBcoef, peqBcoef, precip_rain, precip_snow, & |
dq(:, 1) = - 1. * RG / buf1 |
172 |
fder, rugos, rugoro, snow, qsurf, ts(:knon), p1lay, psref, radsol, & |
|
173 |
evap, flux_t, fluxlat, dflux_l, dflux_s, tsurf_new, albedo, & |
buf2 = delp(:, 1) / pkf(:, 1) + zx_coef(:, 2) * (1. - dh(:, 2)) |
174 |
z0_new, pctsrf_new_sic, agesno, fqcalving, ffonte, run_off_lic_0) |
ch(:, 1) = (h(:, 1) / pkf(:, 1) * delp(:, 1) & |
175 |
|
+ zx_coef(:, 2) * (gamah(:, 2) + ch(:, 2))) / buf2 |
176 |
|
dh(:, 1) = - 1. * RG / buf2 |
177 |
|
|
178 |
|
CALL interfsurf_hq(dtime, julien, rmu0, nisurf, knindex, debut, tsoil, & |
179 |
|
qsol, u1lay, v1lay, t(:, 1), q(:, 1), tq_cdrag, ch(:, 1), cq(:, 1), & |
180 |
|
dh(:, 1), dq(:, 1), precip_rain, precip_snow, rugos, rugoro, snow, & |
181 |
|
qsurf, ts, pplay(:, 1), psref, radsol, evap, flux_t, fluxlat, & |
182 |
|
dflux_l, dflux_s, tsurf_new, albedo, z0_new, pctsrf_new_sic, agesno, & |
183 |
|
fqcalving, ffonte, run_off_lic_0) |
184 |
|
|
185 |
flux_q = - evap |
flux_q = - evap |
186 |
d_ts = tsurf_new - ts(:knon) |
d_ts = tsurf_new - ts |
187 |
|
|
188 |
|
h(:, 1) = ch(:, 1) + dh(:, 1) * flux_t * dtime |
189 |
|
local_q(:, 1) = cq(:, 1) + dq(:, 1) * flux_q * dtime |
190 |
|
|
|
!==== une fois on a zx_h_ts, on peut faire l'iteration ======== |
|
|
DO i = 1, knon |
|
|
local_h(i, 1) = zx_ch(i, 1) + zx_dh(i, 1) * flux_t(i) * dtime |
|
|
local_q(i, 1) = zx_cq(i, 1) + zx_dq(i, 1) * flux_q(i) * dtime |
|
|
ENDDO |
|
191 |
DO k = 2, klev |
DO k = 2, klev |
192 |
DO i = 1, knon |
h(:, k) = ch(:, k) + dh(:, k) * h(:, k - 1) |
193 |
local_q(i, k) = zx_cq(i, k) + zx_dq(i, k) * local_q(i, k - 1) |
local_q(:, k) = cq(:, k) + dq(:, k) * local_q(:, k - 1) |
|
local_h(i, k) = zx_ch(i, k) + zx_dh(i, k) * local_h(i, k - 1) |
|
|
ENDDO |
|
194 |
ENDDO |
ENDDO |
195 |
|
|
196 |
! Calcul tendances |
d_t = h / pkf / RCPD - t |
197 |
DO k = 1, klev |
d_q = local_q - q |
|
DO i = 1, knon |
|
|
d_t(i, k) = local_h(i, k) / zx_pkf(i, k) / RCPD - t(i, k) |
|
|
d_q(i, k) = local_q(i, k) - q(i, k) |
|
|
ENDDO |
|
|
ENDDO |
|
198 |
|
|
199 |
END SUBROUTINE clqh |
END SUBROUTINE clqh |
200 |
|
|