1 |
module interfsurf_hq_m |
2 |
|
3 |
implicit none |
4 |
|
5 |
contains |
6 |
|
7 |
SUBROUTINE interfsurf_hq(julien, mu0, nisurf, knindex, tsoil, qsol, u1lay, & |
8 |
v1lay, temp_air, q1lay, cdragh, tAcoef, qAcoef, tBcoef, qBcoef, & |
9 |
rain_fall, snow_fall, rugos, rugoro, snow, qsurf, ts, p1lay, ps, & |
10 |
radsol, evap, flux_t, fluxlat, dflux_l, dflux_s, tsurf_new, albedo, & |
11 |
z0_new, pctsrf_new_sic, agesno, fqcalving, ffonte, run_off_lic_0, & |
12 |
run_off_lic) |
13 |
|
14 |
! Cette routine sert d'aiguillage entre l'atmosph\`ere et la surface |
15 |
! en g\'en\'eral (sols continentaux, oc\'eans, glaces) pour les flux de |
16 |
! chaleur et d'humidit\'e. |
17 |
|
18 |
! Laurent Fairhead, February 2000 |
19 |
|
20 |
USE abort_gcm_m, ONLY: abort_gcm |
21 |
use alboc_cd_m, only: alboc_cd |
22 |
USE albsno_m, ONLY: albsno |
23 |
USE calcul_fluxs_m, ONLY: calcul_fluxs |
24 |
USE fonte_neige_m, ONLY: fonte_neige |
25 |
USE indicesol, ONLY: epsfra, is_lic, is_oce, is_sic, is_ter |
26 |
USE interfsur_lim_m, ONLY: interfsur_lim |
27 |
use limit_read_sst_m, only: limit_read_sst |
28 |
use soil_m, only: soil |
29 |
USE suphec_m, ONLY: rcpd, rtt |
30 |
|
31 |
integer, intent(IN):: julien ! jour dans l'annee en cours |
32 |
real, intent(IN):: mu0(:) ! (knon) cosinus de l'angle solaire zenithal |
33 |
integer, intent(IN):: nisurf ! index de la surface a traiter |
34 |
|
35 |
integer, intent(in):: knindex(:) ! (knon) |
36 |
! index des points de la surface a traiter |
37 |
|
38 |
REAL, intent(inout):: tsoil(:, :) ! (knon, nsoilmx) |
39 |
|
40 |
REAL, intent(INOUT):: qsol(:) ! (knon) |
41 |
! column-density of water in soil, in kg m-2 |
42 |
|
43 |
real, intent(IN):: u1lay(:), v1lay(:) ! (knon) vitesse 1ere couche |
44 |
|
45 |
real, intent(IN):: temp_air(:) ! (knon) temperature de l'air 1ere couche |
46 |
|
47 |
real, intent(IN):: q1lay(:) ! (knon) |
48 |
! humidit\'e sp\'ecifique de la premi\`ere couche |
49 |
|
50 |
real, intent(IN):: cdragh(:) ! (knon) coefficient d'echange |
51 |
|
52 |
real, intent(IN):: tAcoef(:), qAcoef(:) ! (knon) |
53 |
! coefficients A de la r\'esolution de la couche limite pour t et q |
54 |
|
55 |
real, intent(IN):: tBcoef(:), qBcoef(:) ! (knon) |
56 |
! coefficients B de la r\'esolution de la couche limite pour t et q |
57 |
|
58 |
real, intent(IN):: rain_fall(:) ! (knon) |
59 |
! precipitation, liquid water mass flux (kg / m2 / s), positive down |
60 |
|
61 |
real, intent(IN):: snow_fall(:) ! (knon) |
62 |
! precipitation, solid water mass flux (kg / m2 / s), positive down |
63 |
|
64 |
real, intent(IN):: rugos(:) ! (knon) rugosite |
65 |
real, intent(IN):: rugoro(:) ! (knon) rugosite orographique |
66 |
|
67 |
real, intent(INOUT):: snow(:) ! (knon) |
68 |
! column-density of mass of snow, in kg m-2 |
69 |
|
70 |
real, intent(OUT):: qsurf(:) ! (knon) |
71 |
real, intent(IN):: ts(:) ! (knon) temp\'erature de surface |
72 |
real, intent(IN):: p1lay(:) ! (knon) pression 1er niveau (milieu de couche) |
73 |
real, intent(IN):: ps(:) ! (knon) pression au sol, en Pa |
74 |
|
75 |
REAL, INTENT(IN):: radsol(:) ! (knon) |
76 |
! surface net downward radiative flux, in W / m2 |
77 |
|
78 |
real, intent(OUT):: evap(:) ! (knon) evaporation totale |
79 |
|
80 |
real, intent(OUT):: flux_t(:) ! (knon) flux de chaleur sensible |
81 |
! (Cp T) à la surface, positif vers le bas, W / m2 |
82 |
|
83 |
real, intent(OUT):: fluxlat(:) ! (knon) flux de chaleur latente, en W m-2 |
84 |
real, intent(OUT):: dflux_l(:), dflux_s(:) ! (knon) |
85 |
real, intent(OUT):: tsurf_new(:) ! (knon) temp\'erature au sol |
86 |
real, intent(OUT):: albedo(:) ! (knon) albedo |
87 |
real, intent(OUT):: z0_new(:) ! (knon) surface roughness |
88 |
|
89 |
real, intent(in):: pctsrf_new_sic(:) ! (knon) |
90 |
! nouvelle repartition des surfaces |
91 |
|
92 |
real, intent(INOUT):: agesno(:) ! (knon) |
93 |
|
94 |
real, intent(OUT):: fqcalving(:) ! (knon) |
95 |
! Flux d'eau "perdue" par la surface et n\'ecessaire pour limiter la |
96 |
! hauteur de neige, en kg / m2 / s |
97 |
|
98 |
real, intent(OUT):: ffonte(:) ! (knon) |
99 |
! flux thermique utilis\'e pour fondre la neige |
100 |
|
101 |
real, intent(INOUT):: run_off_lic_0(:) ! (knon) |
102 |
! run_off_lic_0 runoff glacier du pas de temps precedent |
103 |
|
104 |
REAL, intent(OUT):: run_off_lic(:) ! (knon) ruissellement total |
105 |
|
106 |
! Local: |
107 |
REAL soilcap(size(knindex)) ! (knon) |
108 |
REAL soilflux(size(knindex)) ! (knon) |
109 |
integer ii |
110 |
real cal(size(knindex)) ! (knon) |
111 |
real beta(size(knindex)) ! (knon) evap reelle |
112 |
real tsurf(size(knindex)) ! (knon) |
113 |
real alb_neig(size(knindex)) ! (knon) |
114 |
real zfra(size(knindex)) ! (knon) fraction of surface covered by snow |
115 |
REAL, PARAMETER:: fmagic = 1. ! facteur magique pour r\'egler l'alb\'edo |
116 |
REAL, PARAMETER:: max_eau_sol = 150. ! in kg m-2 |
117 |
REAL, PARAMETER:: tau_gl = 86400. * 5. |
118 |
|
119 |
!------------------------------------------------------------- |
120 |
|
121 |
select case (nisurf) |
122 |
case (is_ter) |
123 |
! Surface "terre", appel \`a l'interface avec les sols continentaux |
124 |
|
125 |
! Calcul age de la neige |
126 |
|
127 |
! Read albedo from the file containing boundary conditions then |
128 |
! add the albedo of snow: |
129 |
|
130 |
call interfsur_lim(julien, knindex, albedo, z0_new) |
131 |
|
132 |
beta = min(2. * qsol / max_eau_sol, 1.) |
133 |
CALL soil(is_ter, snow, ts, tsoil, soilcap, soilflux) |
134 |
cal = RCPD / soilcap |
135 |
|
136 |
CALL calcul_fluxs(ts, p1lay, cal, beta, cdragh, ps, qsurf, & |
137 |
radsol + soilflux, temp_air, q1lay, u1lay, v1lay, tAcoef, qAcoef, & |
138 |
tBcoef, qBcoef, tsurf_new, evap, fluxlat, flux_t, dflux_s, & |
139 |
dflux_l, dif_grnd = 0.) |
140 |
CALL fonte_neige(is_ter, rain_fall, snow_fall, snow, qsol, & |
141 |
tsurf_new, evap, fqcalving, ffonte, run_off_lic_0, run_off_lic) |
142 |
|
143 |
call albsno(agesno, alb_neig, snow_fall) |
144 |
where (snow < 1e-4) agesno = 0. |
145 |
zfra = snow / (snow + 10.) |
146 |
albedo = alb_neig * zfra + albedo * (1. - zfra) |
147 |
z0_new = sqrt(z0_new**2 + rugoro**2) |
148 |
case (is_oce) |
149 |
! Surface "oc\'ean", appel \`a l'interface avec l'oc\'ean |
150 |
|
151 |
ffonte = 0. |
152 |
call limit_read_sst(julien, knindex, tsurf) |
153 |
cal = 0. |
154 |
beta = 1. |
155 |
call calcul_fluxs(tsurf, p1lay, cal, beta, cdragh, ps, qsurf, radsol, & |
156 |
temp_air, q1lay, u1lay, v1lay, tAcoef, qAcoef, tBcoef, qBcoef, & |
157 |
tsurf_new, evap, fluxlat, flux_t, dflux_s, dflux_l, dif_grnd = 0.) |
158 |
agesno = 0. |
159 |
albedo = alboc_cd(mu0) * fmagic |
160 |
z0_new = sqrt(rugos**2 + rugoro**2) |
161 |
fqcalving = 0. |
162 |
case (is_sic) |
163 |
! Surface "glace de mer" appel a l'interface avec l'ocean |
164 |
|
165 |
DO ii = 1, size(knindex) |
166 |
IF (pctsrf_new_sic(ii) < EPSFRA) then |
167 |
snow(ii) = 0. |
168 |
tsurf(ii) = RTT - 1.8 |
169 |
tsoil(ii, :) = RTT - 1.8 |
170 |
else |
171 |
tsurf(ii) = ts(ii) |
172 |
endif |
173 |
enddo |
174 |
|
175 |
CALL soil(is_sic, snow, tsurf, tsoil, soilcap, soilflux) |
176 |
cal = RCPD / soilcap |
177 |
beta = 1. |
178 |
CALL calcul_fluxs(tsurf, p1lay, cal, beta, cdragh, ps, qsurf, & |
179 |
radsol + soilflux, temp_air, q1lay, u1lay, v1lay, tAcoef, qAcoef, & |
180 |
tBcoef, qBcoef, tsurf_new, evap, fluxlat, flux_t, dflux_s, & |
181 |
dflux_l, dif_grnd = 1. / tau_gl) |
182 |
CALL fonte_neige(is_sic, rain_fall, snow_fall, snow, qsol, & |
183 |
tsurf_new, evap, fqcalving, ffonte, run_off_lic_0, run_off_lic) |
184 |
|
185 |
! Compute the albedo: |
186 |
|
187 |
CALL albsno(agesno, alb_neig, snow_fall) |
188 |
WHERE (snow < 1e-4) agesno = 0. |
189 |
zfra = snow / (snow + 10.) |
190 |
albedo = alb_neig * zfra + 0.6 * (1. - zfra) |
191 |
|
192 |
z0_new = SQRT(0.002**2 + rugoro**2) |
193 |
case (is_lic) |
194 |
! Surface "glacier continentaux" appel \`a l'interface avec le sol |
195 |
|
196 |
CALL soil(is_lic, snow, ts, tsoil, soilcap, soilflux) |
197 |
cal = RCPD / soilcap |
198 |
beta = 1. |
199 |
call calcul_fluxs(ts, p1lay, cal, beta, cdragh, ps, qsurf, & |
200 |
radsol + soilflux, temp_air, q1lay, u1lay, v1lay, tAcoef, qAcoef, & |
201 |
tBcoef, qBcoef, tsurf_new, evap, fluxlat, flux_t, dflux_s, & |
202 |
dflux_l, dif_grnd = 0.) |
203 |
call fonte_neige(is_lic, rain_fall, snow_fall, snow, qsol, & |
204 |
tsurf_new, evap, fqcalving, ffonte, run_off_lic_0, run_off_lic) |
205 |
|
206 |
! calcul albedo |
207 |
CALL albsno(agesno, alb_neig, snow_fall) |
208 |
WHERE (snow < 1e-4) agesno = 0. |
209 |
albedo = 0.77 |
210 |
|
211 |
! Rugosite |
212 |
z0_new = rugoro |
213 |
case default |
214 |
print *, 'Index surface = ', nisurf |
215 |
call abort_gcm("interfsurf_hq", 'Index surface non valable') |
216 |
end select |
217 |
|
218 |
END SUBROUTINE interfsurf_hq |
219 |
|
220 |
end module interfsurf_hq_m |