5 |
contains |
contains |
6 |
|
|
7 |
SUBROUTINE interfsurf_hq(dtime, jour, rmu0, nisurf, knon, knindex, rlat, & |
SUBROUTINE interfsurf_hq(dtime, jour, rmu0, nisurf, knon, knindex, rlat, & |
8 |
debut, nsoilmx, tsoil, qsol, u1_lay, v1_lay, temp_air, spechum, & |
debut, tsoil, qsol, u1_lay, v1_lay, temp_air, spechum, tq_cdrag, & |
9 |
tq_cdrag, petAcoef, peqAcoef, petBcoef, peqBcoef, precip_rain, & |
petAcoef, peqAcoef, petBcoef, peqBcoef, precip_rain, precip_snow, & |
10 |
precip_snow, fder, rugos, rugoro, snow, qsurf, tsurf, p1lay, ps, & |
fder, rugos, rugoro, snow, qsurf, tsurf, p1lay, ps, radsol, evap, & |
11 |
radsol, evap, flux_t, fluxlat, dflux_l, dflux_s, tsurf_new, albedo, & |
flux_t, fluxlat, dflux_l, dflux_s, tsurf_new, albedo, z0_new, & |
12 |
z0_new, pctsrf_new_sic, agesno, fqcalving, ffonte, run_off_lic_0) |
pctsrf_new_sic, agesno, fqcalving, ffonte, run_off_lic_0) |
13 |
|
|
14 |
! Cette routine sert d'aiguillage entre l'atmosph\`ere et la surface |
! 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 |
! en g\'en\'eral (sols continentaux, oc\'eans, glaces) pour les flux de |
47 |
logical, intent(IN):: debut ! 1er appel a la physique |
logical, intent(IN):: debut ! 1er appel a la physique |
48 |
! (si false calcul simplifie des fluxs sur les continents) |
! (si false calcul simplifie des fluxs sur les continents) |
49 |
|
|
50 |
integer, intent(in):: nsoilmx |
REAL, intent(inout):: tsoil(:, :) ! (knon, nsoilmx) |
|
REAL tsoil(klon, nsoilmx) |
|
51 |
|
|
52 |
REAL, intent(INOUT):: qsol(klon) |
REAL, intent(INOUT):: qsol(klon) |
53 |
! column-density of water in soil, in kg m-2 |
! column-density of water in soil, in kg m-2 |
122 |
real tsurf_temp(knon) |
real tsurf_temp(knon) |
123 |
real alb_neig(knon) |
real alb_neig(knon) |
124 |
real zfra(knon) |
real zfra(knon) |
125 |
|
REAL, PARAMETER:: fmagic = 1. ! facteur magique pour r\'egler l'alb\'edo |
126 |
|
|
127 |
!------------------------------------------------------------- |
!------------------------------------------------------------- |
128 |
|
|
142 |
if (is_oce > is_sic) then |
if (is_oce > is_sic) then |
143 |
print *, 'is_oce = ', is_oce, '> is_sic = ', is_sic |
print *, 'is_oce = ', is_oce, '> is_sic = ', is_sic |
144 |
call abort_gcm("interfsurf_hq", & |
call abort_gcm("interfsurf_hq", & |
145 |
'L''ocean doit etre traite avant la banquise') |
"L'ocean doit etre traite avant la banquise") |
146 |
endif |
endif |
147 |
|
|
148 |
first_call = .false. |
first_call = .false. |
177 |
capsol(:knon), dif_grnd(:knon)) |
capsol(:knon), dif_grnd(:knon)) |
178 |
|
|
179 |
IF (soil_model) THEN |
IF (soil_model) THEN |
180 |
CALL soil(dtime, is_ter, snow(:knon), tsurf, tsoil(:knon, :), & |
CALL soil(dtime, is_ter, snow(:knon), tsurf, tsoil, soilcap, soilflux) |
|
soilcap, soilflux) |
|
181 |
cal(1:knon) = RCPD / soilcap |
cal(1:knon) = RCPD / soilcap |
182 |
radsol(1:knon) = radsol(1:knon) + soilflux |
radsol(1:knon) = radsol(1:knon) + soilflux |
183 |
ELSE |
ELSE |
221 |
fder = fder + dflux_s + dflux_l |
fder = fder + dflux_s + dflux_l |
222 |
|
|
223 |
! Compute the albedo: |
! Compute the albedo: |
224 |
|
|
225 |
if (cycle_diurne) then |
if (cycle_diurne) then |
226 |
CALL alboc_cd(rmu0(knindex), albedo) |
albedo = alboc_cd(rmu0(knindex)) |
227 |
else |
else |
228 |
CALL alboc(jour, rlat(knindex), albedo) |
albedo = alboc(jour, rlat(knindex)) |
229 |
endif |
endif |
230 |
|
|
231 |
|
albedo = albedo * fmagic |
232 |
|
|
233 |
z0_new = sqrt(rugos**2 + rugoro**2) |
z0_new = sqrt(rugos**2 + rugoro**2) |
234 |
case (is_sic) |
case (is_sic) |
235 |
! Surface "glace de mer" appel a l'interface avec l'ocean |
! Surface "glace de mer" appel a l'interface avec l'ocean |
247 |
capsol(:knon), dif_grnd(:knon)) |
capsol(:knon), dif_grnd(:knon)) |
248 |
|
|
249 |
IF (soil_model) THEN |
IF (soil_model) THEN |
250 |
CALL soil(dtime, is_sic, snow(:knon), tsurf_new, tsoil(:knon, :), & |
CALL soil(dtime, is_sic, snow(:knon), tsurf_new, tsoil, soilcap, & |
251 |
soilcap, soilflux) |
soilflux) |
252 |
cal(1:knon) = RCPD / soilcap |
cal(1:knon) = RCPD / soilcap |
253 |
radsol(1:knon) = radsol(1:knon) + soilflux |
radsol(1:knon) = radsol(1:knon) + soilflux |
254 |
dif_grnd = 0. |
dif_grnd = 0. |
292 |
! Surface "glacier continentaux" appel a l'interface avec le sol |
! Surface "glacier continentaux" appel a l'interface avec le sol |
293 |
|
|
294 |
IF (soil_model) THEN |
IF (soil_model) THEN |
295 |
CALL soil(dtime, is_lic, snow(:knon), tsurf, tsoil(:knon, :), & |
CALL soil(dtime, is_lic, snow(:knon), tsurf, tsoil, soilcap, soilflux) |
|
soilcap, soilflux) |
|
296 |
cal(1:knon) = RCPD / soilcap |
cal(1:knon) = RCPD / soilcap |
297 |
radsol(1:knon) = radsol(1:knon) + soilflux |
radsol(1:knon) = radsol(1:knon) + soilflux |
298 |
ELSE |
ELSE |