4 |
|
|
5 |
contains |
contains |
6 |
|
|
7 |
SUBROUTINE interfsurf_hq(dtime, jour, rmu0, nisurf, knon, knindex, rlat, & |
SUBROUTINE interfsurf_hq(dtime, jour, rmu0, nisurf, knon, knindex, debut, & |
8 |
debut, nsoilmx, tsoil, qsol, u1_lay, v1_lay, temp_air, spechum, & |
tsoil, qsol, u1_lay, v1_lay, temp_air, spechum, tq_cdrag, petAcoef, & |
9 |
tq_cdrag, petAcoef, peqAcoef, petBcoef, peqBcoef, precip_rain, & |
peqAcoef, petBcoef, peqBcoef, precip_rain, precip_snow, fder, rugos, & |
10 |
precip_snow, fder, rugos, rugoro, snow, qsurf, tsurf, p1lay, ps, & |
rugoro, snow, qsurf, tsurf, p1lay, ps, radsol, evap, flux_t, fluxlat, & |
11 |
radsol, evap, flux_t, fluxlat, dflux_l, dflux_s, tsurf_new, albedo, & |
dflux_l, dflux_s, tsurf_new, albedo, z0_new, pctsrf_new_sic, agesno, & |
12 |
z0_new, pctsrf_new_sic, agesno, fqcalving, ffonte, run_off_lic_0) |
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 |
19 |
|
|
20 |
USE abort_gcm_m, ONLY: abort_gcm |
USE abort_gcm_m, ONLY: abort_gcm |
21 |
use alboc_cd_m, only: alboc_cd |
use alboc_cd_m, only: alboc_cd |
|
use alboc_m, only: alboc |
|
22 |
USE albsno_m, ONLY: albsno |
USE albsno_m, ONLY: albsno |
23 |
use calbeta_m, only: calbeta |
use calbeta_m, only: calbeta |
24 |
USE calcul_fluxs_m, ONLY: calcul_fluxs |
USE calcul_fluxs_m, ONLY: calcul_fluxs |
25 |
use clesphys2, only: soil_model, cycle_diurne |
use clesphys2, only: soil_model |
26 |
USE dimphy, ONLY: klon |
USE dimphy, ONLY: klon |
27 |
USE fonte_neige_m, ONLY: fonte_neige |
USE fonte_neige_m, ONLY: fonte_neige |
28 |
USE indicesol, ONLY: epsfra, is_lic, is_oce, is_sic, is_ter |
USE indicesol, ONLY: epsfra, is_lic, is_oce, is_sic, is_ter |
41 |
integer, intent(in):: knindex(:) ! (knon) |
integer, intent(in):: knindex(:) ! (knon) |
42 |
! index des points de la surface a traiter |
! index des points de la surface a traiter |
43 |
|
|
|
real, intent(IN):: rlat(klon) ! latitudes |
|
|
|
|
44 |
logical, intent(IN):: debut ! 1er appel a la physique |
logical, intent(IN):: debut ! 1er appel a la physique |
45 |
! (si false calcul simplifie des fluxs sur les continents) |
! (si false calcul simplifie des fluxs sur les continents) |
46 |
|
|
47 |
integer, intent(in):: nsoilmx |
REAL, intent(inout):: tsoil(:, :) ! (knon, nsoilmx) |
|
REAL tsoil(klon, nsoilmx) |
|
48 |
|
|
49 |
REAL, intent(INOUT):: qsol(klon) |
REAL, intent(INOUT):: qsol(klon) |
50 |
! column-density of water in soil, in kg m-2 |
! column-density of water in soil, in kg m-2 |
119 |
real tsurf_temp(knon) |
real tsurf_temp(knon) |
120 |
real alb_neig(knon) |
real alb_neig(knon) |
121 |
real zfra(knon) |
real zfra(knon) |
122 |
|
REAL, PARAMETER:: fmagic = 1. ! facteur magique pour r\'egler l'alb\'edo |
123 |
|
|
124 |
!------------------------------------------------------------- |
!------------------------------------------------------------- |
125 |
|
|
139 |
if (is_oce > is_sic) then |
if (is_oce > is_sic) then |
140 |
print *, 'is_oce = ', is_oce, '> is_sic = ', is_sic |
print *, 'is_oce = ', is_oce, '> is_sic = ', is_sic |
141 |
call abort_gcm("interfsurf_hq", & |
call abort_gcm("interfsurf_hq", & |
142 |
'L''ocean doit etre traite avant la banquise') |
"L'ocean doit etre traite avant la banquise") |
143 |
endif |
endif |
144 |
|
|
145 |
first_call = .false. |
first_call = .false. |
174 |
capsol(:knon), dif_grnd(:knon)) |
capsol(:knon), dif_grnd(:knon)) |
175 |
|
|
176 |
IF (soil_model) THEN |
IF (soil_model) THEN |
177 |
CALL soil(dtime, is_ter, snow(:knon), tsurf, tsoil(:knon, :), & |
CALL soil(dtime, is_ter, snow(:knon), tsurf, tsoil, soilcap, soilflux) |
|
soilcap, soilflux) |
|
178 |
cal(1:knon) = RCPD / soilcap |
cal(1:knon) = RCPD / soilcap |
179 |
radsol(1:knon) = radsol(1:knon) + soilflux |
radsol(1:knon) = radsol(1:knon) + soilflux |
180 |
ELSE |
ELSE |
204 |
! Surface "oc\'ean", appel \`a l'interface avec l'oc\'ean |
! Surface "oc\'ean", appel \`a l'interface avec l'oc\'ean |
205 |
|
|
206 |
call read_sst(dtime, jour, knindex, debut, tsurf_temp) |
call read_sst(dtime, jour, knindex, debut, tsurf_temp) |
|
|
|
207 |
cal = 0. |
cal = 0. |
208 |
beta = 1. |
beta = 1. |
209 |
dif_grnd = 0. |
dif_grnd = 0. |
215 |
petBcoef(:knon), peqBcoef(:knon), tsurf_new, evap, & |
petBcoef(:knon), peqBcoef(:knon), tsurf_new, evap, & |
216 |
fluxlat(:knon), flux_t, dflux_s(:knon), dflux_l(:knon)) |
fluxlat(:knon), flux_t, dflux_s(:knon), dflux_l(:knon)) |
217 |
fder = fder + dflux_s + dflux_l |
fder = fder + dflux_s + dflux_l |
218 |
|
albedo = alboc_cd(rmu0(knindex)) * fmagic |
|
! Compute the albedo: |
|
|
if (cycle_diurne) then |
|
|
CALL alboc_cd(rmu0(knindex), albedo) |
|
|
else |
|
|
CALL alboc(jour, rlat(knindex), albedo) |
|
|
endif |
|
|
|
|
219 |
z0_new = sqrt(rugos**2 + rugoro**2) |
z0_new = sqrt(rugos**2 + rugoro**2) |
220 |
case (is_sic) |
case (is_sic) |
221 |
! Surface "glace de mer" appel a l'interface avec l'ocean |
! Surface "glace de mer" appel a l'interface avec l'ocean |
233 |
capsol(:knon), dif_grnd(:knon)) |
capsol(:knon), dif_grnd(:knon)) |
234 |
|
|
235 |
IF (soil_model) THEN |
IF (soil_model) THEN |
236 |
CALL soil(dtime, is_sic, snow(:knon), tsurf_new, tsoil(:knon, :), & |
CALL soil(dtime, is_sic, snow(:knon), tsurf_new, tsoil, soilcap, & |
237 |
soilcap, soilflux) |
soilflux) |
238 |
cal(1:knon) = RCPD / soilcap |
cal(1:knon) = RCPD / soilcap |
239 |
radsol(1:knon) = radsol(1:knon) + soilflux |
radsol(1:knon) = radsol(1:knon) + soilflux |
240 |
dif_grnd = 0. |
dif_grnd = 0. |
278 |
! Surface "glacier continentaux" appel a l'interface avec le sol |
! Surface "glacier continentaux" appel a l'interface avec le sol |
279 |
|
|
280 |
IF (soil_model) THEN |
IF (soil_model) THEN |
281 |
CALL soil(dtime, is_lic, snow(:knon), tsurf, tsoil(:knon, :), & |
CALL soil(dtime, is_lic, snow(:knon), tsurf, tsoil, soilcap, soilflux) |
|
soilcap, soilflux) |
|
282 |
cal(1:knon) = RCPD / soilcap |
cal(1:knon) = RCPD / soilcap |
283 |
radsol(1:knon) = radsol(1:knon) + soilflux |
radsol(1:knon) = radsol(1:knon) + soilflux |
284 |
ELSE |
ELSE |