--- trunk/Sources/phylmd/physiq.f 2016/09/01 10:30:53 207 +++ trunk/Sources/phylmd/physiq.f 2018/01/05 14:45:45 247 @@ -20,14 +20,13 @@ use calltherm_m, only: calltherm USE clesphys, ONLY: cdhmax, cdmmax, ecrit_ins, ksta, ksta_ter, ok_kzmin, & ok_instan - USE clesphys2, ONLY: cycle_diurne, conv_emanuel, nbapp_rad, new_oliq, & - ok_orodr, ok_orolf + USE clesphys2, ONLY: conv_emanuel, nbapp_rad, new_oliq, ok_orodr, ok_orolf USE clmain_m, ONLY: clmain use clouds_gno_m, only: clouds_gno use comconst, only: dtphys USE comgeomphy, ONLY: airephy USE concvl_m, ONLY: concvl - USE conf_gcm_m, ONLY: offline, lmt_pas + USE conf_gcm_m, ONLY: lmt_pas USE conf_phys_m, ONLY: conf_phys use conflx_m, only: conflx USE ctherm, ONLY: iflag_thermals, nsplit_thermals @@ -37,7 +36,7 @@ USE dimsoil, ONLY: nsoilmx use drag_noro_m, only: drag_noro use dynetat0_m, only: day_ref, annee_ref - USE fcttre, ONLY: foeew, qsatl, qsats + USE fcttre, ONLY: foeew use fisrtilp_m, only: fisrtilp USE hgardfou_m, ONLY: hgardfou USE histsync_m, ONLY: histsync @@ -45,20 +44,20 @@ USE indicesol, ONLY: clnsurf, epsfra, is_lic, is_oce, is_sic, is_ter, & nbsrf USE ini_histins_m, ONLY: ini_histins, nid_ins + use lift_noro_m, only: lift_noro use netcdf95, only: NF95_CLOSE use newmicro_m, only: newmicro use nr_util, only: assert use nuage_m, only: nuage USE orbite_m, ONLY: orbite USE ozonecm_m, ONLY: ozonecm - USE phyetat0_m, ONLY: phyetat0, rlat, rlon + USE phyetat0_m, ONLY: phyetat0 USE phyredem_m, ONLY: phyredem USE phyredem0_m, ONLY: phyredem0 - USE phystokenc_m, ONLY: phystokenc USE phytrac_m, ONLY: phytrac use radlwsw_m, only: radlwsw use yoegwd, only: sugwd - USE suphec_m, ONLY: rcpd, retv, rg, rlvtt, romega, rsigma, rtt + USE suphec_m, ONLY: rcpd, retv, rg, rlvtt, romega, rsigma, rtt, rmo3, md use time_phylmdz, only: itap, increment_itap use transp_m, only: transp use transp_lay_m, only: transp_lay @@ -146,22 +145,19 @@ ! "physiq". REAL, save:: radsol(klon) ! bilan radiatif au sol calcule par code radiatif - REAL, save:: ftsol(klon, nbsrf) ! skin temperature of surface fraction REAL, save:: ftsoil(klon, nsoilmx, nbsrf) ! soil temperature of surface fraction REAL, save:: fevap(klon, nbsrf) ! evaporation - REAL, save:: fluxlat(klon, nbsrf) + REAL fluxlat(klon, nbsrf) REAL, save:: fqsurf(klon, nbsrf) ! humidite de l'air au contact de la surface - REAL, save:: qsol(klon) - ! column-density of water in soil, in kg m-2 - - REAL, save:: fsnow(klon, nbsrf) ! epaisseur neigeuse + REAL, save:: qsol(klon) ! column-density of water in soil, in kg m-2 + REAL, save:: fsnow(klon, nbsrf) ! \'epaisseur neigeuse REAL, save:: falbe(klon, nbsrf) ! albedo visible par type de surface ! Param\`etres de l'orographie \`a l'\'echelle sous-maille (OESM) : @@ -174,7 +170,7 @@ REAL, save:: zval(klon) ! Minimum de l'OESM REAL, save:: rugoro(klon) ! longueur de rugosite de l'OESM REAL zulow(klon), zvlow(klon) - INTEGER igwd, itest(klon) + INTEGER ktest(klon) REAL, save:: agesno(klon, nbsrf) ! age de la neige REAL, save:: run_off_lic_0(klon) @@ -188,10 +184,7 @@ REAL cdragh(klon) ! drag coefficient pour T and Q REAL cdragm(klon) ! drag coefficient pour vent - ! Pour phytrac : - REAL ycoefh(klon, llm) ! coef d'echange pour phytrac - REAL yu1(klon) ! vents dans la premiere couche U - REAL yv1(klon) ! vents dans la premiere couche V + REAL coefh(klon, 2:llm) ! coef d'echange pour phytrac REAL, save:: ffonte(klon, nbsrf) ! flux thermique utilise pour fondre la neige @@ -208,7 +201,7 @@ REAL, save:: pfrac_1nucl(klon, llm) ! Produits des coefs lessi nucl (alpha = 1) - REAL frac_impa(klon, llm) ! fractions d'aerosols lessivees (impaction) + REAL frac_impa(klon, llm) ! fraction d'a\'erosols lessiv\'es (impaction) REAL frac_nucl(klon, llm) ! idem (nucleation) REAL, save:: rain_fall(klon) @@ -223,9 +216,9 @@ real devap(klon) ! derivative of the evaporation flux at the surface REAL sens(klon) ! flux de chaleur sensible au sol real dsens(klon) ! derivee du flux de chaleur sensible au sol - REAL, save:: dlw(klon) ! derivee infra rouge + REAL, save:: dlw(klon) ! derivative of infra-red flux REAL bils(klon) ! bilan de chaleur au sol - REAL, save:: fder(klon) ! Derive de flux (sensible et latente) + REAL fder(klon) ! Derive de flux (sensible et latente) REAL ve(klon) ! integr. verticale du transport meri. de l'energie REAL vq(klon) ! integr. verticale du transport meri. de l'eau REAL ue(klon) ! integr. verticale du transport zonal de l'energie @@ -238,8 +231,9 @@ INTEGER julien REAL, save:: pctsrf(klon, nbsrf) ! percentage of surface - REAL, save:: albsol(klon) ! albedo du sol total visible + REAL, save:: albsol(klon) ! albedo du sol total, visible, moyen par maille REAL, SAVE:: wo(klon, llm) ! column density of ozone in a cell, in kDU + real, parameter:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2 real, save:: clwcon(klon, llm), rnebcon(klon, llm) real, save:: clwcon0(klon, llm), rnebcon0(klon, llm) @@ -254,8 +248,9 @@ REAL flux_q(klon, nbsrf) ! flux turbulent d'humidite à la surface REAL flux_t(klon, nbsrf) ! flux turbulent de chaleur à la surface - REAL flux_u(klon, nbsrf) ! flux turbulent de vitesse u à la surface - REAL flux_v(klon, nbsrf) ! flux turbulent de vitesse v à la surface + + REAL flux_u(klon, nbsrf), flux_v(klon, nbsrf) + ! tension du vent (flux turbulent de vent) à la surface, en Pa ! Le rayonnement n'est pas calcul\'e tous les pas, il faut donc que ! les variables soient r\'emanentes. @@ -277,8 +272,7 @@ REAL cldl(klon), cldm(klon), cldh(klon) ! nuages bas, moyen et haut REAL cldt(klon), cldq(klon) ! nuage total, eau liquide integree - REAL zxqsurf(klon), zxsnow(klon), zxfluxlat(klon) - + REAL zxfluxlat(klon) REAL dist, mu0(klon), fract(klon) real longi REAL z_avant(klon), z_apres(klon), z_factor(klon) @@ -342,7 +336,7 @@ real rain_lsc(klon) REAL, save:: snow_con(klon) ! neige (mm / s) real snow_lsc(klon) - REAL d_ts(klon, nbsrf) + REAL d_ts(klon, nbsrf) ! variation of ftsol REAL d_u_vdf(klon, llm), d_v_vdf(klon, llm) REAL d_t_vdf(klon, llm), d_q_vdf(klon, llm) @@ -376,7 +370,6 @@ REAL zustrdr(klon), zvstrdr(klon) REAL zustrli(klon), zvstrli(klon) - REAL zustrph(klon), zvstrph(klon) REAL aam, torsfc REAL ve_lay(klon, llm) ! transport meri. de l'energie a chaque niveau vert. @@ -385,42 +378,25 @@ REAL uq_lay(klon, llm) ! transport zonal de l'eau a chaque niveau vert. real date0 - REAL ztsol(klon) + REAL tsol(klon) REAL d_t_ec(klon, llm) - ! tendance due \`a la conversion Ec en énergie thermique - - REAL ZRCPD + ! tendance due \`a la conversion d'\'energie cin\'etique en + ! énergie thermique REAL, save:: t2m(klon, nbsrf), q2m(klon, nbsrf) ! temperature and humidity at 2 m - REAL, save:: u10m(klon, nbsrf), v10m(klon, nbsrf) ! vents a 10 m + REAL, save:: u10m_srf(klon, nbsrf), v10m_srf(klon, nbsrf) + ! composantes du vent \`a 10 m + REAL zt2m(klon), zq2m(klon) ! température, humidité 2 m moyenne sur 1 maille - REAL zu10m(klon), zv10m(klon) ! vents a 10 m moyennes sur 1 maille + REAL u10m(klon), v10m(klon) ! vent \`a 10 m moyenn\' sur les sous-surfaces ! Aerosol effects: - REAL sulfate(klon, llm) ! SO4 aerosol concentration (micro g / m3) - - REAL, save:: sulfate_pi(klon, llm) - ! SO4 aerosol concentration, in \mu g / m3, pre-industrial value - - REAL cldtaupi(klon, llm) - ! cloud optical thickness for pre-industrial aerosols - - REAL re(klon, llm) ! Cloud droplet effective radius - REAL fl(klon, llm) ! denominator of re - - ! Aerosol optical properties - REAL, save:: tau_ae(klon, llm, 2), piz_ae(klon, llm, 2) - REAL, save:: cg_ae(klon, llm, 2) - REAL, save:: topswad(klon), solswad(klon) ! aerosol direct effect - REAL, save:: topswai(klon), solswai(klon) ! aerosol indirect effect - LOGICAL:: ok_ade = .false. ! apply aerosol direct effect - LOGICAL:: ok_aie = .false. ! apply aerosol indirect effect REAL:: bl95_b0 = 2., bl95_b1 = 0.2 ! Parameters in equation (D) of Boucher and Lohmann (1995, Tellus @@ -433,8 +409,8 @@ integer, save:: ncid_startphy namelist /physiq_nml/ fact_cldcon, facttemps, ok_newmicro, iflag_cldcon, & - ratqsbas, ratqshaut, ok_ade, ok_aie, bl95_b0, bl95_b1, & - iflag_thermals, nsplit_thermals + ratqsbas, ratqshaut, ok_ade, bl95_b0, bl95_b1, iflag_thermals, & + nsplit_thermals !---------------------------------------------------------------- @@ -443,29 +419,20 @@ test_firstcal: IF (firstcal) THEN ! initialiser - u10m = 0. - v10m = 0. + u10m_srf = 0. + v10m_srf = 0. t2m = 0. q2m = 0. ffonte = 0. fqcalving = 0. - piz_ae = 0. - tau_ae = 0. - cg_ae = 0. rain_con = 0. snow_con = 0. - topswai = 0. - topswad = 0. - solswai = 0. - solswad = 0. - d_u_con = 0. d_v_con = 0. rnebcon0 = 0. clwcon0 = 0. rnebcon = 0. clwcon = 0. - pblh =0. ! Hauteur de couche limite plcl =0. ! Niveau de condensation de la CLA capCL =0. ! CAPE de couche limite @@ -517,7 +484,7 @@ ! Initialisation des sorties - call ini_histins(dtphys) + call ini_histins(dtphys, ok_newmicro) CALL ymds2ju(annee_ref, 1, day_ref, 0., date0) ! Positionner date0 pour initialisation de ORCHIDEE print *, 'physiq date0: ', date0 @@ -533,7 +500,7 @@ ql_seri = qx(:, :, iliq) tr_seri = qx(:, :, 3:nqmx) - ztsol = sum(ftsol * pctsrf, dim = 2) + tsol = sum(ftsol * pctsrf, dim = 2) ! Diagnostic de la tendance dynamique : IF (ancien_ok) THEN @@ -569,9 +536,6 @@ forall (k = 1: llm) zmasse(:, k) = (paprs(:, k) - paprs(:, k + 1)) / rg - ! Prescrire l'ozone : - wo = ozonecm(REAL(julien), paprs) - ! \'Evaporation de l'eau liquide nuageuse : DO k = 1, llm DO i = 1, klon @@ -590,34 +554,26 @@ ! la surface. CALL orbite(REAL(julien), longi, dist) - IF (cycle_diurne) THEN - CALL zenang(longi, time, dtphys * radpas, mu0, fract) - ELSE - mu0 = - 999.999 - ENDIF - - ! Calcul de l'abedo moyen par maille + CALL zenang(longi, time, dtphys * radpas, mu0, fract) albsol = sum(falbe * pctsrf, dim = 2) ! R\'epartition sous maille des flux longwave et shortwave ! R\'epartition du longwave par sous-surface lin\'earis\'ee forall (nsrf = 1: nbsrf) - fsollw(:, nsrf) = sollw + 4. * RSIGMA * ztsol**3 & - * (ztsol - ftsol(:, nsrf)) + fsollw(:, nsrf) = sollw + 4. * RSIGMA * tsol**3 & + * (tsol - ftsol(:, nsrf)) fsolsw(:, nsrf) = solsw * (1. - falbe(:, nsrf)) / (1. - albsol) END forall - fder = dlw - CALL clmain(dtphys, pctsrf, t_seri, q_seri, u_seri, v_seri, julien, mu0, & ftsol, cdmmax, cdhmax, ksta, ksta_ter, ok_kzmin, ftsoil, qsol, & paprs, play, fsnow, fqsurf, fevap, falbe, fluxlat, rain_fall, & - snow_fall, fsolsw, fsollw, fder, rlat, frugs, agesno, rugoro, & - d_t_vdf, d_q_vdf, d_u_vdf, d_v_vdf, d_ts, flux_t, flux_q, flux_u, & - flux_v, cdragh, cdragm, q2, dsens, devap, ycoefh, yu1, yv1, t2m, q2m, & - u10m, v10m, pblh, capCL, oliqCL, cteiCL, pblT, therm, trmb1, trmb2, & - trmb3, plcl, fqcalving, ffonte, run_off_lic_0) + snow_fall, fsolsw, fsollw, frugs, agesno, rugoro, d_t_vdf, d_q_vdf, & + d_u_vdf, d_v_vdf, d_ts, flux_t, flux_q, flux_u, flux_v, cdragh, & + cdragm, q2, dsens, devap, coefh, t2m, q2m, u10m_srf, v10m_srf, & + pblh, capCL, oliqCL, cteiCL, pblT, therm, trmb1, trmb2, trmb3, plcl, & + fqcalving, ffonte, run_off_lic_0) ! Incr\'ementation des flux @@ -636,65 +592,36 @@ ! Update surface temperature: - DO i = 1, klon - zxfluxlat(i) = 0. - - zt2m(i) = 0. - zq2m(i) = 0. - zu10m(i) = 0. - zv10m(i) = 0. - zxffonte(i) = 0. - zxfqcalving(i) = 0. - - s_pblh(i) = 0. - s_lcl(i) = 0. - s_capCL(i) = 0. - s_oliqCL(i) = 0. - s_cteiCL(i) = 0. - s_pblT(i) = 0. - s_therm(i) = 0. - s_trmb1(i) = 0. - s_trmb2(i) = 0. - s_trmb3(i) = 0. - ENDDO - call assert(abs(sum(pctsrf, dim = 2) - 1.) <= EPSFRA, 'physiq: pctsrf') - ftsol = ftsol + d_ts - ztsol = sum(ftsol * pctsrf, dim = 2) - DO nsrf = 1, nbsrf - DO i = 1, klon - zxfluxlat(i) = zxfluxlat(i) + fluxlat(i, nsrf) * pctsrf(i, nsrf) - - zt2m(i) = zt2m(i) + t2m(i, nsrf) * pctsrf(i, nsrf) - zq2m(i) = zq2m(i) + q2m(i, nsrf) * pctsrf(i, nsrf) - zu10m(i) = zu10m(i) + u10m(i, nsrf) * pctsrf(i, nsrf) - zv10m(i) = zv10m(i) + v10m(i, nsrf) * pctsrf(i, nsrf) - zxffonte(i) = zxffonte(i) + ffonte(i, nsrf) * pctsrf(i, nsrf) - zxfqcalving(i) = zxfqcalving(i) + & - fqcalving(i, nsrf) * pctsrf(i, nsrf) - s_pblh(i) = s_pblh(i) + pblh(i, nsrf) * pctsrf(i, nsrf) - s_lcl(i) = s_lcl(i) + plcl(i, nsrf) * pctsrf(i, nsrf) - s_capCL(i) = s_capCL(i) + capCL(i, nsrf) * pctsrf(i, nsrf) - s_oliqCL(i) = s_oliqCL(i) + oliqCL(i, nsrf) * pctsrf(i, nsrf) - s_cteiCL(i) = s_cteiCL(i) + cteiCL(i, nsrf) * pctsrf(i, nsrf) - s_pblT(i) = s_pblT(i) + pblT(i, nsrf) * pctsrf(i, nsrf) - s_therm(i) = s_therm(i) + therm(i, nsrf) * pctsrf(i, nsrf) - s_trmb1(i) = s_trmb1(i) + trmb1(i, nsrf) * pctsrf(i, nsrf) - s_trmb2(i) = s_trmb2(i) + trmb2(i, nsrf) * pctsrf(i, nsrf) - s_trmb3(i) = s_trmb3(i) + trmb3(i, nsrf) * pctsrf(i, nsrf) - ENDDO - ENDDO + tsol = sum(ftsol * pctsrf, dim = 2) + zxfluxlat = sum(fluxlat * pctsrf, dim = 2) + zt2m = sum(t2m * pctsrf, dim = 2) + zq2m = sum(q2m * pctsrf, dim = 2) + u10m = sum(u10m_srf * pctsrf, dim = 2) + v10m = sum(v10m_srf * pctsrf, dim = 2) + zxffonte = sum(ffonte * pctsrf, dim = 2) + zxfqcalving = sum(fqcalving * pctsrf, dim = 2) + s_pblh = sum(pblh * pctsrf, dim = 2) + s_lcl = sum(plcl * pctsrf, dim = 2) + s_capCL = sum(capCL * pctsrf, dim = 2) + s_oliqCL = sum(oliqCL * pctsrf, dim = 2) + s_cteiCL = sum(cteiCL * pctsrf, dim = 2) + s_pblT = sum(pblT * pctsrf, dim = 2) + s_therm = sum(therm * pctsrf, dim = 2) + s_trmb1 = sum(trmb1 * pctsrf, dim = 2) + s_trmb2 = sum(trmb2 * pctsrf, dim = 2) + s_trmb3 = sum(trmb3 * pctsrf, dim = 2) ! Si une sous-fraction n'existe pas, elle prend la valeur moyenne : DO nsrf = 1, nbsrf DO i = 1, klon IF (pctsrf(i, nsrf) < epsfra) then - ftsol(i, nsrf) = ztsol(i) + ftsol(i, nsrf) = tsol(i) t2m(i, nsrf) = zt2m(i) q2m(i, nsrf) = zq2m(i) - u10m(i, nsrf) = zu10m(i) - v10m(i, nsrf) = zv10m(i) + u10m_srf(i, nsrf) = u10m(i) + v10m_srf(i, nsrf) = v10m(i) ffonte(i, nsrf) = zxffonte(i) fqcalving(i, nsrf) = zxfqcalving(i) pblh(i, nsrf) = s_pblh(i) @@ -711,11 +638,7 @@ ENDDO ENDDO - ! Calculer la dérive du flux infrarouge - - DO i = 1, klon - dlw(i) = - 4. * RSIGMA * ztsol(i)**3 - ENDDO + dlw = - 4. * RSIGMA * tsol**3 ! Appeler la convection @@ -937,39 +860,27 @@ ENDDO ENDDO - ! Introduce the aerosol direct and first indirect radiative forcings: - tau_ae = 0. - piz_ae = 0. - cg_ae = 0. - ! Param\`etres optiques des nuages et quelques param\`etres pour ! diagnostics : if (ok_newmicro) then CALL newmicro(paprs, play, t_seri, cldliq, cldfra, cldtau, cldemi, & - cldh, cldl, cldm, cldt, cldq, flwp, fiwp, flwc, fiwc, ok_aie, & - sulfate, sulfate_pi, bl95_b0, bl95_b1, cldtaupi, re, fl) + cldh, cldl, cldm, cldt, cldq, flwp, fiwp, flwc, fiwc) else CALL nuage(paprs, play, t_seri, cldliq, cldfra, cldtau, cldemi, cldh, & - cldl, cldm, cldt, cldq, ok_aie, sulfate, sulfate_pi, bl95_b0, & - bl95_b1, cldtaupi, re, fl) + cldl, cldm, cldt, cldq) endif IF (MOD(itap - 1, radpas) == 0) THEN - ! Appeler le rayonnement mais calculer tout d'abord l'albedo du sol. - ! Calcul de l'abedo moyen par maille + wo = ozonecm(REAL(julien), paprs) albsol = sum(falbe * pctsrf, dim = 2) - - ! Rayonnement (compatible Arpege-IFS) : - CALL radlwsw(dist, mu0, fract, paprs, play, ztsol, albsol, t_seri, & + CALL radlwsw(dist, mu0, fract, paprs, play, tsol, albsol, t_seri, & q_seri, wo, cldfra, cldemi, cldtau, heat, heat0, cool, cool0, & radsol, albpla, topsw, toplw, solsw, sollw, sollwdown, topsw0, & toplw0, solsw0, sollw0, lwdn0, lwdn, lwup0, lwup, swdn0, swdn, & - swup0, swup, ok_ade, ok_aie, tau_ae, piz_ae, cg_ae, topswad, & - solswad, cldtaupi, topswai, solswai) + swup0, swup, ok_ade, topswad, solswad) ENDIF ! Ajouter la tendance des rayonnements (tous les pas) - DO k = 1, llm DO i = 1, klon t_seri(i, k) = t_seri(i, k) + (heat(i, k) - cool(i, k)) * dtphys & @@ -977,20 +888,7 @@ ENDDO ENDDO - ! Calculer l'hydrologie de la surface - DO i = 1, klon - zxqsurf(i) = 0. - zxsnow(i) = 0. - ENDDO - DO nsrf = 1, nbsrf - DO i = 1, klon - zxqsurf(i) = zxqsurf(i) + fqsurf(i, nsrf) * pctsrf(i, nsrf) - zxsnow(i) = zxsnow(i) + fsnow(i, nsrf) * pctsrf(i, nsrf) - ENDDO - ENDDO - ! Calculer le bilan du sol et la d\'erive de temp\'erature (couplage) - DO i = 1, klon bils(i) = radsol(i) - sens(i) + zxfluxlat(i) ENDDO @@ -999,18 +897,16 @@ IF (ok_orodr) THEN ! S\'election des points pour lesquels le sch\'ema est actif : - igwd = 0 DO i = 1, klon - itest(i) = 0 + ktest(i) = 0 IF (zpic(i) - zmea(i) > 100. .AND. zstd(i) > 10.) THEN - itest(i) = 1 - igwd = igwd + 1 + ktest(i) = 1 ENDIF ENDDO - CALL drag_noro(klon, llm, dtphys, paprs, play, zmea, zstd, zsig, zgam, & - zthe, zpic, zval, itest, t_seri, u_seri, v_seri, zulow, zvlow, & - zustrdr, zvstrdr, d_t_oro, d_u_oro, d_v_oro) + CALL drag_noro(dtphys, paprs, play, zmea, zstd, zsig, zgam, zthe, & + zpic, zval, ktest, t_seri, u_seri, v_seri, zulow, zvlow, zustrdr, & + zvstrdr, d_t_oro, d_u_oro, d_v_oro) ! ajout des tendances DO k = 1, llm @@ -1024,18 +920,16 @@ IF (ok_orolf) THEN ! S\'election des points pour lesquels le sch\'ema est actif : - igwd = 0 DO i = 1, klon - itest(i) = 0 + ktest(i) = 0 IF (zpic(i) - zmea(i) > 100.) THEN - itest(i) = 1 - igwd = igwd + 1 + ktest(i) = 1 ENDIF ENDDO - CALL lift_noro(klon, llm, dtphys, paprs, play, rlat, zmea, zstd, zpic, & - itest, t_seri, u_seri, v_seri, zulow, zvlow, zustrli, zvstrli, & - d_t_lif, d_u_lif, d_v_lif) + CALL lift_noro(dtphys, paprs, play, zmea, zstd, zpic, ktest, t_seri, & + u_seri, v_seri, zulow, zvlow, zustrli, zvstrli, d_t_lif, & + d_u_lif, d_v_lif) ! Ajout des tendances : DO k = 1, llm @@ -1047,33 +941,16 @@ ENDDO ENDIF - ! Stress n\'ecessaires : toute la physique - - DO i = 1, klon - zustrph(i) = 0. - zvstrph(i) = 0. - ENDDO - DO k = 1, llm - DO i = 1, klon - zustrph(i) = zustrph(i) + (u_seri(i, k) - u(i, k)) / dtphys & - * zmasse(i, k) - zvstrph(i) = zvstrph(i) + (v_seri(i, k) - v(i, k)) / dtphys & - * zmasse(i, k) - ENDDO - ENDDO - - CALL aaam_bud(rg, romega, rlat, rlon, pphis, zustrdr, zustrli, zustrph, & - zvstrdr, zvstrli, zvstrph, paprs, u, v, aam, torsfc) + CALL aaam_bud(rg, romega, pphis, zustrdr, zustrli, & + sum((u_seri - u) / dtphys * zmasse, dim = 2), zvstrdr, & + zvstrli, sum((v_seri - v) / dtphys * zmasse, dim = 2), paprs, u, v, & + aam, torsfc) ! Calcul des tendances traceurs call phytrac(julien, time, firstcal, lafin, dtphys, t, paprs, play, mfu, & - mfd, pde_u, pen_d, ycoefh, fm_therm, entr_therm, yu1, yv1, ftsol, & - pctsrf, frac_impa, frac_nucl, da, phi, mp, upwd, dnwd, tr_seri, & - zmasse, ncid_startphy) - - IF (offline) call phystokenc(dtphys, t, mfu, mfd, pen_u, pde_u, pen_d, & - pde_d, fm_therm, entr_therm, ycoefh, yu1, yv1, ftsol, pctsrf, & - frac_impa, frac_nucl, pphis, airephy, dtphys) + mfd, pde_u, pen_d, coefh, cdragh, fm_therm, entr_therm, u(:, 1), & + v(:, 1), ftsol, pctsrf, frac_impa, frac_nucl, da, phi, mp, upwd, & + dnwd, tr_seri, zmasse, ncid_startphy) ! Calculer le transport de l'eau et de l'energie (diagnostique) CALL transp(paprs, t_seri, q_seri, u_seri, v_seri, zphi, ve, vq, ue, uq) @@ -1088,8 +965,7 @@ ! conversion Ec en énergie thermique DO k = 1, llm DO i = 1, klon - ZRCPD = RCPD * (1. + RVTMP2 * q_seri(i, k)) - d_t_ec(i, k) = 0.5 / ZRCPD & + d_t_ec(i, k) = 0.5 / (RCPD * (1. + RVTMP2 * q_seri(i, k))) & * (u(i, k)**2 + v(i, k)**2 - u_seri(i, k)**2 - v_seri(i, k)**2) t_seri(i, k) = t_seri(i, k) + d_t_ec(i, k) d_t_ec(i, k) = d_t_ec(i, k) / dtphys @@ -1140,11 +1016,11 @@ CALL histwrite_phy("precip", rain_fall + snow_fall) CALL histwrite_phy("plul", rain_lsc + snow_lsc) CALL histwrite_phy("pluc", rain_con + snow_con) - CALL histwrite_phy("tsol", ztsol) + CALL histwrite_phy("tsol", tsol) CALL histwrite_phy("t2m", zt2m) CALL histwrite_phy("q2m", zq2m) - CALL histwrite_phy("u10m", zu10m) - CALL histwrite_phy("v10m", zv10m) + CALL histwrite_phy("u10m", u10m) + CALL histwrite_phy("v10m", v10m) CALL histwrite_phy("snow", snow_fall) CALL histwrite_phy("cdrm", cdragm) CALL histwrite_phy("cdrh", cdragh) @@ -1171,9 +1047,12 @@ CALL histwrite_phy("tauy_"//clnsurf(nsrf), flux_v(:, nsrf)) CALL histwrite_phy("rugs_"//clnsurf(nsrf), frugs(:, nsrf)) CALL histwrite_phy("albe_"//clnsurf(nsrf), falbe(:, nsrf)) + CALL histwrite_phy("u10m_"//clnsurf(nsrf), u10m_srf(:, nsrf)) + CALL histwrite_phy("v10m_"//clnsurf(nsrf), v10m_srf(:, nsrf)) END DO CALL histwrite_phy("albs", albsol) + CALL histwrite_phy("tro3", wo * dobson_u * 1e3 / zmasse / rmo3 * md) CALL histwrite_phy("rugs", zxrugs) CALL histwrite_phy("s_pblh", s_pblh) CALL histwrite_phy("s_pblt", s_pblt) @@ -1199,6 +1078,11 @@ CALL histwrite_phy("dtvdf", d_t_vdf) CALL histwrite_phy("dqvdf", d_q_vdf) CALL histwrite_phy("rhum", zx_rh) + CALL histwrite_phy("d_t_ec", d_t_ec) + CALL histwrite_phy("dtsw0", heat0 / 86400.) + CALL histwrite_phy("dtlw0", - cool0 / 86400.) + CALL histwrite_phy("msnow", sum(fsnow * pctsrf, dim = 2)) + call histwrite_phy("qsurf", sum(fqsurf * pctsrf, dim = 2)) if (ok_instan) call histsync(nid_ins)