16 |
use caladvtrac_m, only: caladvtrac |
use caladvtrac_m, only: caladvtrac |
17 |
use caldyn_m, only: caldyn |
use caldyn_m, only: caldyn |
18 |
USE calfis_m, ONLY: calfis |
USE calfis_m, ONLY: calfis |
19 |
USE comconst, ONLY: daysec, dtvr |
USE comconst, ONLY: dtvr |
20 |
USE comgeom, ONLY: aire_2d, apoln, apols |
USE comgeom, ONLY: aire_2d, apoln, apols |
21 |
|
use covcont_m, only: covcont |
22 |
USE disvert_m, ONLY: ap, bp |
USE disvert_m, ONLY: ap, bp |
23 |
USE conf_gcm_m, ONLY: day_step, iconser, iperiod, iphysiq, nday, offline, & |
USE conf_gcm_m, ONLY: day_step, iconser, iperiod, iphysiq, nday, offline, & |
24 |
iflag_phys, iecri |
iflag_phys, iecri |
27 |
use dissip_m, only: dissip |
use dissip_m, only: dissip |
28 |
USE dynetat0_m, ONLY: day_ini |
USE dynetat0_m, ONLY: day_ini |
29 |
use dynredem1_m, only: dynredem1 |
use dynredem1_m, only: dynredem1 |
30 |
|
use enercin_m, only: enercin |
31 |
USE exner_hyb_m, ONLY: exner_hyb |
USE exner_hyb_m, ONLY: exner_hyb |
32 |
use filtreg_scal_m, only: filtreg_scal |
use filtreg_scal_m, only: filtreg_scal |
33 |
use fluxstokenc_m, only: fluxstokenc |
use fluxstokenc_m, only: fluxstokenc |
36 |
use inidissip_m, only: idissip |
use inidissip_m, only: idissip |
37 |
use integrd_m, only: integrd |
use integrd_m, only: integrd |
38 |
use nr_util, only: assert |
use nr_util, only: assert |
|
USE pressure_var, ONLY: p3d |
|
39 |
USE temps, ONLY: itau_dyn |
USE temps, ONLY: itau_dyn |
40 |
use writedynav_m, only: writedynav |
use writedynav_m, only: writedynav |
41 |
use writehist_m, only: writehist |
use writehist_m, only: writehist |
89 |
! Variables pour le fichier histoire |
! Variables pour le fichier histoire |
90 |
INTEGER itau ! index of the time step of the dynamics, starts at 0 |
INTEGER itau ! index of the time step of the dynamics, starts at 0 |
91 |
INTEGER itaufin |
INTEGER itaufin |
|
real finvmaold(iim + 1, jjm + 1, llm) |
|
92 |
INTEGER l |
INTEGER l |
93 |
|
|
94 |
! Variables test conservation \'energie |
! Variables test conservation \'energie |
98 |
logical leapf |
logical leapf |
99 |
real dt ! time step, in s |
real dt ! time step, in s |
100 |
|
|
101 |
|
REAL p3d(iim + 1, jjm + 1, llm+1) ! pressure at layer interfaces, in Pa |
102 |
|
! ("p3d(i, j, l)" is at longitude "rlonv(i)", latitude "rlatu(j)", |
103 |
|
! for interface "l") |
104 |
|
|
105 |
!--------------------------------------------------- |
!--------------------------------------------------- |
106 |
|
|
107 |
print *, "Call sequence information: leapfrog" |
print *, "Call sequence information: leapfrog" |
129 |
tetam1 = teta |
tetam1 = teta |
130 |
massem1 = masse |
massem1 = masse |
131 |
psm1 = ps |
psm1 = ps |
|
finvmaold = masse |
|
|
CALL filtreg_scal(finvmaold, direct = .false., intensive = .false.) |
|
132 |
end if |
end if |
133 |
|
|
134 |
! Calcul des tendances dynamiques: |
! Calcul des tendances dynamiques: |
145 |
|
|
146 |
! Int\'egrations dynamique et traceurs: |
! Int\'egrations dynamique et traceurs: |
147 |
CALL integrd(vcovm1, ucovm1, tetam1, psm1, massem1, dv, dudyn, dteta, & |
CALL integrd(vcovm1, ucovm1, tetam1, psm1, massem1, dv, dudyn, dteta, & |
148 |
dp, vcov, ucov, teta, q(:, :, :, :2), ps, masse, finvmaold, dt, & |
dp, vcov, ucov, teta, q(:, :, :, :2), ps, masse, dt, leapf) |
|
leapf) |
|
149 |
|
|
150 |
forall (l = 1: llm + 1) p3d(:, :, l) = ap(l) + bp(l) * ps |
forall (l = 1: llm + 1) p3d(:, :, l) = ap(l) + bp(l) * ps |
151 |
CALL exner_hyb(ps, p3d, pks, pk) |
CALL exner_hyb(ps, p3d, pks, pk) |
161 |
|
|
162 |
! integrations dynamique et traceurs: |
! integrations dynamique et traceurs: |
163 |
CALL integrd(vcovm1, ucovm1, tetam1, psm1, massem1, dv, dudyn, & |
CALL integrd(vcovm1, ucovm1, tetam1, psm1, massem1, dv, dudyn, & |
164 |
dteta, dp, vcov, ucov, teta, q(:, :, :, :2), ps, masse, & |
dteta, dp, vcov, ucov, teta, q(:, :, :, :2), ps, masse, dtvr, & |
165 |
finvmaold, dtvr, leapf=.false.) |
leapf=.false.) |
166 |
|
|
167 |
forall (l = 1: llm + 1) p3d(:, :, l) = ap(l) + bp(l) * ps |
forall (l = 1: llm + 1) p3d(:, :, l) = ap(l) + bp(l) * ps |
168 |
CALL exner_hyb(ps, p3d, pks, pk) |
CALL exner_hyb(ps, p3d, pks, pk) |
171 |
end if |
end if |
172 |
|
|
173 |
IF (MOD(itau + 1, iphysiq) == 0 .AND. iflag_phys /= 0) THEN |
IF (MOD(itau + 1, iphysiq) == 0 .AND. iflag_phys /= 0) THEN |
174 |
CALL calfis(itau / day_step + day_ini, & |
CALL calfis(ucov, vcov, teta, q, p3d, pk, phis, phi, w, dufi, dvfi, & |
175 |
REAL(mod(itau, day_step)) / day_step, ucov, vcov, teta, q, pk, & |
dtetafi, dqfi, dayvrai = itau / day_step + day_ini, & |
176 |
phis, phi, w, dufi, dvfi, dtetafi, dqfi, & |
time = REAL(mod(itau, day_step)) / day_step, & |
177 |
lafin = itau + 1 == itaufin) |
lafin = itau + 1 == itaufin) |
178 |
|
|
179 |
CALL addfi(ucov, vcov, teta, q, dufi, dvfi, dtetafi, dqfi) |
CALL addfi(ucov, vcov, teta, q, dufi, dvfi, dtetafi, dqfi) |
221 |
END IF |
END IF |
222 |
end do time_integration |
end do time_integration |
223 |
|
|
224 |
CALL dynredem1("restart.nc", vcov, ucov, teta, q, masse, ps, & |
CALL dynredem1(vcov, ucov, teta, q, masse, ps, itau = itau_dyn + itaufin) |
|
itau = itau_dyn + itaufin) |
|
225 |
|
|
226 |
! Calcul des tendances dynamiques: |
! Calcul des tendances dynamiques: |
227 |
CALL geopot(teta, pk, pks, phis, phi) |
CALL geopot(teta, pk, pks, phis, phi) |