4 |
|
|
5 |
contains |
contains |
6 |
|
|
7 |
SUBROUTINE interfsurf_hq(itime, dtime, jour, rmu0, nisurf, knon, & |
SUBROUTINE interfsurf_hq(itime, dtime, jour, rmu0, nisurf, knon, knindex, & |
8 |
knindex, pctsrf, rlat, debut, nsoilmx, tsoil, qsol, & |
pctsrf, rlat, debut, nsoilmx, tsoil, qsol, u1_lay, v1_lay, temp_air, & |
9 |
u1_lay, v1_lay, temp_air, spechum, tq_cdrag, petAcoef, peqAcoef, & |
spechum, tq_cdrag, petAcoef, peqAcoef, petBcoef, peqBcoef, & |
10 |
petBcoef, peqBcoef, precip_rain, precip_snow, fder, rugos, rugoro, & |
precip_rain, precip_snow, fder, rugos, rugoro, snow, qsurf, tsurf, & |
11 |
snow, qsurf, tsurf, p1lay, ps, radsol, evap, fluxsens, fluxlat, & |
p1lay, ps, radsol, evap, fluxsens, fluxlat, dflux_l, dflux_s, & |
12 |
dflux_l, dflux_s, tsurf_new, alb_new, alblw, z0_new, pctsrf_new, & |
tsurf_new, albedo, z0_new, pctsrf_new, agesno, fqcalving, ffonte, & |
13 |
agesno, fqcalving, ffonte, run_off_lic_0, flux_o, flux_g) |
run_off_lic_0, flux_o, flux_g) |
14 |
|
|
15 |
! Cette routine sert d'aiguillage entre l'atmosphère et la surface |
! Cette routine sert d'aiguillage entre l'atmosph\`ere et la surface |
16 |
! en général (sols continentaux, océans, glaces) pour les flux de |
! en g\'en\'eral (sols continentaux, oc\'eans, glaces) pour les flux de |
17 |
! chaleur et d'humidité. |
! chaleur et d'humidit\'e. |
18 |
|
|
19 |
! Laurent Fairhead, 02/2000 |
! Laurent Fairhead, February 2000 |
20 |
|
|
21 |
USE abort_gcm_m, ONLY: abort_gcm |
USE abort_gcm_m, ONLY: abort_gcm |
22 |
|
use alboc_cd_m, only: alboc_cd |
23 |
|
use alboc_m, only: alboc |
24 |
USE albsno_m, ONLY: albsno |
USE albsno_m, ONLY: albsno |
25 |
use calbeta_m, only: calbeta |
use calbeta_m, only: calbeta |
26 |
USE calcul_fluxs_m, ONLY: calcul_fluxs |
USE calcul_fluxs_m, ONLY: calcul_fluxs |
27 |
use clesphys2, only: soil_model |
use clesphys2, only: soil_model, cycle_diurne |
28 |
USE dimphy, ONLY: klon |
USE dimphy, ONLY: klon |
29 |
USE fonte_neige_m, ONLY: fonte_neige |
USE fonte_neige_m, ONLY: fonte_neige |
30 |
USE indicesol, ONLY: epsfra, is_lic, is_oce, is_sic, is_ter, nbsrf |
USE indicesol, ONLY: epsfra, is_lic, is_oce, is_sic, is_ter, nbsrf |
41 |
integer, intent(IN):: nisurf ! index de la surface a traiter |
integer, intent(IN):: nisurf ! index de la surface a traiter |
42 |
integer, intent(IN):: knon ! nombre de points de la surface a traiter |
integer, intent(IN):: knon ! nombre de points de la surface a traiter |
43 |
|
|
44 |
integer, intent(in):: knindex(klon) |
integer, intent(in):: knindex(:) ! (knon) |
45 |
! index des points de la surface a traiter |
! index des points de la surface a traiter |
46 |
|
|
47 |
real, intent(IN):: pctsrf(klon, nbsrf) |
real, intent(IN):: pctsrf(klon, nbsrf) |
79 |
real, intent(IN):: precip_snow(klon) |
real, intent(IN):: precip_snow(klon) |
80 |
! precipitation, solid water mass flux (kg/m2/s), positive down |
! precipitation, solid water mass flux (kg/m2/s), positive down |
81 |
|
|
82 |
REAL, DIMENSION(klon), INTENT(INOUT):: fder |
REAL, INTENT(INOUT):: fder(klon) ! derivee des flux (pour le couplage) |
83 |
! fder derivee des flux (pour le couplage) |
real, intent(IN):: rugos(klon) ! rugosite |
84 |
real, dimension(klon), intent(IN):: rugos, rugoro |
real, intent(IN):: rugoro(klon) ! rugosite orographique |
|
! rugos rugosite |
|
|
! rugoro rugosite orographique |
|
85 |
real, intent(INOUT):: snow(klon), qsurf(klon) |
real, intent(INOUT):: snow(klon), qsurf(klon) |
86 |
real, dimension(klon), intent(IN):: tsurf, p1lay |
real, intent(IN):: tsurf(:) ! (knon) temp\'erature de surface |
87 |
! tsurf temperature de surface |
real, dimension(klon), intent(IN):: p1lay |
88 |
! p1lay pression 1er niveau (milieu de couche) |
! p1lay pression 1er niveau (milieu de couche) |
89 |
real, dimension(klon), intent(IN):: ps |
real, dimension(klon), intent(IN):: ps |
90 |
! ps pression au sol |
! ps pression au sol |
91 |
REAL, DIMENSION(klon), INTENT(INOUT):: radsol |
REAL, DIMENSION(klon), INTENT(INOUT):: radsol |
92 |
! radsol rayonnement net aus sol (LW + SW) |
! radsol rayonnement net aus sol (LW + SW) |
93 |
real, dimension(klon), intent(INOUT):: evap |
real, intent(INOUT):: evap(klon) ! evaporation totale |
|
! evap evaporation totale |
|
94 |
real, dimension(klon), intent(OUT):: fluxsens, fluxlat |
real, dimension(klon), intent(OUT):: fluxsens, fluxlat |
95 |
! fluxsens flux de chaleur sensible |
! fluxsens flux de chaleur sensible |
96 |
! fluxlat flux de chaleur latente |
! fluxlat flux de chaleur latente |
97 |
real, dimension(klon), intent(OUT):: dflux_l, dflux_s |
real, dimension(klon), intent(OUT):: dflux_l, dflux_s |
98 |
real, dimension(klon), intent(OUT):: tsurf_new, alb_new |
real, intent(OUT):: tsurf_new(knon) ! temp\'erature au sol |
99 |
! tsurf_new temperature au sol |
real, intent(OUT):: albedo(:) ! (knon) albedo |
100 |
! alb_new albedo |
real, intent(OUT):: z0_new(klon) ! surface roughness |
|
real, dimension(klon), intent(OUT):: alblw |
|
|
real, dimension(klon), intent(OUT):: z0_new |
|
|
! z0_new surface roughness |
|
101 |
real, dimension(klon, nbsrf), intent(OUT):: pctsrf_new |
real, dimension(klon, nbsrf), intent(OUT):: pctsrf_new |
102 |
! pctsrf_new nouvelle repartition des surfaces |
! pctsrf_new nouvelle repartition des surfaces |
103 |
real, dimension(klon), intent(INOUT):: agesno |
real, dimension(klon), intent(INOUT):: agesno |
104 |
|
|
105 |
! Flux d'eau "perdue" par la surface et nécessaire pour que limiter la |
! Flux d'eau "perdue" par la surface et n\'ecessaire pour que limiter la |
106 |
! hauteur de neige, en kg/m2/s |
! hauteur de neige, en kg/m2/s |
107 |
!jld a rajouter real, dimension(klon), intent(INOUT):: fqcalving |
!jld a rajouter real, dimension(klon), intent(INOUT):: fqcalving |
108 |
real, dimension(klon), intent(INOUT):: fqcalving |
real, dimension(klon), intent(INOUT):: fqcalving |
124 |
|
|
125 |
!IM: "slab" ocean |
!IM: "slab" ocean |
126 |
real, parameter:: t_grnd=271.35 |
real, parameter:: t_grnd=271.35 |
|
real, dimension(klon):: zx_sl |
|
127 |
integer i |
integer i |
128 |
|
|
129 |
character (len = 20), save:: modname = 'interfsurf_hq' |
character (len = 20), save:: modname = 'interfsurf_hq' |
131 |
logical, save:: first_call = .true. |
logical, save:: first_call = .true. |
132 |
integer:: ii |
integer:: ii |
133 |
real, dimension(klon):: cal, beta, dif_grnd, capsol |
real, dimension(klon):: cal, beta, dif_grnd, capsol |
134 |
real, parameter:: calice=1.0/(5.1444e6 * 0.15), tau_gl=86400.*5. |
real, parameter:: calice=1.0/(5.1444e6 * 0.15), tau_gl=86400. * 5. |
135 |
real, parameter:: calsno=1./(2.3867e6 * 0.15) |
real, parameter:: calsno=1./(2.3867e6 * 0.15) |
136 |
real, dimension(klon):: tsurf_temp |
real tsurf_temp(knon) |
137 |
real, dimension(klon):: alb_neig, alb_eau |
real alb_neig(knon) |
138 |
real, DIMENSION(klon):: zfra |
real zfra(knon) |
|
INTEGER, dimension(1):: iloc |
|
|
real, dimension(klon):: fder_prev |
|
139 |
|
|
140 |
!------------------------------------------------------------- |
!------------------------------------------------------------- |
141 |
|
|
149 |
print *, ' nisurf = ', nisurf, ' /= is_ter = ', is_ter |
print *, ' nisurf = ', nisurf, ' /= is_ter = ', is_ter |
150 |
print *, 'or on doit commencer par les surfaces continentales' |
print *, 'or on doit commencer par les surfaces continentales' |
151 |
abort_message='voir ci-dessus' |
abort_message='voir ci-dessus' |
152 |
call abort_gcm(modname, abort_message, 1) |
call abort_gcm(modname, abort_message) |
153 |
endif |
endif |
154 |
if (is_oce > is_sic) then |
if (is_oce > is_sic) then |
155 |
print *, 'Warning:' |
print *, 'Warning:' |
157 |
print *, ' l''ocean doit etre traite avant la banquise' |
print *, ' l''ocean doit etre traite avant la banquise' |
158 |
print *, ' or is_oce = ', is_oce, '> is_sic = ', is_sic |
print *, ' or is_oce = ', is_oce, '> is_sic = ', is_sic |
159 |
abort_message='voir ci-dessus' |
abort_message='voir ci-dessus' |
160 |
call abort_gcm(modname, abort_message, 1) |
call abort_gcm(modname, abort_message) |
161 |
endif |
endif |
162 |
endif |
endif |
163 |
first_call = .false. |
first_call = .false. |
166 |
|
|
167 |
ffonte(1:knon)=0. |
ffonte(1:knon)=0. |
168 |
fqcalving(1:knon)=0. |
fqcalving(1:knon)=0. |
|
|
|
169 |
cal = 999999. |
cal = 999999. |
170 |
beta = 999999. |
beta = 999999. |
171 |
dif_grnd = 999999. |
dif_grnd = 999999. |
172 |
capsol = 999999. |
capsol = 999999. |
|
alb_new = 999999. |
|
173 |
z0_new = 999999. |
z0_new = 999999. |
|
alb_neig = 999999. |
|
174 |
tsurf_new = 999999. |
tsurf_new = 999999. |
|
alblw = 999999. |
|
175 |
|
|
176 |
!IM: "slab" ocean; initialisations |
!IM: "slab" ocean; initialisations |
177 |
flux_o = 0. |
flux_o = 0. |
179 |
|
|
180 |
! Aiguillage vers les differents schemas de surface |
! Aiguillage vers les differents schemas de surface |
181 |
|
|
182 |
if (nisurf == is_ter) then |
select case (nisurf) |
183 |
! Surface "terre" appel a l'interface avec les sols continentaux |
case (is_ter) |
184 |
|
! Surface "terre", appel \`a l'interface avec les sols continentaux |
185 |
|
|
186 |
! allocation du run-off |
! allocation du run-off |
187 |
if (.not. allocated(run_off)) then |
if (.not. allocated(run_off)) then |
188 |
allocate(run_off(knon)) |
allocate(run_off(knon)) |
189 |
run_off = 0. |
run_off = 0. |
190 |
else if (size(run_off) /= knon) then |
else if (size(run_off) /= knon) then |
191 |
print *, 'Bizarre, le nombre de points continentaux' |
call abort_gcm(modname, 'Something is wrong: the number of ' & |
192 |
print *, 'a change entre deux appels. J''arrete ' |
// 'continental points has changed since last call.') |
|
abort_message='voir ci-dessus' |
|
|
call abort_gcm(modname, abort_message, 1) |
|
193 |
endif |
endif |
194 |
|
|
195 |
! Calcul age de la neige |
! Calcul age de la neige |
196 |
|
|
197 |
! calcul albedo: lecture albedo fichier boundary conditions |
! Read albedo from the file containing boundary conditions then |
198 |
! puis ajout albedo neige |
! add the albedo of snow: |
199 |
call interfsur_lim(itime, dtime, jour, nisurf, knon, knindex, & |
|
200 |
debut, alb_new, z0_new) |
call interfsur_lim(itime, dtime, jour, knindex, debut, albedo, z0_new) |
201 |
|
|
202 |
! calcul snow et qsurf, hydrol adapté |
! Calcul snow et qsurf, hydrologie adapt\'ee |
203 |
CALL calbeta(nisurf, snow(:knon), qsol(:knon), beta(:knon), & |
CALL calbeta(nisurf, snow(:knon), qsol(:knon), beta(:knon), & |
204 |
capsol(:knon), dif_grnd(:knon)) |
capsol(:knon), dif_grnd(:knon)) |
205 |
|
|
206 |
IF (soil_model) THEN |
IF (soil_model) THEN |
207 |
CALL soil(dtime, nisurf, knon, snow, tsurf, tsoil, soilcap, soilflux) |
CALL soil(dtime, nisurf, knon, snow, tsurf, tsoil, soilcap, soilflux) |
208 |
cal(1:knon) = RCPD / soilcap(1:knon) |
cal(1:knon) = RCPD / soilcap(1:knon) |
209 |
radsol(1:knon) = radsol(1:knon) + soilflux(1:knon) |
radsol(1:knon) = radsol(1:knon) + soilflux(:knon) |
210 |
ELSE |
ELSE |
211 |
cal = RCPD * capsol |
cal = RCPD * capsol |
212 |
ENDIF |
ENDIF |
213 |
CALL calcul_fluxs(klon, knon, nisurf, dtime, tsurf, p1lay, cal, beta, & |
|
214 |
tq_cdrag, ps, precip_rain, precip_snow, snow, qsurf, radsol, & |
CALL calcul_fluxs(dtime, tsurf, p1lay(:knon), cal(:knon), & |
215 |
dif_grnd, temp_air, spechum, u1_lay, v1_lay, petAcoef, peqAcoef, & |
beta(:knon), tq_cdrag(:knon), ps(:knon), qsurf(:knon), & |
216 |
petBcoef, peqBcoef, tsurf_new, evap, fluxlat, fluxsens, dflux_s, & |
radsol(:knon), dif_grnd(:knon), temp_air(:knon), spechum(:knon), & |
217 |
dflux_l) |
u1_lay(:knon), v1_lay(:knon), petAcoef(:knon), peqAcoef(:knon), & |
218 |
|
petBcoef(:knon), peqBcoef(:knon), tsurf_new, evap(:knon), & |
219 |
CALL fonte_neige(klon, knon, nisurf, dtime, tsurf, p1lay, beta, & |
fluxlat(:knon), fluxsens(:knon), dflux_s(:knon), dflux_l(:knon)) |
220 |
tq_cdrag, ps, precip_rain(:knon), precip_snow, snow, qsol(:knon), & |
|
221 |
temp_air, spechum, u1_lay, v1_lay, petAcoef, peqAcoef, petBcoef, & |
CALL fonte_neige(nisurf, dtime, tsurf, p1lay(:knon), beta(:knon), & |
222 |
peqBcoef, tsurf_new, evap, fqcalving, ffonte, run_off_lic_0) |
tq_cdrag(:knon), ps(:knon), precip_rain(:knon), & |
223 |
|
precip_snow(:knon), snow(:knon), qsol(:knon), temp_air(:knon), & |
224 |
call albsno(klon, knon, dtime, agesno, alb_neig, precip_snow) |
spechum(:knon), u1_lay(:knon), v1_lay(:knon), petAcoef(:knon), & |
225 |
where (snow(1 : knon) .LT. 0.0001) agesno(1 : knon) = 0. |
peqAcoef(:knon), petBcoef(:knon), peqBcoef(:knon), tsurf_new, & |
226 |
zfra(1:knon) = max(0.0, min(1.0, snow(1:knon)/(snow(1:knon) + 10.0))) |
evap(:knon), fqcalving(:knon), ffonte(:knon), run_off_lic_0(:knon)) |
227 |
alb_new(1 : knon) = alb_neig(1 : knon) *zfra(1:knon) + & |
|
228 |
alb_new(1 : knon)*(1.0-zfra(1:knon)) |
call albsno(dtime, agesno(:knon), alb_neig, precip_snow(:knon)) |
229 |
|
where (snow(:knon) < 0.0001) agesno(:knon) = 0. |
230 |
|
zfra = max(0.0, min(1.0, snow(:knon)/(snow(:knon) + 10.0))) |
231 |
|
albedo = alb_neig * zfra + albedo * (1. - zfra) |
232 |
z0_new = sqrt(z0_new**2 + rugoro**2) |
z0_new = sqrt(z0_new**2 + rugoro**2) |
|
alblw(1 : knon) = alb_new(1 : knon) |
|
233 |
|
|
234 |
! Remplissage des pourcentages de surface |
! Remplissage des pourcentages de surface |
235 |
pctsrf_new(:, nisurf) = pctsrf(:, nisurf) |
pctsrf_new(:, nisurf) = pctsrf(:, nisurf) |
236 |
else if (nisurf == is_oce) then |
case (is_oce) |
237 |
! Surface "ocean" appel a l'interface avec l'ocean |
! Surface "ocean" appel \`a l'interface avec l'oc\'ean |
238 |
! lecture conditions limites |
! lecture conditions limites |
239 |
call interfoce_lim(itime, dtime, jour, klon, nisurf, knon, knindex, & |
call interfoce_lim(itime, dtime, jour, knindex, debut, tsurf_temp, & |
240 |
debut, tsurf_new, pctsrf_new) |
pctsrf_new) |
241 |
|
|
|
tsurf_temp = tsurf_new |
|
242 |
cal = 0. |
cal = 0. |
243 |
beta = 1. |
beta = 1. |
244 |
dif_grnd = 0. |
dif_grnd = 0. |
|
alb_neig = 0. |
|
245 |
agesno = 0. |
agesno = 0. |
246 |
|
call calcul_fluxs(dtime, tsurf_temp, p1lay(:knon), & |
247 |
call calcul_fluxs(klon, knon, nisurf, dtime, tsurf_temp, p1lay, cal, & |
cal(:knon), beta(:knon), tq_cdrag(:knon), ps(:knon), & |
248 |
beta, tq_cdrag, ps, precip_rain, precip_snow, snow, qsurf, & |
qsurf(:knon), radsol(:knon), dif_grnd(:knon), temp_air(:knon), & |
249 |
radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, petAcoef, & |
spechum(:knon), u1_lay(:knon), v1_lay(:knon), petAcoef(:knon), & |
250 |
peqAcoef, petBcoef, peqBcoef, tsurf_new, evap, fluxlat, fluxsens, & |
peqAcoef(:knon), petBcoef(:knon), peqBcoef(:knon), & |
251 |
dflux_s, dflux_l) |
tsurf_new, evap(:knon), fluxlat(:knon), fluxsens(:knon), & |
252 |
|
dflux_s(:knon), dflux_l(:knon)) |
253 |
fder_prev = fder |
fder = fder + dflux_s + dflux_l |
|
fder = fder_prev + dflux_s + dflux_l |
|
|
|
|
|
iloc = maxloc(fder(1:klon)) |
|
254 |
|
|
255 |
!IM: flux ocean-atmosphere utile pour le "slab" ocean |
!IM: flux ocean-atmosphere utile pour le "slab" ocean |
256 |
DO i=1, knon |
flux_o(:knon) = fluxsens(:knon) - evap(:knon) & |
257 |
zx_sl(i) = RLVTT |
* merge(RLSTT, RLVTT, tsurf_new < RTT) |
|
if (tsurf_new(i) .LT. RTT) zx_sl(i) = RLSTT |
|
|
flux_o(i) = fluxsens(i)-evap(i)*zx_sl(i) |
|
|
ENDDO |
|
258 |
|
|
259 |
! calcul albedo |
! Compute the albedo: |
260 |
if (minval(rmu0) == maxval(rmu0) .and. minval(rmu0) == -999.999) then |
if (cycle_diurne) then |
261 |
CALL alboc(FLOAT(jour), rlat, alb_eau) |
CALL alboc_cd(rmu0(knindex), albedo) |
262 |
else ! cycle diurne |
else |
263 |
CALL alboc_cd(rmu0, alb_eau) |
CALL alboc(jour, rlat(knindex), albedo) |
264 |
endif |
endif |
|
DO ii =1, knon |
|
|
alb_new(ii) = alb_eau(knindex(ii)) |
|
|
enddo |
|
265 |
|
|
266 |
z0_new = sqrt(rugos**2 + rugoro**2) |
z0_new = sqrt(rugos**2 + rugoro**2) |
267 |
alblw(1:knon) = alb_new(1:knon) |
case (is_sic) |
|
else if (nisurf == is_sic) then |
|
268 |
! Surface "glace de mer" appel a l'interface avec l'ocean |
! Surface "glace de mer" appel a l'interface avec l'ocean |
269 |
|
|
270 |
! ! lecture conditions limites |
! ! lecture conditions limites |
271 |
CALL interfoce_lim(itime, dtime, jour, klon, nisurf, knon, knindex, & |
CALL interfoce_lim(itime, dtime, jour, knindex, debut, tsurf_new, & |
272 |
debut, tsurf_new, pctsrf_new) |
pctsrf_new) |
273 |
|
|
|
!IM cf LF |
|
274 |
DO ii = 1, knon |
DO ii = 1, knon |
275 |
tsurf_new(ii) = tsurf(ii) |
tsurf_new(ii) = tsurf(ii) |
|
!IMbad IF (pctsrf_new(ii, nisurf) < EPSFRA) then |
|
276 |
IF (pctsrf_new(knindex(ii), nisurf) < EPSFRA) then |
IF (pctsrf_new(knindex(ii), nisurf) < EPSFRA) then |
277 |
snow(ii) = 0.0 |
snow(ii) = 0.0 |
|
!IM cf LF/JLD tsurf(ii) = RTT - 1.8 |
|
278 |
tsurf_new(ii) = RTT - 1.8 |
tsurf_new(ii) = RTT - 1.8 |
279 |
IF (soil_model) tsoil(ii, :) = RTT -1.8 |
IF (soil_model) tsoil(ii, :) = RTT - 1.8 |
280 |
endif |
endif |
281 |
enddo |
enddo |
282 |
|
|
294 |
cal = RCPD * calice |
cal = RCPD * calice |
295 |
WHERE (snow > 0.0) cal = RCPD * calsno |
WHERE (snow > 0.0) cal = RCPD * calsno |
296 |
ENDIF |
ENDIF |
|
!IMbadtsurf_temp = tsurf |
|
297 |
tsurf_temp = tsurf_new |
tsurf_temp = tsurf_new |
298 |
beta = 1.0 |
beta = 1.0 |
299 |
|
|
300 |
CALL calcul_fluxs(klon, knon, nisurf, dtime, tsurf_temp, p1lay, cal, & |
CALL calcul_fluxs(dtime, tsurf_temp, p1lay(:knon), cal(:knon), & |
301 |
beta, tq_cdrag, ps, precip_rain, precip_snow, snow, qsurf, & |
beta(:knon), tq_cdrag(:knon), ps(:knon), qsurf(:knon), & |
302 |
radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, petAcoef, & |
radsol(:knon), dif_grnd(:knon), temp_air(:knon), spechum(:knon), & |
303 |
peqAcoef, petBcoef, peqBcoef, tsurf_new, evap, fluxlat, fluxsens, & |
u1_lay(:knon), v1_lay(:knon), petAcoef(:knon), peqAcoef(:knon), & |
304 |
dflux_s, dflux_l) |
petBcoef(:knon), peqBcoef(:knon), tsurf_new, evap(:knon), & |
305 |
|
fluxlat(:knon), fluxsens(:knon), dflux_s(:knon), dflux_l(:knon)) |
306 |
|
|
307 |
!IM: flux entre l'ocean et la glace de mer pour le "slab" ocean |
!IM: flux entre l'ocean et la glace de mer pour le "slab" ocean |
308 |
DO i = 1, knon |
DO i = 1, knon |
311 |
* dif_grnd(i) * RCPD / cal(i) |
* dif_grnd(i) * RCPD / cal(i) |
312 |
ENDDO |
ENDDO |
313 |
|
|
314 |
CALL fonte_neige(klon, knon, nisurf, dtime, tsurf_temp, p1lay, beta, & |
CALL fonte_neige(nisurf, dtime, tsurf_temp, p1lay(:knon), beta(:knon), & |
315 |
tq_cdrag, ps, precip_rain(:knon), precip_snow, snow, qsol(:knon), & |
tq_cdrag(:knon), ps(:knon), precip_rain(:knon), & |
316 |
temp_air, spechum, u1_lay, v1_lay, petAcoef, peqAcoef, petBcoef, & |
precip_snow(:knon), snow(:knon), qsol(:knon), temp_air(:knon), & |
317 |
peqBcoef, tsurf_new, evap, fqcalving, ffonte, run_off_lic_0) |
spechum(:knon), u1_lay(:knon), v1_lay(:knon), petAcoef(:knon), & |
318 |
|
peqAcoef(:knon), petBcoef(:knon), peqBcoef(:knon), tsurf_new, & |
319 |
! calcul albedo |
evap(:knon), fqcalving(:knon), ffonte(:knon), run_off_lic_0(:knon)) |
320 |
|
|
321 |
|
! Compute the albedo: |
322 |
|
|
323 |
|
CALL albsno(dtime, agesno(:knon), alb_neig, precip_snow(:knon)) |
324 |
|
WHERE (snow(:knon) < 0.0001) agesno(:knon) = 0. |
325 |
|
zfra = MAX(0.0, MIN(1.0, snow(:knon)/(snow(:knon) + 10.0))) |
326 |
|
albedo = alb_neig * zfra + 0.6 * (1.0 - zfra) |
327 |
|
|
328 |
CALL albsno(klon, knon, dtime, agesno, alb_neig, precip_snow) |
fder = fder + dflux_s + dflux_l |
|
WHERE (snow(1 : knon) .LT. 0.0001) agesno(1 : knon) = 0. |
|
|
zfra(1:knon) = MAX(0.0, MIN(1.0, snow(1:knon)/(snow(1:knon) + 10.0))) |
|
|
alb_new(1 : knon) = alb_neig(1 : knon) *zfra(1:knon) + & |
|
|
0.6 * (1.0-zfra(1:knon)) |
|
|
|
|
|
fder_prev = fder |
|
|
fder = fder_prev + dflux_s + dflux_l |
|
|
|
|
|
iloc = maxloc(fder(1:klon)) |
|
329 |
|
|
330 |
! 2eme appel a interfoce pour le cumul et le passage des flux a l'ocean |
! 2eme appel a interfoce pour le cumul et le passage des flux a l'ocean |
331 |
|
|
332 |
z0_new = 0.002 |
z0_new = 0.002 |
333 |
z0_new = SQRT(z0_new**2 + rugoro**2) |
z0_new = SQRT(z0_new**2 + rugoro**2) |
334 |
alblw(1:knon) = alb_new(1:knon) |
case (is_lic) |
|
|
|
|
else if (nisurf == is_lic) then |
|
335 |
if (.not. allocated(run_off_lic)) then |
if (.not. allocated(run_off_lic)) then |
336 |
allocate(run_off_lic(knon)) |
allocate(run_off_lic(knon)) |
337 |
run_off_lic = 0. |
run_off_lic = 0. |
350 |
beta = 1.0 |
beta = 1.0 |
351 |
dif_grnd = 0.0 |
dif_grnd = 0.0 |
352 |
|
|
353 |
call calcul_fluxs(klon, knon, nisurf, dtime, tsurf, p1lay, cal, beta, & |
call calcul_fluxs(dtime, tsurf, p1lay(:knon), cal(:knon), & |
354 |
tq_cdrag, ps, precip_rain, precip_snow, snow, qsurf, radsol, & |
beta(:knon), tq_cdrag(:knon), ps(:knon), qsurf(:knon), & |
355 |
dif_grnd, temp_air, spechum, u1_lay, v1_lay, petAcoef, peqAcoef, & |
radsol(:knon), dif_grnd(:knon), temp_air(:knon), spechum(:knon), & |
356 |
petBcoef, peqBcoef, tsurf_new, evap, fluxlat, fluxsens, dflux_s, & |
u1_lay(:knon), v1_lay(:knon), petAcoef(:knon), peqAcoef(:knon), & |
357 |
dflux_l) |
petBcoef(:knon), peqBcoef(:knon), tsurf_new, evap(:knon), & |
358 |
|
fluxlat(:knon), fluxsens(:knon), dflux_s(:knon), dflux_l(:knon)) |
359 |
call fonte_neige(klon, knon, nisurf, dtime, tsurf, p1lay, beta, & |
|
360 |
tq_cdrag, ps, precip_rain(:knon), precip_snow, snow, qsol(:knon), & |
call fonte_neige(nisurf, dtime, tsurf, p1lay(:knon), beta(:knon), & |
361 |
temp_air, spechum, u1_lay, v1_lay, petAcoef, peqAcoef, petBcoef, & |
tq_cdrag(:knon), ps(:knon), precip_rain(:knon), & |
362 |
peqBcoef, tsurf_new, evap, fqcalving, ffonte, run_off_lic_0) |
precip_snow(:knon), snow(:knon), qsol(:knon), temp_air(:knon), & |
363 |
|
spechum(:knon), u1_lay(:knon), v1_lay(:knon), petAcoef(:knon), & |
364 |
|
peqAcoef(:knon), petBcoef(:knon), peqBcoef(:knon), tsurf_new, & |
365 |
|
evap(:knon), fqcalving(:knon), ffonte(:knon), run_off_lic_0(:knon)) |
366 |
|
|
367 |
! calcul albedo |
! calcul albedo |
368 |
CALL albsno(klon, knon, dtime, agesno, alb_neig, precip_snow) |
CALL albsno(dtime, agesno(:knon), alb_neig, precip_snow(:knon)) |
369 |
WHERE (snow(1 : knon) .LT. 0.0001) agesno(1 : knon) = 0. |
WHERE (snow(:knon) < 0.0001) agesno(:knon) = 0. |
370 |
zfra(1:knon) = MAX(0.0, MIN(1.0, snow(1:knon)/(snow(1:knon) + 10.0))) |
albedo = 0.77 |
|
alb_new(1 : knon) = alb_neig(1 : knon)*zfra(1:knon) + & |
|
|
0.6 * (1.0-zfra(1:knon)) |
|
|
|
|
|
!IM: plusieurs choix/tests sur l'albedo des "glaciers continentaux" |
|
|
!IM: KstaTER0.77 & LMD_ARMIP6 |
|
|
alb_new(1 : knon) = 0.77 |
|
371 |
|
|
372 |
! Rugosite |
! Rugosite |
373 |
z0_new = rugoro |
z0_new = rugoro |
375 |
! Remplissage des pourcentages de surface |
! Remplissage des pourcentages de surface |
376 |
pctsrf_new(:, nisurf) = pctsrf(:, nisurf) |
pctsrf_new(:, nisurf) = pctsrf(:, nisurf) |
377 |
|
|
378 |
alblw(1:knon) = alb_new(1:knon) |
case default |
|
else |
|
379 |
print *, 'Index surface = ', nisurf |
print *, 'Index surface = ', nisurf |
380 |
abort_message = 'Index surface non valable' |
abort_message = 'Index surface non valable' |
381 |
call abort_gcm(modname, abort_message, 1) |
call abort_gcm(modname, abort_message) |
382 |
endif |
end select |
383 |
|
|
384 |
END SUBROUTINE interfsurf_hq |
END SUBROUTINE interfsurf_hq |
385 |
|
|