--- trunk/dyn3d/leapfrog.f 2015/02/12 16:23:33 128 +++ trunk/Sources/dyn3d/leapfrog.f 2015/07/20 16:01:49 157 @@ -8,7 +8,8 @@ ! From dyn3d/leapfrog.F, version 1.6, 2005/04/13 08:58:34 revision 616 ! Authors: P. Le Van, L. Fairhead, F. Hourdin - ! Matsuno-leapfrog scheme. + + ! Intégration temporelle du modèle : Matsuno-leapfrog scheme. use addfi_m, only: addfi use bilan_dyn_m, only: bilan_dyn @@ -26,7 +27,7 @@ USE dynetat0_m, ONLY: day_ini use dynredem1_m, only: dynredem1 USE exner_hyb_m, ONLY: exner_hyb - use filtreg_m, only: filtreg + use filtreg_scal_m, only: filtreg_scal use fluxstokenc_m, only: fluxstokenc use geopot_m, only: geopot USE guide_m, ONLY: guide @@ -87,7 +88,6 @@ ! Variables pour le fichier histoire INTEGER itau ! index of the time step of the dynamics, starts at 0 INTEGER itaufin - REAL time ! time of day, as a fraction of day length real finvmaold(iim + 1, jjm + 1, llm) INTEGER l @@ -108,7 +108,9 @@ ! On initialise la pression et la fonction d'Exner : forall (l = 1: llm + 1) p3d(:, :, l) = ap(l) + bp(l) * ps - CALL exner_hyb(ps, p3d, pks, pk, pkf) + CALL exner_hyb(ps, p3d, pks, pk) + pkf = pk + CALL filtreg_scal(pkf, direct = .true., intensive = .true.) time_integration: do itau = 0, itaufin - 1 leapf = mod(itau, iperiod) /= 0 @@ -124,7 +126,7 @@ massem1 = masse psm1 = ps finvmaold = masse - CALL filtreg(finvmaold, direct = .false., intensive = .false.) + CALL filtreg_scal(finvmaold, direct = .false., intensive = .false.) end if ! Calcul des tendances dynamiques: @@ -145,7 +147,9 @@ leapf) forall (l = 1: llm + 1) p3d(:, :, l) = ap(l) + bp(l) * ps - CALL exner_hyb(ps, p3d, pks, pk, pkf) + CALL exner_hyb(ps, p3d, pks, pk) + pkf = pk + CALL filtreg_scal(pkf, direct = .true., intensive = .true.) if (.not. leapf) then ! Matsuno backward @@ -160,15 +164,15 @@ finvmaold, dtvr, leapf=.false.) forall (l = 1: llm + 1) p3d(:, :, l) = ap(l) + bp(l) * ps - CALL exner_hyb(ps, p3d, pks, pk, pkf) + CALL exner_hyb(ps, p3d, pks, pk) + pkf = pk + CALL filtreg_scal(pkf, direct = .true., intensive = .true.) end if IF (MOD(itau + 1, iphysiq) == 0 .AND. iflag_phys /= 0) THEN - ! Calcul des tendances physiques : - time = REAL(mod(itau, day_step)) / day_step - IF (time > 1.) time = time - 1. - CALL calfis(itau * dtvr / daysec + day_ini, time, ucov, vcov, teta, & - q, pk, phis, phi, w, dufi, dvfi, dtetafi, dqfi, & + CALL calfis(ucov, vcov, teta, q, 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) CALL addfi(ucov, vcov, teta, q, dufi, dvfi, dtetafi, dqfi) @@ -212,12 +216,11 @@ IF (MOD(itau + 1, iecri * day_step) == 0) THEN CALL geopot(teta, pk, pks, phis, phi) - CALL writehist(itau, vcov, ucov, teta, phi, q, masse, ps) + CALL writehist(itau, vcov, ucov, teta, phi, masse, ps) END IF end do time_integration - CALL dynredem1("restart.nc", vcov, ucov, teta, q, masse, ps, & - itau = itau_dyn + itaufin) + CALL dynredem1(vcov, ucov, teta, q, masse, ps, itau = itau_dyn + itaufin) ! Calcul des tendances dynamiques: CALL geopot(teta, pk, pks, phis, phi)