--- trunk/Sources/dyn3d/leapfrog.f 2015/07/24 14:27:59 161 +++ trunk/dyn3d/leapfrog.f 2018/02/05 10:39:38 254 @@ -16,26 +16,25 @@ use caladvtrac_m, only: caladvtrac use caldyn_m, only: caldyn USE calfis_m, ONLY: calfis - USE comconst, ONLY: daysec, dtvr + USE comconst, ONLY: dtvr USE comgeom, ONLY: aire_2d, apoln, apols use covcont_m, only: covcont USE disvert_m, ONLY: ap, bp - USE conf_gcm_m, ONLY: day_step, iconser, iperiod, iphysiq, nday, offline, & + USE conf_gcm_m, ONLY: day_step, iconser, iperiod, iphysiq, nday, & iflag_phys, iecri USE conf_guide_m, ONLY: ok_guide USE dimens_m, ONLY: iim, jjm, llm, nqmx use dissip_m, only: dissip USE dynetat0_m, ONLY: day_ini use dynredem1_m, only: dynredem1 + use enercin_m, only: enercin USE exner_hyb_m, ONLY: exner_hyb use filtreg_scal_m, only: filtreg_scal - use fluxstokenc_m, only: fluxstokenc use geopot_m, only: geopot USE guide_m, ONLY: guide use inidissip_m, only: idissip use integrd_m, only: integrd use nr_util, only: assert - USE pressure_var, ONLY: p3d USE temps, ONLY: itau_dyn use writedynav_m, only: writedynav use writehist_m, only: writehist @@ -76,7 +75,7 @@ ! Tendances dynamiques REAL dv((iim + 1) * jjm, llm), dudyn(iim + 1, jjm + 1, llm) REAL dteta(iim + 1, jjm + 1, llm) - real dp((iim + 1) * (jjm + 1)) + real dp(iim + 1, jjm + 1) ! Tendances de la dissipation : REAL dvdis(iim + 1, jjm, llm), dudis(iim + 1, jjm + 1, llm) @@ -98,6 +97,10 @@ logical leapf real dt ! time step, in s + REAL p3d(iim + 1, jjm + 1, llm + 1) ! pressure at layer interfaces, in Pa + ! ("p3d(i, j, l)" is at longitude "rlonv(i)", latitude "rlatu(j)", + ! for interface "l") + !--------------------------------------------------- print *, "Call sequence information: leapfrog" @@ -135,10 +138,6 @@ CALL caladvtrac(q, pbaru, pbarv, p3d, masse, teta, pk) - ! Stokage du flux de masse pour traceurs offline: - IF (offline) CALL fluxstokenc(pbaru, pbarv, masse, teta, phi, phis, & - dtvr, itau) - ! Int\'egrations dynamique et traceurs: CALL integrd(vcovm1, ucovm1, tetam1, psm1, massem1, dv, dudyn, dteta, & dp, vcov, ucov, teta, q(:, :, :, :2), ps, masse, dt, leapf) @@ -166,8 +165,8 @@ CALL filtreg_scal(pkf, direct = .true., intensive = .true.) end if - IF (MOD(itau + 1, iphysiq) == 0 .AND. iflag_phys /= 0) THEN - CALL calfis(ucov, vcov, teta, q, pk, phis, phi, w, dufi, dvfi, & + IF (MOD(itau + 1, iphysiq) == 0 .AND. iflag_phys) THEN + CALL calfis(ucov, vcov, teta, q, p3d, pk, phis, phi, w, dufi, dvfi, & dtetafi, dqfi, dayvrai = itau / day_step + day_ini, & time = REAL(mod(itau, day_step)) / day_step, & lafin = itau + 1 == itaufin) @@ -198,7 +197,7 @@ forall (l = 1: llm) teta(:, 1, l) = SUM(aire_2d(:iim, 1) * teta(:iim, 1, l)) & / apoln - teta(:, jjm + 1, l) = SUM(aire_2d(:iim, jjm+1) & + teta(:, jjm + 1, l) = SUM(aire_2d(:iim, jjm + 1) & * teta(:iim, jjm + 1, l)) / apols END forall END IF