4 |
|
|
5 |
contains |
contains |
6 |
|
|
7 |
SUBROUTINE interfsurf_hq(itime, dtime, jour, rmu0, nisurf, knon, knindex, & |
SUBROUTINE interfsurf_hq(julien, mu0, nisurf, knindex, tsoil, qsol, u1lay, & |
8 |
pctsrf, rlat, debut, nsoilmx, tsoil, qsol, u1_lay, v1_lay, temp_air, & |
v1lay, temp_air, q1lay, cdragh, tAcoef, qAcoef, tBcoef, qBcoef, & |
9 |
spechum, tq_cdrag, petAcoef, peqAcoef, petBcoef, peqBcoef, & |
rain_fall, snow_fall, rugos, rugoro, snow, qsurf, ts, p1lay, ps, & |
10 |
precip_rain, precip_snow, fder, rugos, rugoro, snow, qsurf, tsurf, & |
radsol, evap, flux_t, fluxlat, dflux_l, dflux_s, tsurf_new, albedo, & |
11 |
p1lay, ps, radsol, evap, fluxsens, fluxlat, dflux_l, dflux_s, & |
z0_new, pctsrf_new_sic, agesno, fqcalving, ffonte, run_off_lic_0, & |
12 |
tsurf_new, alb_new, alblw, z0_new, pctsrf_new, agesno, fqcalving, & |
run_off_lic) |
13 |
ffonte, run_off_lic_0, flux_o, flux_g) |
|
14 |
|
! Cette routine sert d'aiguillage entre l'atmosph\`ere et la surface |
15 |
! Cette routine sert d'aiguillage entre l'atmosphère et la surface |
! en g\'en\'eral (sols continentaux, oc\'eans, glaces) pour les flux de |
16 |
! en général (sols continentaux, océans, glaces) pour les flux de |
! chaleur et d'humidit\'e. |
|
! chaleur et d'humidité. |
|
17 |
|
|
18 |
! Laurent Fairhead, February 2000 |
! Laurent Fairhead, February 2000 |
19 |
|
|
20 |
USE abort_gcm_m, ONLY: abort_gcm |
USE abort_gcm_m, ONLY: abort_gcm |
21 |
|
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 |
|
|
USE dimphy, ONLY: klon |
|
24 |
USE fonte_neige_m, ONLY: fonte_neige |
USE fonte_neige_m, ONLY: fonte_neige |
25 |
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 |
|
USE interface_surf, ONLY: run_off, run_off_lic, conf_interface |
|
|
USE interfoce_lim_m, ONLY: interfoce_lim |
|
26 |
USE interfsur_lim_m, ONLY: interfsur_lim |
USE interfsur_lim_m, ONLY: interfsur_lim |
27 |
|
use limit_read_sst_m, only: limit_read_sst |
28 |
use soil_m, only: soil |
use soil_m, only: soil |
29 |
USE suphec_m, ONLY: rcpd, rlstt, rlvtt, rtt |
USE suphec_m, ONLY: rcpd, rtt |
30 |
|
|
31 |
integer, intent(IN):: itime ! numero du pas de temps |
integer, intent(IN):: julien ! jour dans l'annee en cours |
32 |
real, intent(IN):: dtime ! pas de temps de la physique (en s) |
real, intent(IN):: mu0(:) ! (knon) cosinus de l'angle solaire zenithal |
|
integer, intent(IN):: jour ! jour dans l'annee en cours |
|
|
real, intent(IN):: rmu0(klon) ! cosinus de l'angle solaire zenithal |
|
33 |
integer, intent(IN):: nisurf ! index de la surface a traiter |
integer, intent(IN):: nisurf ! index de la surface a traiter |
|
integer, intent(IN):: knon ! nombre de points de la surface a traiter |
|
34 |
|
|
35 |
integer, intent(in):: knindex(:) ! (knon) |
integer, intent(in):: knindex(:) ! (knon) |
36 |
! index des points de la surface a traiter |
! index des points de la surface a traiter |
37 |
|
|
38 |
real, intent(IN):: pctsrf(klon, nbsrf) |
REAL, intent(inout):: tsoil(:, :) ! (knon, nsoilmx) |
|
! tableau des pourcentages de surface de chaque maille |
|
39 |
|
|
40 |
real, intent(IN):: rlat(klon) ! latitudes |
REAL, intent(INOUT):: qsol(:) ! (knon) |
41 |
|
! column-density of water in soil, in kg m-2 |
42 |
|
|
43 |
logical, intent(IN):: debut ! 1er appel a la physique |
real, intent(IN):: u1lay(:), v1lay(:) ! (knon) vitesse 1ere couche |
|
! (si false calcul simplifie des fluxs sur les continents) |
|
44 |
|
|
45 |
integer, intent(in):: nsoilmx |
real, intent(IN):: temp_air(:) ! (knon) temperature de l'air 1ere couche |
|
REAL tsoil(klon, nsoilmx) |
|
46 |
|
|
47 |
REAL, intent(INOUT):: qsol(klon) |
real, intent(IN):: q1lay(:) ! (knon) |
48 |
! column-density of water in soil, in kg m-2 |
! humidit\'e sp\'ecifique de la premi\`ere couche |
49 |
|
|
50 |
real, dimension(klon), intent(IN):: u1_lay, v1_lay |
real, intent(IN):: cdragh(:) ! (knon) coefficient d'echange |
|
! u1_lay vitesse u 1ere couche |
|
|
! v1_lay vitesse v 1ere couche |
|
|
real, dimension(klon), intent(IN):: temp_air, spechum |
|
|
! temp_air temperature de l'air 1ere couche |
|
|
! spechum humidite specifique 1ere couche |
|
|
real, dimension(klon), intent(INOUT):: tq_cdrag |
|
|
! tq_cdrag cdrag |
|
|
real, dimension(klon), intent(IN):: petAcoef, peqAcoef |
|
|
! petAcoef coeff. A de la resolution de la CL pour t |
|
|
! peqAcoef coeff. A de la resolution de la CL pour q |
|
|
real, dimension(klon), intent(IN):: petBcoef, peqBcoef |
|
|
! petBcoef coeff. B de la resolution de la CL pour t |
|
|
! peqBcoef coeff. B de la resolution de la CL pour q |
|
|
|
|
|
real, intent(IN):: precip_rain(klon) |
|
|
! precipitation, liquid water mass flux (kg/m2/s), positive down |
|
|
|
|
|
real, intent(IN):: precip_snow(klon) |
|
|
! precipitation, solid water mass flux (kg/m2/s), positive down |
|
|
|
|
|
REAL, DIMENSION(klon), INTENT(INOUT):: fder |
|
|
! fder derivee des flux (pour le couplage) |
|
|
real, dimension(klon), intent(IN):: rugos, rugoro |
|
|
! rugos rugosite |
|
|
! rugoro rugosite orographique |
|
|
real, intent(INOUT):: snow(klon), qsurf(klon) |
|
|
real, intent(IN):: tsurf(:) ! (knon) température de surface |
|
|
real, dimension(klon), intent(IN):: p1lay |
|
|
! p1lay pression 1er niveau (milieu de couche) |
|
|
real, dimension(klon), intent(IN):: ps |
|
|
! ps pression au sol |
|
|
REAL, DIMENSION(klon), INTENT(INOUT):: radsol |
|
|
! radsol rayonnement net aus sol (LW + SW) |
|
|
real, intent(INOUT):: evap(klon) ! evaporation totale |
|
|
real, dimension(klon), intent(OUT):: fluxsens, fluxlat |
|
|
! fluxsens flux de chaleur sensible |
|
|
! fluxlat flux de chaleur latente |
|
|
real, dimension(klon), intent(OUT):: dflux_l, dflux_s |
|
|
real, intent(OUT):: tsurf_new(knon) ! température au sol |
|
|
real, intent(OUT):: alb_new(klon) ! albedo |
|
|
real, dimension(klon), intent(OUT):: alblw |
|
|
real, dimension(klon), intent(OUT):: z0_new |
|
|
! z0_new surface roughness |
|
|
real, dimension(klon, nbsrf), intent(OUT):: pctsrf_new |
|
|
! pctsrf_new nouvelle repartition des surfaces |
|
|
real, dimension(klon), intent(INOUT):: agesno |
|
|
|
|
|
! Flux d'eau "perdue" par la surface et nécessaire pour que limiter la |
|
|
! hauteur de neige, en kg/m2/s |
|
|
!jld a rajouter real, dimension(klon), intent(INOUT):: fqcalving |
|
|
real, dimension(klon), intent(INOUT):: fqcalving |
|
|
|
|
|
! Flux thermique utiliser pour fondre la neige |
|
|
!jld a rajouter real, dimension(klon), intent(INOUT):: ffonte |
|
|
real, dimension(klon), intent(INOUT):: ffonte |
|
51 |
|
|
52 |
real, dimension(klon), intent(INOUT):: run_off_lic_0 |
real, intent(IN):: tAcoef(:), qAcoef(:) ! (knon) |
53 |
! run_off_lic_0 runoff glacier du pas de temps precedent |
! coefficients A de la r\'esolution de la couche limite pour t et q |
54 |
|
|
55 |
!IM: "slab" ocean |
real, intent(IN):: tBcoef(:), qBcoef(:) ! (knon) |
56 |
real, dimension(klon), intent(OUT):: flux_o, flux_g |
! coefficients B de la r\'esolution de la couche limite pour t et q |
57 |
|
|
58 |
! Local: |
real, intent(IN):: rain_fall(:) ! (knon) |
59 |
|
! precipitation, liquid water mass flux (kg / m2 / s), positive down |
60 |
|
|
61 |
REAL, dimension(klon):: soilcap |
real, intent(IN):: snow_fall(:) ! (knon) |
62 |
REAL, dimension(klon):: soilflux |
! precipitation, solid water mass flux (kg / m2 / s), positive down |
63 |
|
|
64 |
!IM: "slab" ocean |
real, intent(IN):: rugos(:) ! (knon) rugosite |
65 |
real, parameter:: t_grnd=271.35 |
real, intent(IN):: rugoro(:) ! (knon) rugosite orographique |
66 |
real, dimension(klon):: zx_sl |
real, intent(INOUT):: snow(:) ! (knon) |
67 |
integer i |
real, intent(OUT):: qsurf(:) ! (knon) |
68 |
|
real, intent(IN):: ts(:) ! (knon) temp\'erature de surface |
69 |
character (len = 20), save:: modname = 'interfsurf_hq' |
real, intent(IN):: p1lay(:) ! (knon) pression 1er niveau (milieu de couche) |
70 |
character (len = 80):: abort_message |
real, intent(IN):: ps(:) ! (knon) pression au sol, en Pa |
|
logical, save:: first_call = .true. |
|
|
integer:: ii |
|
|
real, dimension(klon):: cal, beta, dif_grnd, capsol |
|
|
real, parameter:: calice=1.0/(5.1444e6 * 0.15), tau_gl=86400.*5. |
|
|
real, parameter:: calsno=1./(2.3867e6 * 0.15) |
|
|
real tsurf_temp(knon) |
|
|
real, dimension(klon):: alb_neig, alb_eau |
|
|
real, DIMENSION(klon):: zfra |
|
|
INTEGER, dimension(1):: iloc |
|
|
real, dimension(klon):: fder_prev |
|
71 |
|
|
72 |
!------------------------------------------------------------- |
REAL, INTENT(IN):: radsol(:) ! (knon) |
73 |
|
! surface net downward radiative flux, in W / m2 |
74 |
|
|
75 |
|
real, intent(OUT):: evap(:) ! (knon) evaporation totale |
76 |
|
|
77 |
|
real, intent(OUT):: flux_t(:) ! (knon) flux de chaleur sensible |
78 |
|
! (Cp T) Ã la surface, positif vers le bas, W / m2 |
79 |
|
|
80 |
|
real, intent(OUT):: fluxlat(:) ! (knon) flux de chaleur latente, en W m-2 |
81 |
|
real, intent(OUT):: dflux_l(:), dflux_s(:) ! (knon) |
82 |
|
real, intent(OUT):: tsurf_new(:) ! (knon) temp\'erature au sol |
83 |
|
real, intent(OUT):: albedo(:) ! (knon) albedo |
84 |
|
real, intent(OUT):: z0_new(:) ! (knon) surface roughness |
85 |
|
|
86 |
|
real, intent(in):: pctsrf_new_sic(:) ! (knon) |
87 |
|
! nouvelle repartition des surfaces |
88 |
|
|
89 |
! On doit commencer par appeler les schemas de surfaces continentales |
real, intent(INOUT):: agesno(:) ! (knon) |
|
! car l'ocean a besoin du ruissellement qui est y calcule |
|
90 |
|
|
91 |
if (first_call) then |
real, intent(OUT):: fqcalving(:) ! (knon) |
92 |
call conf_interface |
! Flux d'eau "perdue" par la surface et n\'ecessaire pour limiter la |
93 |
if (nisurf /= is_ter .and. klon > 1) then |
! hauteur de neige, en kg / m2 / s |
|
print *, ' Warning:' |
|
|
print *, ' nisurf = ', nisurf, ' /= is_ter = ', is_ter |
|
|
print *, 'or on doit commencer par les surfaces continentales' |
|
|
abort_message='voir ci-dessus' |
|
|
call abort_gcm(modname, abort_message, 1) |
|
|
endif |
|
|
if (is_oce > is_sic) then |
|
|
print *, 'Warning:' |
|
|
print *, ' Pour des raisons de sequencement dans le code' |
|
|
print *, ' l''ocean doit etre traite avant la banquise' |
|
|
print *, ' or is_oce = ', is_oce, '> is_sic = ', is_sic |
|
|
abort_message='voir ci-dessus' |
|
|
call abort_gcm(modname, abort_message, 1) |
|
|
endif |
|
|
endif |
|
|
first_call = .false. |
|
|
|
|
|
! Initialisations diverses |
|
|
|
|
|
ffonte(1:knon)=0. |
|
|
fqcalving(1:knon)=0. |
|
|
cal = 999999. |
|
|
beta = 999999. |
|
|
dif_grnd = 999999. |
|
|
capsol = 999999. |
|
|
alb_new = 999999. |
|
|
z0_new = 999999. |
|
|
alb_neig = 999999. |
|
|
tsurf_new = 999999. |
|
|
alblw = 999999. |
|
|
|
|
|
!IM: "slab" ocean; initialisations |
|
|
flux_o = 0. |
|
|
flux_g = 0. |
|
94 |
|
|
95 |
! Aiguillage vers les differents schemas de surface |
real, intent(OUT):: ffonte(:) ! (knon) |
96 |
|
! flux thermique utilis\'e pour fondre la neige |
97 |
|
|
98 |
|
real, intent(INOUT):: run_off_lic_0(:) ! (knon) |
99 |
|
! run_off_lic_0 runoff glacier du pas de temps precedent |
100 |
|
|
101 |
|
REAL, intent(OUT):: run_off_lic(:) ! (knon) ruissellement total |
102 |
|
|
103 |
|
! Local: |
104 |
|
REAL soilcap(size(knindex)) ! (knon) |
105 |
|
REAL soilflux(size(knindex)) ! (knon) |
106 |
|
integer ii |
107 |
|
real cal(size(knindex)) ! (knon) |
108 |
|
real beta(size(knindex)) ! (knon) evap reelle |
109 |
|
real tsurf(size(knindex)) ! (knon) |
110 |
|
real alb_neig(size(knindex)) ! (knon) |
111 |
|
real zfra(size(knindex)) ! (knon) |
112 |
|
REAL, PARAMETER:: fmagic = 1. ! facteur magique pour r\'egler l'alb\'edo |
113 |
|
REAL, PARAMETER:: max_eau_sol = 150. ! in kg m-2 |
114 |
|
REAL, PARAMETER:: tau_gl = 86400. * 5. |
115 |
|
|
116 |
|
!------------------------------------------------------------- |
117 |
|
|
118 |
select case (nisurf) |
select case (nisurf) |
119 |
case (is_ter) |
case (is_ter) |
120 |
! Surface "terre" appel a l'interface avec les sols continentaux |
! Surface "terre", appel \`a l'interface avec les sols continentaux |
|
|
|
|
! allocation du run-off |
|
|
if (.not. allocated(run_off)) then |
|
|
allocate(run_off(knon)) |
|
|
run_off = 0. |
|
|
else if (size(run_off) /= knon) then |
|
|
print *, 'Bizarre, le nombre de points continentaux' |
|
|
print *, 'a change entre deux appels. J''arrete ' |
|
|
abort_message='voir ci-dessus' |
|
|
call abort_gcm(modname, abort_message, 1) |
|
|
endif |
|
121 |
|
|
122 |
! Calcul age de la neige |
! Calcul age de la neige |
123 |
|
|
124 |
! calcul albedo: lecture albedo fichier boundary conditions |
! Read albedo from the file containing boundary conditions then |
125 |
! puis ajout albedo neige |
! add the albedo of snow: |
126 |
call interfsur_lim(itime, dtime, jour, nisurf, knindex, debut, & |
|
127 |
alb_new, z0_new) |
call interfsur_lim(julien, knindex, albedo, z0_new) |
|
|
|
|
! calcul snow et qsurf, hydrol adapté |
|
|
CALL calbeta(nisurf, snow(:knon), qsol(:knon), beta(:knon), & |
|
|
capsol(:knon), dif_grnd(:knon)) |
|
|
|
|
|
IF (soil_model) THEN |
|
|
CALL soil(dtime, nisurf, knon, snow, tsurf, tsoil, soilcap, soilflux) |
|
|
cal(1:knon) = RCPD / soilcap(1:knon) |
|
|
radsol(1:knon) = radsol(1:knon) + soilflux(:knon) |
|
|
ELSE |
|
|
cal = RCPD * capsol |
|
|
ENDIF |
|
|
CALL calcul_fluxs(nisurf, dtime, tsurf, p1lay(:knon), cal(:knon), beta(:knon), & |
|
|
tq_cdrag(:knon), ps(:knon), qsurf(:knon), radsol(:knon), & |
|
|
dif_grnd(:knon), temp_air(:knon), spechum(:knon), u1_lay(:knon), v1_lay(:knon), petAcoef(:knon), peqAcoef(:knon), & |
|
|
petBcoef(:knon), peqBcoef(:knon), tsurf_new, evap(:knon), fluxlat(:knon), fluxsens(:knon), dflux_s(:knon), & |
|
|
dflux_l(:knon)) |
|
|
|
|
|
CALL fonte_neige(nisurf, dtime, tsurf, p1lay(:knon), beta(:knon), & |
|
|
tq_cdrag(:knon), ps(:knon), precip_rain(:knon), precip_snow(:knon), snow(:knon), qsol(:knon), & |
|
|
temp_air(:knon), spechum(:knon), u1_lay(:knon), v1_lay(:knon), petAcoef(:knon), peqAcoef(:knon), petBcoef(:knon), & |
|
|
peqBcoef(:knon), tsurf_new, evap(:knon), fqcalving(:knon), ffonte(:knon), run_off_lic_0(:knon)) |
|
|
|
|
|
call albsno(klon, knon, dtime, agesno, alb_neig, precip_snow) |
|
|
where (snow(1 : knon) < 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) + & |
|
|
alb_new(1 : knon)*(1.0-zfra(1:knon)) |
|
|
z0_new = sqrt(z0_new**2 + rugoro**2) |
|
|
alblw(1 : knon) = alb_new(1 : knon) |
|
128 |
|
|
129 |
! Remplissage des pourcentages de surface |
beta = min(2. * qsol / max_eau_sol, 1.) |
130 |
pctsrf_new(:, nisurf) = pctsrf(:, nisurf) |
CALL soil(is_ter, snow, ts, tsoil, soilcap, soilflux) |
131 |
|
cal = RCPD / soilcap |
132 |
|
|
133 |
|
CALL calcul_fluxs(ts, p1lay, cal, beta, cdragh, ps, qsurf, & |
134 |
|
radsol + soilflux, temp_air, q1lay, u1lay, v1lay, tAcoef, & |
135 |
|
qAcoef, tBcoef, qBcoef, tsurf_new, evap, fluxlat, flux_t, dflux_s, & |
136 |
|
dflux_l, dif_grnd = 0.) |
137 |
|
CALL fonte_neige(is_ter, rain_fall, snow_fall, snow, qsol, & |
138 |
|
tsurf_new, evap, fqcalving, ffonte, run_off_lic_0, run_off_lic) |
139 |
|
|
140 |
|
call albsno(agesno, alb_neig, snow_fall) |
141 |
|
where (snow < 0.0001) agesno = 0. |
142 |
|
zfra = max(0., min(1., snow / (snow + 10.))) |
143 |
|
albedo = alb_neig * zfra + albedo * (1. - zfra) |
144 |
|
z0_new = sqrt(z0_new**2 + rugoro**2) |
145 |
case (is_oce) |
case (is_oce) |
146 |
! Surface "ocean" appel à l'interface avec l'océan |
! Surface "oc\'ean", appel \`a l'interface avec l'oc\'ean |
|
! lecture conditions limites |
|
|
call interfoce_lim(itime, dtime, jour, knindex, debut, tsurf_temp, & |
|
|
pctsrf_new) |
|
147 |
|
|
148 |
|
ffonte = 0. |
149 |
|
call limit_read_sst(julien, knindex, tsurf) |
150 |
cal = 0. |
cal = 0. |
151 |
beta = 1. |
beta = 1. |
152 |
dif_grnd = 0. |
call calcul_fluxs(tsurf, p1lay, cal, beta, cdragh, ps, qsurf, radsol, & |
153 |
alb_neig = 0. |
temp_air, q1lay, u1lay, v1lay, tAcoef, qAcoef, tBcoef, qBcoef, & |
154 |
|
tsurf_new, evap, fluxlat, flux_t, dflux_s, dflux_l, dif_grnd = 0.) |
155 |
agesno = 0. |
agesno = 0. |
156 |
call calcul_fluxs(nisurf, dtime, tsurf_temp, p1lay(:knon), & |
albedo = alboc_cd(mu0) * fmagic |
|
cal(:knon), beta(:knon), tq_cdrag(:knon), ps(:knon), & |
|
|
qsurf(:knon), radsol(:knon), dif_grnd(:knon), temp_air(:knon), & |
|
|
spechum(:knon), u1_lay(:knon), v1_lay(:knon), petAcoef(:knon), & |
|
|
peqAcoef(:knon), petBcoef(:knon), peqBcoef(:knon), & |
|
|
tsurf_new, evap(:knon), fluxlat(:knon), fluxsens(:knon), & |
|
|
dflux_s(:knon), dflux_l(:knon)) |
|
|
fder_prev = fder |
|
|
fder = fder_prev + dflux_s + dflux_l |
|
|
iloc = maxloc(fder(1:klon)) |
|
|
|
|
|
!IM: flux ocean-atmosphere utile pour le "slab" ocean |
|
|
DO i=1, knon |
|
|
zx_sl(i) = RLVTT |
|
|
if (tsurf_new(i) < RTT) zx_sl(i) = RLSTT |
|
|
flux_o(i) = fluxsens(i)-evap(i)*zx_sl(i) |
|
|
ENDDO |
|
|
|
|
|
! calcul albedo |
|
|
if (minval(rmu0) == maxval(rmu0) .and. minval(rmu0) == -999.999) then |
|
|
CALL alboc(FLOAT(jour), rlat, alb_eau) |
|
|
else ! cycle diurne |
|
|
CALL alboc_cd(rmu0, alb_eau) |
|
|
endif |
|
|
DO ii =1, knon |
|
|
alb_new(ii) = alb_eau(knindex(ii)) |
|
|
enddo |
|
|
|
|
157 |
z0_new = sqrt(rugos**2 + rugoro**2) |
z0_new = sqrt(rugos**2 + rugoro**2) |
158 |
alblw(1:knon) = alb_new(1:knon) |
fqcalving = 0. |
159 |
case (is_sic) |
case (is_sic) |
160 |
! Surface "glace de mer" appel a l'interface avec l'ocean |
! Surface "glace de mer" appel a l'interface avec l'ocean |
161 |
|
|
162 |
! ! lecture conditions limites |
DO ii = 1, size(knindex) |
163 |
CALL interfoce_lim(itime, dtime, jour, knindex, debut, tsurf_new, & |
IF (pctsrf_new_sic(ii) < EPSFRA) then |
164 |
pctsrf_new) |
snow(ii) = 0. |
|
|
|
|
DO ii = 1, knon |
|
|
tsurf_new(ii) = tsurf(ii) |
|
|
IF (pctsrf_new(knindex(ii), nisurf) < EPSFRA) then |
|
|
snow(ii) = 0.0 |
|
165 |
tsurf_new(ii) = RTT - 1.8 |
tsurf_new(ii) = RTT - 1.8 |
166 |
IF (soil_model) tsoil(ii, :) = RTT -1.8 |
tsoil(ii, :) = RTT - 1.8 |
167 |
|
else |
168 |
|
tsurf_new(ii) = ts(ii) |
169 |
endif |
endif |
170 |
enddo |
enddo |
171 |
|
|
172 |
CALL calbeta(nisurf, snow(:knon), qsol(:knon), beta(:knon), & |
CALL soil(is_sic, snow, tsurf_new, tsoil, soilcap, soilflux) |
173 |
capsol(:knon), dif_grnd(:knon)) |
cal = RCPD / soilcap |
174 |
|
tsurf = tsurf_new |
175 |
IF (soil_model) THEN |
beta = 1. |
176 |
CALL soil(dtime, nisurf, knon, snow, tsurf_new, tsoil, soilcap, & |
CALL calcul_fluxs(tsurf, p1lay, cal, beta, cdragh, ps, qsurf, & |
177 |
soilflux) |
radsol + soilflux, temp_air, q1lay, u1lay, v1lay, tAcoef, & |
178 |
cal(1:knon) = RCPD / soilcap(1:knon) |
qAcoef, tBcoef, qBcoef, tsurf_new, evap, fluxlat, flux_t, dflux_s, & |
179 |
radsol(1:knon) = radsol(1:knon) + soilflux(1:knon) |
dflux_l, dif_grnd = 1. / tau_gl) |
180 |
dif_grnd = 0. |
CALL fonte_neige(is_sic, rain_fall, snow_fall, snow, qsol, & |
181 |
ELSE |
tsurf_new, evap, fqcalving, ffonte, run_off_lic_0, run_off_lic) |
182 |
dif_grnd = 1.0 / tau_gl |
|
183 |
cal = RCPD * calice |
! Compute the albedo: |
184 |
WHERE (snow > 0.0) cal = RCPD * calsno |
|
185 |
ENDIF |
CALL albsno(agesno, alb_neig, snow_fall) |
186 |
tsurf_temp = tsurf_new |
WHERE (snow < 0.0001) agesno = 0. |
187 |
beta = 1.0 |
zfra = MAX(0., MIN(1., snow / (snow + 10.))) |
188 |
|
albedo = alb_neig * zfra + 0.6 * (1. - zfra) |
|
CALL calcul_fluxs(nisurf, dtime, tsurf_temp, p1lay(:knon), cal(:knon), & |
|
|
beta(:knon), tq_cdrag(:knon), ps(:knon), qsurf(:knon), & |
|
|
radsol(:knon), dif_grnd(:knon), temp_air(:knon), spechum(:knon), u1_lay(:knon), v1_lay(:knon), petAcoef(:knon), & |
|
|
peqAcoef(:knon), petBcoef(:knon), peqBcoef(:knon), tsurf_new, evap(:knon), fluxlat(:knon), fluxsens(:knon), & |
|
|
dflux_s(:knon), dflux_l(:knon)) |
|
|
|
|
|
!IM: flux entre l'ocean et la glace de mer pour le "slab" ocean |
|
|
DO i = 1, knon |
|
|
flux_g(i) = 0.0 |
|
|
IF (cal(i) > 1e-15) flux_g(i) = (tsurf_new(i) - t_grnd) & |
|
|
* dif_grnd(i) * RCPD / cal(i) |
|
|
ENDDO |
|
|
|
|
|
CALL fonte_neige(nisurf, dtime, tsurf_temp, p1lay(:knon), beta(:knon), & |
|
|
tq_cdrag(:knon), ps(:knon), precip_rain(:knon), precip_snow(:knon), snow(:knon), qsol(:knon), & |
|
|
temp_air(:knon), spechum(:knon), u1_lay(:knon), v1_lay(:knon), petAcoef(:knon), peqAcoef(:knon), petBcoef(:knon), & |
|
|
peqBcoef(:knon), tsurf_new, evap(:knon), fqcalving(:knon), ffonte(:knon), run_off_lic_0(:knon)) |
|
|
|
|
|
! calcul albedo |
|
|
|
|
|
CALL albsno(klon, knon, dtime, agesno, alb_neig, precip_snow) |
|
|
WHERE (snow(1 : knon) < 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)) |
|
|
|
|
|
! 2eme appel a interfoce pour le cumul et le passage des flux a l'ocean |
|
|
|
|
|
z0_new = 0.002 |
|
|
z0_new = SQRT(z0_new**2 + rugoro**2) |
|
|
alblw(1:knon) = alb_new(1:knon) |
|
189 |
|
|
190 |
|
z0_new = SQRT(0.002**2 + rugoro**2) |
191 |
case (is_lic) |
case (is_lic) |
|
if (.not. allocated(run_off_lic)) then |
|
|
allocate(run_off_lic(knon)) |
|
|
run_off_lic = 0. |
|
|
endif |
|
|
|
|
192 |
! Surface "glacier continentaux" appel a l'interface avec le sol |
! Surface "glacier continentaux" appel a l'interface avec le sol |
193 |
|
|
194 |
IF (soil_model) THEN |
CALL soil(is_lic, snow, ts, tsoil, soilcap, soilflux) |
195 |
CALL soil(dtime, nisurf, knon, snow, tsurf, tsoil, soilcap, soilflux) |
cal = RCPD / soilcap |
196 |
cal(1:knon) = RCPD / soilcap(1:knon) |
beta = 1. |
197 |
radsol(1:knon) = radsol(1:knon) + soilflux(1:knon) |
call calcul_fluxs(ts, p1lay, cal, beta, cdragh, ps, qsurf, & |
198 |
ELSE |
radsol + soilflux, temp_air, q1lay, u1lay, v1lay, tAcoef, & |
199 |
cal = RCPD * calice |
qAcoef, tBcoef, qBcoef, tsurf_new, evap, fluxlat, flux_t, dflux_s, & |
200 |
WHERE (snow > 0.0) cal = RCPD * calsno |
dflux_l, dif_grnd = 0.) |
201 |
ENDIF |
call fonte_neige(is_lic, rain_fall, snow_fall, snow, qsol, & |
202 |
beta = 1.0 |
tsurf_new, evap, fqcalving, ffonte, run_off_lic_0, run_off_lic) |
|
dif_grnd = 0.0 |
|
|
|
|
|
call calcul_fluxs(nisurf, dtime, tsurf, p1lay(:knon), cal(:knon), beta(:knon), & |
|
|
tq_cdrag(:knon), ps(:knon), qsurf(:knon), radsol(:knon), & |
|
|
dif_grnd(:knon), temp_air(:knon), spechum(:knon), u1_lay(:knon), v1_lay(:knon), petAcoef(:knon), peqAcoef(:knon), & |
|
|
petBcoef(:knon), peqBcoef(:knon), tsurf_new, evap(:knon), fluxlat(:knon), fluxsens(:knon), dflux_s(:knon), & |
|
|
dflux_l(:knon)) |
|
|
|
|
|
call fonte_neige(nisurf, dtime, tsurf, p1lay(:knon), beta(:knon), & |
|
|
tq_cdrag(:knon), ps(:knon), precip_rain(:knon), precip_snow(:knon), snow(:knon), qsol(:knon), & |
|
|
temp_air(:knon), spechum(:knon), u1_lay(:knon), v1_lay(:knon), petAcoef(:knon), peqAcoef(:knon), petBcoef(:knon), & |
|
|
peqBcoef(:knon), tsurf_new, evap(:knon), fqcalving(:knon), ffonte(:knon), run_off_lic_0(:knon)) |
|
203 |
|
|
204 |
! calcul albedo |
! calcul albedo |
205 |
CALL albsno(klon, knon, dtime, agesno, alb_neig, precip_snow) |
CALL albsno(agesno, alb_neig, snow_fall) |
206 |
WHERE (snow(1 : knon) < 0.0001) agesno(1 : knon) = 0. |
WHERE (snow < 0.0001) agesno = 0. |
207 |
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 |
|
208 |
|
|
209 |
! Rugosite |
! Rugosite |
210 |
z0_new = rugoro |
z0_new = rugoro |
|
|
|
|
! Remplissage des pourcentages de surface |
|
|
pctsrf_new(:, nisurf) = pctsrf(:, nisurf) |
|
|
|
|
|
alblw(1:knon) = alb_new(1:knon) |
|
211 |
case default |
case default |
212 |
print *, 'Index surface = ', nisurf |
print *, 'Index surface = ', nisurf |
213 |
abort_message = 'Index surface non valable' |
call abort_gcm("interfsurf_hq", 'Index surface non valable') |
|
call abort_gcm(modname, abort_message, 1) |
|
214 |
end select |
end select |
215 |
|
|
216 |
END SUBROUTINE interfsurf_hq |
END SUBROUTINE interfsurf_hq |