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 |
24 |
USE dimphy, ONLY: klon |
USE dimphy, ONLY: klon |
25 |
USE fonte_neige_m, ONLY: fonte_neige |
USE fonte_neige_m, ONLY: fonte_neige |
48 |
|
|
49 |
real, intent(IN):: u1_lay(:), v1_lay(:) ! (knon) vitesse 1ere couche |
real, intent(IN):: u1_lay(:), v1_lay(:) ! (knon) vitesse 1ere couche |
50 |
|
|
51 |
real, dimension(klon), intent(IN):: temp_air, spechum |
real, intent(IN):: temp_air(:) ! (knon) temperature de l'air 1ere couche |
52 |
! temp_air temperature de l'air 1ere couche |
real, intent(IN):: spechum(:) ! (knon) humidite specifique 1ere couche |
|
! spechum humidite specifique 1ere couche |
|
53 |
real, intent(IN):: tq_cdrag(:) ! (knon) coefficient d'echange |
real, intent(IN):: tq_cdrag(:) ! (knon) coefficient d'echange |
54 |
|
|
55 |
real, dimension(klon), intent(IN):: petAcoef, peqAcoef |
real, intent(IN):: petAcoef(:), peqAcoef(:) ! (knon) |
56 |
! 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 |
57 |
|
|
58 |
real, dimension(klon), intent(IN):: petBcoef, peqBcoef |
real, intent(IN):: petBcoef(:), peqBcoef(:) ! (knon) |
59 |
! coefficients B de la r\'esolution de la couche limite pour t et q |
! coefficients B de la r\'esolution de la couche limite pour t et q |
60 |
|
|
61 |
real, intent(IN):: precip_rain(klon) |
real, intent(IN):: precip_rain(klon) |
69 |
real, intent(INOUT):: snow(:) ! (knon) |
real, intent(INOUT):: snow(:) ! (knon) |
70 |
real, intent(INOUT):: qsurf(klon) |
real, intent(INOUT):: qsurf(klon) |
71 |
real, intent(IN):: ts(:) ! (knon) temp\'erature de surface |
real, intent(IN):: ts(:) ! (knon) temp\'erature de surface |
72 |
real, intent(IN):: p1lay(klon) ! pression 1er niveau (milieu de couche) |
real, intent(IN):: p1lay(:) ! (knon) pression 1er niveau (milieu de couche) |
73 |
real, dimension(klon), intent(IN):: ps ! pression au sol |
real, intent(IN):: ps(:) ! (knon) pression au sol |
74 |
REAL, INTENT(IN):: radsol(:) ! (knon) rayonnement net au sol (LW + SW) |
REAL, INTENT(IN):: radsol(:) ! (knon) rayonnement net au sol (LW + SW) |
75 |
real, intent(OUT):: evap(:) ! (knon) evaporation totale |
real, intent(OUT):: evap(:) ! (knon) evaporation totale |
76 |
|
|
90 |
|
|
91 |
! 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 |
92 |
! hauteur de neige, en kg / m2 / s |
! hauteur de neige, en kg / m2 / s |
93 |
real, dimension(klon), intent(INOUT):: fqcalving |
real, intent(OUT):: fqcalving(:) ! (knon) |
94 |
|
|
95 |
! Flux thermique utiliser pour fondre la neige |
! Flux thermique utiliser pour fondre la neige |
96 |
real, dimension(klon), intent(INOUT):: ffonte |
real, dimension(klon), intent(INOUT):: ffonte |
106 |
integer ii |
integer ii |
107 |
real cal(size(knindex)) ! (knon) |
real cal(size(knindex)) ! (knon) |
108 |
real beta(size(knindex)) ! (knon) evap reelle |
real beta(size(knindex)) ! (knon) evap reelle |
109 |
real dif_grnd(klon), capsol(klon) |
real dif_grnd(klon) |
110 |
real tsurf(size(knindex)) ! (knon) |
real tsurf(size(knindex)) ! (knon) |
111 |
real alb_neig(size(knindex)) ! (knon) |
real alb_neig(size(knindex)) ! (knon) |
112 |
real zfra(size(knindex)) ! (knon) |
real zfra(size(knindex)) ! (knon) |
113 |
REAL, PARAMETER:: fmagic = 1. ! facteur magique pour r\'egler l'alb\'edo |
REAL, PARAMETER:: fmagic = 1. ! facteur magique pour r\'egler l'alb\'edo |
114 |
|
REAL, PARAMETER:: max_eau_sol = 150. ! in kg m-2 |
115 |
|
REAL, PARAMETER:: tau_gl = 86400. * 5. |
116 |
|
|
117 |
!------------------------------------------------------------- |
!------------------------------------------------------------- |
118 |
|
|
143 |
! Initialisations diverses |
! Initialisations diverses |
144 |
|
|
145 |
ffonte(1:knon) = 0. |
ffonte(1:knon) = 0. |
|
fqcalving(1:knon) = 0. |
|
146 |
dif_grnd = 999999. |
dif_grnd = 999999. |
|
capsol = 999999. |
|
147 |
z0_new = 999999. |
z0_new = 999999. |
148 |
|
|
149 |
! Aiguillage vers les differents schemas de surface |
! Aiguillage vers les differents schemas de surface |
159 |
|
|
160 |
call interfsur_lim(dtime, julien, knindex, debut, albedo, z0_new) |
call interfsur_lim(dtime, julien, knindex, debut, albedo, z0_new) |
161 |
|
|
162 |
! Calcul de snow et qsurf, hydrologie adapt\'ee |
beta = min(2. * qsol / max_eau_sol, 1.) |
163 |
CALL calbeta(is_ter, snow, qsol, beta, capsol(:knon), dif_grnd(:knon)) |
dif_grnd(:knon) = 0. |
|
|
|
164 |
CALL soil(dtime, is_ter, snow, ts, tsoil, soilcap, soilflux) |
CALL soil(dtime, is_ter, snow, ts, tsoil, soilcap, soilflux) |
165 |
cal = RCPD / soilcap |
cal = RCPD / soilcap |
166 |
|
|
167 |
CALL calcul_fluxs(dtime, ts, p1lay(:knon), cal, beta, tq_cdrag, & |
CALL calcul_fluxs(dtime, ts, p1lay, cal, beta, tq_cdrag, ps, & |
168 |
ps(:knon), qsurf(:knon), radsol + soilflux, dif_grnd(:knon), & |
qsurf(:knon), radsol + soilflux, dif_grnd(:knon), temp_air, & |
169 |
temp_air(:knon), spechum(:knon), u1_lay, v1_lay, & |
spechum, u1_lay, v1_lay, petAcoef, peqAcoef, petBcoef, & |
170 |
petAcoef(:knon), peqAcoef(:knon), petBcoef(:knon), & |
peqBcoef, tsurf_new, evap, fluxlat, flux_t, dflux_s, dflux_l) |
171 |
peqBcoef(:knon), tsurf_new, evap, fluxlat, flux_t, dflux_s, dflux_l) |
CALL fonte_neige(is_ter, dtime, precip_rain(:knon), precip_snow(:knon), & |
172 |
CALL fonte_neige(is_ter, dtime, precip_rain(:knon), & |
snow, qsol, tsurf_new, evap, fqcalving, ffonte(:knon), & |
173 |
precip_snow(:knon), snow, qsol, tsurf_new, evap, & |
run_off_lic_0(:knon)) |
|
fqcalving(:knon), ffonte(:knon), run_off_lic_0(:knon)) |
|
174 |
|
|
175 |
call albsno(dtime, agesno, alb_neig, precip_snow(:knon)) |
call albsno(dtime, agesno, alb_neig, precip_snow(:knon)) |
176 |
where (snow < 0.0001) agesno = 0. |
where (snow < 0.0001) agesno = 0. |
184 |
cal = 0. |
cal = 0. |
185 |
beta = 1. |
beta = 1. |
186 |
dif_grnd = 0. |
dif_grnd = 0. |
187 |
call calcul_fluxs(dtime, tsurf, p1lay(:knon), cal, beta, & |
call calcul_fluxs(dtime, tsurf, p1lay, cal, beta, tq_cdrag, ps, & |
188 |
tq_cdrag, ps(:knon), qsurf(:knon), radsol, & |
qsurf(:knon), radsol, dif_grnd(:knon), temp_air, spechum, u1_lay, & |
189 |
dif_grnd(:knon), temp_air(:knon), spechum(:knon), u1_lay, & |
v1_lay, petAcoef, peqAcoef, petBcoef, peqBcoef, tsurf_new, evap, & |
190 |
v1_lay, petAcoef(:knon), peqAcoef(:knon), petBcoef(:knon), & |
fluxlat, flux_t, dflux_s, dflux_l) |
|
peqBcoef(:knon), tsurf_new, evap, fluxlat, flux_t, dflux_s, dflux_l) |
|
191 |
agesno = 0. |
agesno = 0. |
192 |
albedo = alboc_cd(rmu0(knindex)) * fmagic |
albedo = alboc_cd(rmu0(knindex)) * fmagic |
193 |
z0_new = sqrt(rugos**2 + rugoro**2) |
z0_new = sqrt(rugos**2 + rugoro**2) |
194 |
|
fqcalving = 0. |
195 |
case (is_sic) |
case (is_sic) |
196 |
! Surface "glace de mer" appel a l'interface avec l'ocean |
! Surface "glace de mer" appel a l'interface avec l'ocean |
197 |
|
|
205 |
endif |
endif |
206 |
enddo |
enddo |
207 |
|
|
|
CALL calbeta(is_sic, snow, qsol, beta, capsol(:knon), dif_grnd(:knon)) |
|
208 |
CALL soil(dtime, is_sic, snow, tsurf_new, tsoil, soilcap, soilflux) |
CALL soil(dtime, is_sic, snow, tsurf_new, tsoil, soilcap, soilflux) |
209 |
cal = RCPD / soilcap |
cal = RCPD / soilcap |
210 |
dif_grnd = 0. |
dif_grnd = 1. / tau_gl |
211 |
tsurf = tsurf_new |
tsurf = tsurf_new |
212 |
beta = 1. |
beta = 1. |
213 |
|
|
214 |
CALL calcul_fluxs(dtime, tsurf, p1lay(:knon), cal, beta, & |
CALL calcul_fluxs(dtime, tsurf, p1lay, cal, beta, tq_cdrag, ps, & |
215 |
tq_cdrag, ps(:knon), qsurf(:knon), radsol + soilflux, & |
qsurf(:knon), radsol + soilflux, dif_grnd(:knon), temp_air, & |
216 |
dif_grnd(:knon), temp_air(:knon), spechum(:knon), u1_lay, & |
spechum, u1_lay, v1_lay, petAcoef, peqAcoef, petBcoef, & |
217 |
v1_lay, petAcoef(:knon), peqAcoef(:knon), petBcoef(:knon), & |
peqBcoef, tsurf_new, evap, fluxlat, flux_t, dflux_s, dflux_l) |
|
peqBcoef(:knon), tsurf_new, evap, fluxlat, flux_t, dflux_s, dflux_l) |
|
218 |
CALL fonte_neige(is_sic, dtime, precip_rain(:knon), & |
CALL fonte_neige(is_sic, dtime, precip_rain(:knon), & |
219 |
precip_snow(:knon), snow, qsol, tsurf_new, evap, & |
precip_snow(:knon), snow, qsol, tsurf_new, evap, & |
220 |
fqcalving(:knon), ffonte(:knon), run_off_lic_0(:knon)) |
fqcalving, ffonte(:knon), run_off_lic_0(:knon)) |
221 |
|
|
222 |
! Compute the albedo: |
! Compute the albedo: |
223 |
|
|
235 |
beta = 1. |
beta = 1. |
236 |
dif_grnd = 0. |
dif_grnd = 0. |
237 |
|
|
238 |
call calcul_fluxs(dtime, ts, p1lay(:knon), cal, beta, tq_cdrag, & |
call calcul_fluxs(dtime, ts, p1lay, cal, beta, tq_cdrag, ps, & |
239 |
ps(:knon), qsurf(:knon), radsol + soilflux, dif_grnd(:knon), & |
qsurf(:knon), radsol + soilflux, dif_grnd(:knon), temp_air, & |
240 |
temp_air(:knon), spechum(:knon), u1_lay, v1_lay, & |
spechum, u1_lay, v1_lay, petAcoef, peqAcoef, petBcoef, & |
241 |
petAcoef(:knon), peqAcoef(:knon), petBcoef(:knon), & |
peqBcoef, tsurf_new, evap, fluxlat, flux_t, dflux_s, dflux_l) |
|
peqBcoef(:knon), tsurf_new, evap, fluxlat, flux_t, dflux_s, dflux_l) |
|
242 |
call fonte_neige(is_lic, dtime, precip_rain(:knon), & |
call fonte_neige(is_lic, dtime, precip_rain(:knon), & |
243 |
precip_snow(:knon), snow, qsol, tsurf_new, evap, & |
precip_snow(:knon), snow, qsol, tsurf_new, evap, & |
244 |
fqcalving(:knon), ffonte(:knon), run_off_lic_0(:knon)) |
fqcalving, ffonte(:knon), run_off_lic_0(:knon)) |
245 |
|
|
246 |
! calcul albedo |
! calcul albedo |
247 |
CALL albsno(dtime, agesno, alb_neig, precip_snow(:knon)) |
CALL albsno(dtime, agesno, alb_neig, precip_snow(:knon)) |