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 |
22 |
USE albsno_m, ONLY: albsno |
USE albsno_m, ONLY: albsno |
|
use calbeta_m, only: calbeta |
|
23 |
USE calcul_fluxs_m, ONLY: calcul_fluxs |
USE calcul_fluxs_m, ONLY: calcul_fluxs |
|
use clesphys2, only: soil_model |
|
24 |
USE dimphy, ONLY: klon |
USE dimphy, ONLY: klon |
25 |
USE fonte_neige_m, ONLY: fonte_neige |
USE fonte_neige_m, ONLY: fonte_neige |
26 |
USE indicesol, ONLY: epsfra, is_lic, is_oce, is_sic, is_ter |
USE indicesol, ONLY: epsfra, is_lic, is_oce, is_sic, is_ter |
51 |
real, dimension(klon), intent(IN):: temp_air, spechum |
real, dimension(klon), intent(IN):: temp_air, spechum |
52 |
! temp_air temperature de l'air 1ere couche |
! temp_air temperature de l'air 1ere couche |
53 |
! spechum humidite specifique 1ere couche |
! spechum humidite specifique 1ere couche |
54 |
real, dimension(klon), intent(INOUT):: tq_cdrag ! coefficient d'echange |
real, intent(IN):: tq_cdrag(:) ! (knon) coefficient d'echange |
55 |
|
|
56 |
real, dimension(klon), intent(IN):: petAcoef, peqAcoef |
real, dimension(klon), intent(IN):: petAcoef, peqAcoef |
57 |
! coefficients A de la r\'esolution de la couche limite pour t et q |
! coefficients A de la r\'esolution de la couche limite pour t et q |
72 |
real, intent(IN):: ts(:) ! (knon) temp\'erature de surface |
real, intent(IN):: ts(:) ! (knon) temp\'erature de surface |
73 |
real, intent(IN):: p1lay(klon) ! pression 1er niveau (milieu de couche) |
real, intent(IN):: p1lay(klon) ! pression 1er niveau (milieu de couche) |
74 |
real, dimension(klon), intent(IN):: ps ! pression au sol |
real, dimension(klon), intent(IN):: ps ! pression au sol |
75 |
REAL, INTENT(INOUT):: radsol(:) ! (knon) rayonnement net au sol (LW + SW) |
REAL, INTENT(IN):: radsol(:) ! (knon) rayonnement net au sol (LW + SW) |
76 |
real, intent(OUT):: evap(:) ! (knon) evaporation totale |
real, intent(OUT):: evap(:) ! (knon) evaporation totale |
77 |
|
|
78 |
real, intent(OUT):: flux_t(:) ! (knon) flux de chaleur sensible |
real, intent(OUT):: flux_t(:) ! (knon) flux de chaleur sensible |
79 |
! (Cp T) à la surface, positif vers le bas, W / m2 |
! (Cp T) à la surface, positif vers le bas, W / m2 |
80 |
|
|
81 |
real, intent(OUT):: fluxlat(:) ! (knon) flux de chaleur latente |
real, intent(OUT):: fluxlat(:) ! (knon) flux de chaleur latente |
82 |
real, intent(OUT):: dflux_l(:), dflux_s(:) ! (knon) |
real, intent(OUT):: dflux_l(:), dflux_s(:) ! (knon) |
83 |
real, intent(OUT):: tsurf_new(:) ! (knon) temp\'erature au sol |
real, intent(OUT):: tsurf_new(:) ! (knon) temp\'erature au sol |
91 |
|
|
92 |
! Flux d'eau "perdue" par la surface et n\'ecessaire pour limiter la |
! Flux d'eau "perdue" par la surface et n\'ecessaire pour limiter la |
93 |
! hauteur de neige, en kg / m2 / s |
! hauteur de neige, en kg / m2 / s |
94 |
real, dimension(klon), intent(INOUT):: fqcalving |
real, intent(OUT):: fqcalving(:) ! (knon) |
95 |
|
|
96 |
! Flux thermique utiliser pour fondre la neige |
! Flux thermique utiliser pour fondre la neige |
97 |
real, dimension(klon), intent(INOUT):: ffonte |
real, dimension(klon), intent(INOUT):: ffonte |
107 |
integer ii |
integer ii |
108 |
real cal(size(knindex)) ! (knon) |
real cal(size(knindex)) ! (knon) |
109 |
real beta(size(knindex)) ! (knon) evap reelle |
real beta(size(knindex)) ! (knon) evap reelle |
110 |
real dif_grnd(klon), capsol(klon) |
real dif_grnd(klon) |
|
real, parameter:: calice = 1. / (5.1444e6 * 0.15), tau_gl = 86400. * 5. |
|
|
real, parameter:: calsno = 1. / (2.3867e6 * 0.15) |
|
111 |
real tsurf(size(knindex)) ! (knon) |
real tsurf(size(knindex)) ! (knon) |
112 |
real alb_neig(size(knindex)) ! (knon) |
real alb_neig(size(knindex)) ! (knon) |
113 |
real zfra(size(knindex)) ! (knon) |
real zfra(size(knindex)) ! (knon) |
114 |
REAL, PARAMETER:: fmagic = 1. ! facteur magique pour r\'egler l'alb\'edo |
REAL, PARAMETER:: fmagic = 1. ! facteur magique pour r\'egler l'alb\'edo |
115 |
|
REAL, PARAMETER:: max_eau_sol = 150. ! in kg m-2 |
116 |
|
REAL, PARAMETER:: tau_gl = 86400. * 5. |
117 |
|
|
118 |
!------------------------------------------------------------- |
!------------------------------------------------------------- |
119 |
|
|
120 |
knon = size(knindex) |
knon = size(knindex) |
121 |
|
|
122 |
! On doit commencer par appeler les schemas de surfaces continentales |
! On doit commencer par appeler les schemas de surfaces continentales |
123 |
! car l'ocean a besoin du ruissellement qui est y calcule |
! car l'ocean a besoin du ruissellement qui est y calcule |
124 |
|
|
144 |
! Initialisations diverses |
! Initialisations diverses |
145 |
|
|
146 |
ffonte(1:knon) = 0. |
ffonte(1:knon) = 0. |
|
fqcalving(1:knon) = 0. |
|
147 |
dif_grnd = 999999. |
dif_grnd = 999999. |
|
capsol = 999999. |
|
148 |
z0_new = 999999. |
z0_new = 999999. |
149 |
|
|
150 |
! Aiguillage vers les differents schemas de surface |
! Aiguillage vers les differents schemas de surface |
160 |
|
|
161 |
call interfsur_lim(dtime, julien, knindex, debut, albedo, z0_new) |
call interfsur_lim(dtime, julien, knindex, debut, albedo, z0_new) |
162 |
|
|
163 |
! Calcul de snow et qsurf, hydrologie adapt\'ee |
beta = min(2. * qsol / max_eau_sol, 1.) |
164 |
CALL calbeta(is_ter, snow, qsol, beta, capsol(:knon), dif_grnd(:knon)) |
dif_grnd(:knon) = 0. |
165 |
|
CALL soil(dtime, is_ter, snow, ts, tsoil, soilcap, soilflux) |
166 |
|
cal = RCPD / soilcap |
167 |
|
|
168 |
IF (soil_model) THEN |
CALL calcul_fluxs(dtime, ts, p1lay(:knon), cal, beta, tq_cdrag, & |
169 |
CALL soil(dtime, is_ter, snow, ts, tsoil, soilcap, soilflux) |
ps(:knon), qsurf(:knon), radsol + soilflux, dif_grnd(:knon), & |
|
cal = RCPD / soilcap |
|
|
radsol = radsol + soilflux |
|
|
ELSE |
|
|
cal = RCPD * capsol(:knon) |
|
|
ENDIF |
|
|
|
|
|
CALL calcul_fluxs(dtime, ts, p1lay(:knon), cal, beta, tq_cdrag(:knon), & |
|
|
ps(:knon), qsurf(:knon), radsol, dif_grnd(:knon), & |
|
170 |
temp_air(:knon), spechum(:knon), u1_lay, v1_lay, & |
temp_air(:knon), spechum(:knon), u1_lay, v1_lay, & |
171 |
petAcoef(:knon), peqAcoef(:knon), petBcoef(:knon), & |
petAcoef(:knon), peqAcoef(:knon), petBcoef(:knon), & |
172 |
peqBcoef(:knon), tsurf_new, evap, fluxlat, flux_t, dflux_s, dflux_l) |
peqBcoef(:knon), tsurf_new, evap, fluxlat, flux_t, dflux_s, dflux_l) |
173 |
CALL fonte_neige(is_ter, dtime, precip_rain(:knon), & |
CALL fonte_neige(is_ter, dtime, precip_rain(:knon), & |
174 |
precip_snow(:knon), snow, qsol, tsurf_new, evap, & |
precip_snow(:knon), snow, qsol, tsurf_new, evap, & |
175 |
fqcalving(:knon), ffonte(:knon), run_off_lic_0(:knon)) |
fqcalving, ffonte(:knon), run_off_lic_0(:knon)) |
176 |
|
|
177 |
call albsno(dtime, agesno, alb_neig, precip_snow(:knon)) |
call albsno(dtime, agesno, alb_neig, precip_snow(:knon)) |
178 |
where (snow < 0.0001) agesno = 0. |
where (snow < 0.0001) agesno = 0. |
187 |
beta = 1. |
beta = 1. |
188 |
dif_grnd = 0. |
dif_grnd = 0. |
189 |
call calcul_fluxs(dtime, tsurf, p1lay(:knon), cal, beta, & |
call calcul_fluxs(dtime, tsurf, p1lay(:knon), cal, beta, & |
190 |
tq_cdrag(:knon), ps(:knon), qsurf(:knon), radsol, & |
tq_cdrag, ps(:knon), qsurf(:knon), radsol, & |
191 |
dif_grnd(:knon), temp_air(:knon), spechum(:knon), u1_lay, & |
dif_grnd(:knon), temp_air(:knon), spechum(:knon), u1_lay, & |
192 |
v1_lay, petAcoef(:knon), peqAcoef(:knon), petBcoef(:knon), & |
v1_lay, petAcoef(:knon), peqAcoef(:knon), petBcoef(:knon), & |
193 |
peqBcoef(:knon), tsurf_new, evap, fluxlat, flux_t, dflux_s, dflux_l) |
peqBcoef(:knon), tsurf_new, evap, fluxlat, flux_t, dflux_s, dflux_l) |
194 |
agesno = 0. |
agesno = 0. |
195 |
albedo = alboc_cd(rmu0(knindex)) * fmagic |
albedo = alboc_cd(rmu0(knindex)) * fmagic |
196 |
z0_new = sqrt(rugos**2 + rugoro**2) |
z0_new = sqrt(rugos**2 + rugoro**2) |
197 |
|
fqcalving = 0. |
198 |
case (is_sic) |
case (is_sic) |
199 |
! Surface "glace de mer" appel a l'interface avec l'ocean |
! Surface "glace de mer" appel a l'interface avec l'ocean |
200 |
|
|
202 |
IF (pctsrf_new_sic(knindex(ii)) < EPSFRA) then |
IF (pctsrf_new_sic(knindex(ii)) < EPSFRA) then |
203 |
snow(ii) = 0. |
snow(ii) = 0. |
204 |
tsurf_new(ii) = RTT - 1.8 |
tsurf_new(ii) = RTT - 1.8 |
205 |
IF (soil_model) tsoil(ii, :) = RTT - 1.8 |
tsoil(ii, :) = RTT - 1.8 |
206 |
else |
else |
207 |
tsurf_new(ii) = ts(ii) |
tsurf_new(ii) = ts(ii) |
208 |
endif |
endif |
209 |
enddo |
enddo |
210 |
|
|
211 |
CALL calbeta(is_sic, snow, qsol, beta, capsol(:knon), dif_grnd(:knon)) |
CALL soil(dtime, is_sic, snow, tsurf_new, tsoil, soilcap, soilflux) |
212 |
|
cal = RCPD / soilcap |
213 |
IF (soil_model) THEN |
dif_grnd = 1. / tau_gl |
|
CALL soil(dtime, is_sic, snow, tsurf_new, tsoil, soilcap, & |
|
|
soilflux) |
|
|
cal = RCPD / soilcap |
|
|
radsol = radsol + soilflux |
|
|
dif_grnd = 0. |
|
|
ELSE |
|
|
dif_grnd = 1. / tau_gl |
|
|
cal = RCPD * calice |
|
|
WHERE (snow > 0.) cal = RCPD * calsno |
|
|
ENDIF |
|
214 |
tsurf = tsurf_new |
tsurf = tsurf_new |
215 |
beta = 1. |
beta = 1. |
216 |
|
|
217 |
CALL calcul_fluxs(dtime, tsurf, p1lay(:knon), cal, beta, & |
CALL calcul_fluxs(dtime, tsurf, p1lay(:knon), cal, beta, & |
218 |
tq_cdrag(:knon), ps(:knon), qsurf(:knon), radsol, & |
tq_cdrag, ps(:knon), qsurf(:knon), radsol + soilflux, & |
219 |
dif_grnd(:knon), temp_air(:knon), spechum(:knon), u1_lay, & |
dif_grnd(:knon), temp_air(:knon), spechum(:knon), u1_lay, & |
220 |
v1_lay, petAcoef(:knon), peqAcoef(:knon), petBcoef(:knon), & |
v1_lay, petAcoef(:knon), peqAcoef(:knon), petBcoef(:knon), & |
221 |
peqBcoef(:knon), tsurf_new, evap, fluxlat, flux_t, dflux_s, dflux_l) |
peqBcoef(:knon), tsurf_new, evap, fluxlat, flux_t, dflux_s, dflux_l) |
222 |
CALL fonte_neige(is_sic, dtime, precip_rain(:knon), & |
CALL fonte_neige(is_sic, dtime, precip_rain(:knon), & |
223 |
precip_snow(:knon), snow, qsol, tsurf_new, evap, & |
precip_snow(:knon), snow, qsol, tsurf_new, evap, & |
224 |
fqcalving(:knon), ffonte(:knon), run_off_lic_0(:knon)) |
fqcalving, ffonte(:knon), run_off_lic_0(:knon)) |
225 |
|
|
226 |
! Compute the albedo: |
! Compute the albedo: |
227 |
|
|
234 |
case (is_lic) |
case (is_lic) |
235 |
! Surface "glacier continentaux" appel a l'interface avec le sol |
! Surface "glacier continentaux" appel a l'interface avec le sol |
236 |
|
|
237 |
IF (soil_model) THEN |
CALL soil(dtime, is_lic, snow, ts, tsoil, soilcap, soilflux) |
238 |
CALL soil(dtime, is_lic, snow, ts, tsoil, soilcap, soilflux) |
cal = RCPD / soilcap |
|
cal = RCPD / soilcap |
|
|
radsol = radsol + soilflux |
|
|
ELSE |
|
|
cal = RCPD * calice |
|
|
WHERE (snow > 0.) cal = RCPD * calsno |
|
|
ENDIF |
|
239 |
beta = 1. |
beta = 1. |
240 |
dif_grnd = 0. |
dif_grnd = 0. |
241 |
|
|
242 |
call calcul_fluxs(dtime, ts, p1lay(:knon), cal, beta, tq_cdrag(:knon), & |
call calcul_fluxs(dtime, ts, p1lay(:knon), cal, beta, tq_cdrag, & |
243 |
ps(:knon), qsurf(:knon), radsol, dif_grnd(:knon), & |
ps(:knon), qsurf(:knon), radsol + soilflux, dif_grnd(:knon), & |
244 |
temp_air(:knon), spechum(:knon), u1_lay, v1_lay, & |
temp_air(:knon), spechum(:knon), u1_lay, v1_lay, & |
245 |
petAcoef(:knon), peqAcoef(:knon), petBcoef(:knon), & |
petAcoef(:knon), peqAcoef(:knon), petBcoef(:knon), & |
246 |
peqBcoef(:knon), tsurf_new, evap, fluxlat, flux_t, dflux_s, dflux_l) |
peqBcoef(:knon), tsurf_new, evap, fluxlat, flux_t, dflux_s, dflux_l) |
247 |
call fonte_neige(is_lic, dtime, precip_rain(:knon), & |
call fonte_neige(is_lic, dtime, precip_rain(:knon), & |
248 |
precip_snow(:knon), snow, qsol, tsurf_new, evap, & |
precip_snow(:knon), snow, qsol, tsurf_new, evap, & |
249 |
fqcalving(:knon), ffonte(:knon), run_off_lic_0(:knon)) |
fqcalving, ffonte(:knon), run_off_lic_0(:knon)) |
250 |
|
|
251 |
! calcul albedo |
! calcul albedo |
252 |
CALL albsno(dtime, agesno, alb_neig, precip_snow(:knon)) |
CALL albsno(dtime, agesno, alb_neig, precip_snow(:knon)) |