19 |
|
|
20 |
! Tout ce qui a trait aux traceurs est dans "phytrac". Le calcul |
! Tout ce qui a trait aux traceurs est dans "phytrac". Le calcul |
21 |
! de la couche limite pour les traceurs se fait avec "cltrac" et |
! de la couche limite pour les traceurs se fait avec "cltrac" et |
22 |
! ne tient pas compte de la différentiation des sous-fractions de |
! ne tient pas compte de la diff\'erentiation des sous-fractions |
23 |
! sol. |
! de sol. |
24 |
|
|
25 |
! Pour pouvoir extraire les coefficients d'échanges et le vent |
! Pour pouvoir extraire les coefficients d'\'echanges et le vent |
26 |
! dans la première couche, trois champs ont été créés : "ycoefh", |
! dans la premi\`ere couche, trois champs ont \'et\'e cr\'e\'es : "ycoefh", |
27 |
! "zu1" et "zv1". Nous avons moyenné les valeurs de ces trois |
! "zu1" et "zv1". Nous avons moyenn\'e les valeurs de ces trois |
28 |
! champs sur les quatre sous-surfaces du modèle. |
! champs sur les quatre sous-surfaces du mod\`ele. |
29 |
|
|
30 |
use clqh_m, only: clqh |
use clqh_m, only: clqh |
31 |
use clvent_m, only: clvent |
use clvent_m, only: clvent |
61 |
REAL, INTENT(IN):: cdmmax, cdhmax ! seuils cdrm, cdrh |
REAL, INTENT(IN):: cdmmax, cdhmax ! seuils cdrm, cdrh |
62 |
REAL, INTENT(IN):: ksta, ksta_ter |
REAL, INTENT(IN):: ksta, ksta_ter |
63 |
LOGICAL, INTENT(IN):: ok_kzmin |
LOGICAL, INTENT(IN):: ok_kzmin |
64 |
REAL ftsoil(klon, nsoilmx, nbsrf) |
|
65 |
|
REAL, INTENT(inout):: ftsoil(klon, nsoilmx, nbsrf) |
66 |
|
! soil temperature of surface fraction |
67 |
|
|
68 |
REAL, INTENT(inout):: qsol(klon) |
REAL, INTENT(inout):: qsol(klon) |
69 |
! column-density of water in soil, in kg m-2 |
! column-density of water in soil, in kg m-2 |
85 |
! solid water mass flux (kg/m2/s), positive down |
! solid water mass flux (kg/m2/s), positive down |
86 |
|
|
87 |
REAL, INTENT(IN):: solsw(klon, nbsrf), sollw(klon, nbsrf) |
REAL, INTENT(IN):: solsw(klon, nbsrf), sollw(klon, nbsrf) |
88 |
REAL fder(klon) |
REAL, intent(in):: fder(klon) |
89 |
REAL, INTENT(IN):: rlat(klon) ! latitude en degrés |
REAL, INTENT(IN):: rlat(klon) ! latitude en degr\'es |
90 |
|
|
91 |
REAL rugos(klon, nbsrf) |
REAL rugos(klon, nbsrf) |
92 |
! rugos----input-R- longeur de rugosite (en m) |
! rugos----input-R- longeur de rugosite (en m) |
219 |
INTEGER ni(klon), knon, j |
INTEGER ni(klon), knon, j |
220 |
|
|
221 |
REAL pctsrf_pot(klon, nbsrf) |
REAL pctsrf_pot(klon, nbsrf) |
222 |
! "pourcentage potentiel" pour tenir compte des éventuelles |
! "pourcentage potentiel" pour tenir compte des \'eventuelles |
223 |
! apparitions ou disparitions de la glace de mer |
! apparitions ou disparitions de la glace de mer |
224 |
|
|
225 |
REAL zx_alf1, zx_alf2 !valeur ambiante par extrapola. |
REAL zx_alf1, zx_alf2 !valeur ambiante par extrapola. |
283 |
ysnow = 0. |
ysnow = 0. |
284 |
yqsurf = 0. |
yqsurf = 0. |
285 |
yalb = 0. |
yalb = 0. |
|
yalblw = 0. |
|
286 |
yrain_f = 0. |
yrain_f = 0. |
287 |
ysnow_f = 0. |
ysnow_f = 0. |
288 |
yfder = 0. |
yfder = 0. |
321 |
d_v = 0. |
d_v = 0. |
322 |
ycoefh = 0. |
ycoefh = 0. |
323 |
|
|
324 |
! Initialisation des "pourcentages potentiels". On considère ici qu'on |
! Initialisation des "pourcentages potentiels". On consid\`ere ici qu'on |
325 |
! peut avoir potentiellement de la glace sur tout le domaine océanique |
! peut avoir potentiellement de la glace sur tout le domaine oc\'eanique |
326 |
! (à affiner) |
! (\`a affiner) |
327 |
|
|
328 |
pctsrf_pot = pctsrf |
pctsrf_pot = pctsrf |
329 |
pctsrf_pot(:, is_oce) = 1. - zmasq |
pctsrf_pot(:, is_oce) = 1. - zmasq |
336 |
ni = 0 |
ni = 0 |
337 |
knon = 0 |
knon = 0 |
338 |
DO i = 1, klon |
DO i = 1, klon |
339 |
! Pour déterminer le domaine à traiter, on utilise les surfaces |
! Pour d\'eterminer le domaine \`a traiter, on utilise les surfaces |
340 |
! "potentielles" |
! "potentielles" |
341 |
IF (pctsrf_pot(i, nsrf) > epsfra) THEN |
IF (pctsrf_pot(i, nsrf) > epsfra) THEN |
342 |
knon = knon + 1 |
knon = knon + 1 |
353 |
ysnow(j) = snow(i, nsrf) |
ysnow(j) = snow(i, nsrf) |
354 |
yqsurf(j) = qsurf(i, nsrf) |
yqsurf(j) = qsurf(i, nsrf) |
355 |
yalb(j) = albe(i, nsrf) |
yalb(j) = albe(i, nsrf) |
|
yalblw(j) = alblw(i, nsrf) |
|
356 |
yrain_f(j) = rain_fall(i) |
yrain_f(j) = rain_fall(i) |
357 |
ysnow_f(j) = snow_f(i) |
ysnow_f(j) = snow_f(i) |
358 |
yagesno(j) = agesno(i, nsrf) |
yagesno(j) = agesno(i, nsrf) |
422 |
END IF |
END IF |
423 |
|
|
424 |
IF (iflag_pbl >= 3) THEN |
IF (iflag_pbl >= 3) THEN |
425 |
! Mellor et Yamada adapté à Mars, Richard Fournier et |
! Mellor et Yamada adapt\'e \`a Mars, Richard Fournier et |
426 |
! Frédéric Hourdin |
! Fr\'ed\'eric Hourdin |
427 |
yzlay(:knon, 1) = rd * yt(:knon, 1) / (0.5 * (ypaprs(:knon, 1) & |
yzlay(:knon, 1) = rd * yt(:knon, 1) / (0.5 * (ypaprs(:knon, 1) & |
428 |
+ ypplay(:knon, 1))) & |
+ ypplay(:knon, 1))) & |
429 |
* (ypaprs(:knon, 1) - ypplay(:knon, 1)) / rg |
* (ypaprs(:knon, 1) - ypplay(:knon, 1)) / rg |
453 |
CALL ustarhb(knon, yu, yv, coefm(:knon, 1), yustar) |
CALL ustarhb(knon, yu, yv, coefm(:knon, 1), yustar) |
454 |
IF (prt_level > 9) PRINT *, 'USTAR = ', yustar |
IF (prt_level > 9) PRINT *, 'USTAR = ', yustar |
455 |
|
|
456 |
! iflag_pbl peut être utilisé comme longueur de mélange |
! iflag_pbl peut \^etre utilis\'e comme longueur de m\'elange |
457 |
|
|
458 |
IF (iflag_pbl >= 11) THEN |
IF (iflag_pbl >= 11) THEN |
459 |
CALL vdif_kcay(knon, dtime, rg, rd, ypaprs, yt, yzlev, yzlay, & |
CALL vdif_kcay(knon, dtime, rg, ypaprs, yzlev, yzlay, yu, yv, & |
460 |
yu, yv, yteta, coefm(:knon, 1), yq2, q2diag, ykmm, ykmn, & |
yteta, coefm(:knon, 1), yq2, q2diag, ykmm, ykmn, yustar, & |
461 |
yustar, iflag_pbl) |
iflag_pbl) |
462 |
ELSE |
ELSE |
463 |
CALL yamada4(knon, dtime, rg, yzlev, yzlay, yu, yv, yteta, & |
CALL yamada4(knon, dtime, rg, yzlev, yzlay, yu, yv, yteta, & |
464 |
coefm(:knon, 1), yq2, ykmm, ykmn, ykmq, yustar, iflag_pbl) |
coefm(:knon, 1), yq2, ykmm, ykmn, ykmq, yustar, iflag_pbl) |
475 |
ypplay, ydelp, y_d_v, y_flux_v) |
ypplay, ydelp, y_d_v, y_flux_v) |
476 |
|
|
477 |
! calculer la diffusion de "q" et de "h" |
! calculer la diffusion de "q" et de "h" |
478 |
CALL clqh(dtime, itap, jour, debut, rlat, knon, nsrf, ni(:knon), pctsrf, & |
CALL clqh(dtime, itap, jour, debut, rlat, knon, nsrf, ni(:knon), & |
479 |
ytsoil, yqsol, rmu0, co2_ppm, yrugos, yrugoro, yu1, yv1, & |
pctsrf, ytsoil, yqsol, rmu0, co2_ppm, yrugos, yrugoro, yu1, & |
480 |
coefh(:knon, :), yt, yq, yts, ypaprs, ypplay, ydelp, yrads, & |
yv1, coefh(:knon, :), yt, yq, yts, ypaprs, ypplay, ydelp, & |
481 |
yalb, yalblw, ysnow, yqsurf, yrain_f, ysnow_f, yfder, ysolsw, & |
yrads, yalb, yalblw(:knon), ysnow, yqsurf, yrain_f, ysnow_f, & |
482 |
yfluxlat, pctsrf_new, yagesno, y_d_t, y_d_q, y_d_ts(:knon), & |
yfder, ysolsw, yfluxlat, pctsrf_new, yagesno, y_d_t, y_d_q, & |
483 |
yz0_new, y_flux_t, y_flux_q, y_dflux_t, y_dflux_q, & |
y_d_ts(:knon), yz0_new, y_flux_t, y_flux_q, y_dflux_t, & |
484 |
y_fqcalving, y_ffonte, y_run_off_lic_0, y_flux_o, y_flux_g) |
y_dflux_q, y_fqcalving, y_ffonte, y_run_off_lic_0, y_flux_o, & |
485 |
|
y_flux_g) |
486 |
|
|
487 |
! calculer la longueur de rugosite sur ocean |
! calculer la longueur de rugosite sur ocean |
488 |
yrugm = 0. |
yrugm = 0. |
555 |
run_off_lic_0(i) = y_run_off_lic_0(j) |
run_off_lic_0(i) = y_run_off_lic_0(j) |
556 |
END DO |
END DO |
557 |
END IF |
END IF |
558 |
!$$$ PB ajout pour soil |
|
559 |
ftsoil(:, :, nsrf) = 0. |
ftsoil(:, :, nsrf) = 0. |
560 |
DO k = 1, nsoilmx |
DO k = 1, nsoilmx |
561 |
DO j = 1, knon |
DO j = 1, knon |
611 |
|
|
612 |
END DO |
END DO |
613 |
|
|
614 |
CALL hbtm(knon, ypaprs, ypplay, yt2m, yt10m, yq2m, yq10m, yustar, & |
CALL hbtm(knon, ypaprs, ypplay, yt2m, yq2m, yustar, & |
615 |
y_flux_t, y_flux_q, yu, yv, yt, yq, ypblh, ycapcl, yoliqcl, & |
y_flux_t, y_flux_q, yu, yv, yt, yq, ypblh, ycapcl, yoliqcl, & |
616 |
ycteicl, ypblt, ytherm, ytrmb1, ytrmb2, ytrmb3, ylcl) |
ycteicl, ypblt, ytherm, ytrmb1, ytrmb2, ytrmb3, ylcl) |
617 |
|
|
651 |
IF (nsrf == is_sic) THEN |
IF (nsrf == is_sic) THEN |
652 |
DO j = 1, knon |
DO j = 1, knon |
653 |
i = ni(j) |
i = ni(j) |
654 |
! On pondère lorsque l'on fait le bilan au sol : |
! On pond\`ere lorsque l'on fait le bilan au sol : |
655 |
IF (pctsrf_new(i, is_sic)>epsfra) THEN |
IF (pctsrf_new(i, is_sic)>epsfra) THEN |
656 |
flux_g(i) = y_flux_g(j) |
flux_g(i) = y_flux_g(j) |
657 |
ELSE |
ELSE |