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, & |
24 |
iflag_phys, iecri |
iflag_phys, iecri |
25 |
USE conf_guide_m, ONLY: ok_guide |
USE conf_guide_m, ONLY: ok_guide |
26 |
USE dimens_m, ONLY: iim, jjm, llm, nqmx |
USE dimens_m, ONLY: iim, jjm, llm, nqmx |
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 |
|
use fluxstokenc_m, only: fluxstokenc |
|
33 |
use geopot_m, only: geopot |
use geopot_m, only: geopot |
34 |
USE guide_m, ONLY: guide |
USE guide_m, ONLY: guide |
35 |
use inidissip_m, only: idissip |
use inidissip_m, only: idissip |
36 |
use integrd_m, only: integrd |
use integrd_m, only: integrd |
37 |
use nr_util, only: assert |
use nr_util, only: assert |
|
USE pressure_var, ONLY: p3d |
|
38 |
USE temps, ONLY: itau_dyn |
USE temps, ONLY: itau_dyn |
39 |
use writedynav_m, only: writedynav |
use writedynav_m, only: writedynav |
40 |
use writehist_m, only: writehist |
use writehist_m, only: writehist |
75 |
! Tendances dynamiques |
! Tendances dynamiques |
76 |
REAL dv((iim + 1) * jjm, llm), dudyn(iim + 1, jjm + 1, llm) |
REAL dv((iim + 1) * jjm, llm), dudyn(iim + 1, jjm + 1, llm) |
77 |
REAL dteta(iim + 1, jjm + 1, llm) |
REAL dteta(iim + 1, jjm + 1, llm) |
78 |
real dp((iim + 1) * (jjm + 1)) |
real dp(iim + 1, jjm + 1) |
79 |
|
|
80 |
! Tendances de la dissipation : |
! Tendances de la dissipation : |
81 |
REAL dvdis(iim + 1, jjm, llm), dudis(iim + 1, jjm + 1, llm) |
REAL dvdis(iim + 1, jjm, llm), dudis(iim + 1, jjm + 1, llm) |
88 |
! Variables pour le fichier histoire |
! Variables pour le fichier histoire |
89 |
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 |
90 |
INTEGER itaufin |
INTEGER itaufin |
|
real finvmaold(iim + 1, jjm + 1, llm) |
|
91 |
INTEGER l |
INTEGER l |
92 |
|
|
93 |
! Variables test conservation \'energie |
! Variables test conservation \'energie |
97 |
logical leapf |
logical leapf |
98 |
real dt ! time step, in s |
real dt ! time step, in s |
99 |
|
|
100 |
|
REAL p3d(iim + 1, jjm + 1, llm + 1) ! pressure at layer interfaces, in Pa |
101 |
|
! ("p3d(i, j, l)" is at longitude "rlonv(i)", latitude "rlatu(j)", |
102 |
|
! for interface "l") |
103 |
|
|
104 |
!--------------------------------------------------- |
!--------------------------------------------------- |
105 |
|
|
106 |
print *, "Call sequence information: leapfrog" |
print *, "Call sequence information: leapfrog" |
128 |
tetam1 = teta |
tetam1 = teta |
129 |
massem1 = masse |
massem1 = masse |
130 |
psm1 = ps |
psm1 = ps |
|
finvmaold = masse |
|
|
CALL filtreg_scal(finvmaold, direct = .false., intensive = .false.) |
|
131 |
end if |
end if |
132 |
|
|
133 |
! Calcul des tendances dynamiques: |
! Calcul des tendances dynamiques: |
138 |
|
|
139 |
CALL caladvtrac(q, pbaru, pbarv, p3d, masse, teta, pk) |
CALL caladvtrac(q, pbaru, pbarv, p3d, masse, teta, pk) |
140 |
|
|
|
! Stokage du flux de masse pour traceurs offline: |
|
|
IF (offline) CALL fluxstokenc(pbaru, pbarv, masse, teta, phi, phis, & |
|
|
dtvr, itau) |
|
|
|
|
141 |
! Int\'egrations dynamique et traceurs: |
! Int\'egrations dynamique et traceurs: |
142 |
CALL integrd(vcovm1, ucovm1, tetam1, psm1, massem1, dv, dudyn, dteta, & |
CALL integrd(vcovm1, ucovm1, tetam1, psm1, massem1, dv, dudyn, dteta, & |
143 |
dp, vcov, ucov, teta, q(:, :, :, :2), ps, masse, finvmaold, dt, & |
dp, vcov, ucov, teta, q(:, :, :, :2), ps, masse, dt, leapf) |
|
leapf) |
|
144 |
|
|
145 |
forall (l = 1: llm + 1) p3d(:, :, l) = ap(l) + bp(l) * ps |
forall (l = 1: llm + 1) p3d(:, :, l) = ap(l) + bp(l) * ps |
146 |
CALL exner_hyb(ps, p3d, pks, pk) |
CALL exner_hyb(ps, p3d, pks, pk) |
156 |
|
|
157 |
! integrations dynamique et traceurs: |
! integrations dynamique et traceurs: |
158 |
CALL integrd(vcovm1, ucovm1, tetam1, psm1, massem1, dv, dudyn, & |
CALL integrd(vcovm1, ucovm1, tetam1, psm1, massem1, dv, dudyn, & |
159 |
dteta, dp, vcov, ucov, teta, q(:, :, :, :2), ps, masse, & |
dteta, dp, vcov, ucov, teta, q(:, :, :, :2), ps, masse, dtvr, & |
160 |
finvmaold, dtvr, leapf=.false.) |
leapf=.false.) |
161 |
|
|
162 |
forall (l = 1: llm + 1) p3d(:, :, l) = ap(l) + bp(l) * ps |
forall (l = 1: llm + 1) p3d(:, :, l) = ap(l) + bp(l) * ps |
163 |
CALL exner_hyb(ps, p3d, pks, pk) |
CALL exner_hyb(ps, p3d, pks, pk) |
165 |
CALL filtreg_scal(pkf, direct = .true., intensive = .true.) |
CALL filtreg_scal(pkf, direct = .true., intensive = .true.) |
166 |
end if |
end if |
167 |
|
|
168 |
IF (MOD(itau + 1, iphysiq) == 0 .AND. iflag_phys /= 0) THEN |
IF (MOD(itau + 1, iphysiq) == 0 .AND. iflag_phys) THEN |
169 |
CALL calfis(ucov, vcov, teta, q, pk, phis, phi, w, dufi, dvfi, & |
CALL calfis(ucov, vcov, teta, q, p3d, pk, phis, phi, w, dufi, dvfi, & |
170 |
dtetafi, dqfi, dayvrai = itau / day_step + day_ini, & |
dtetafi, dqfi, dayvrai = itau / day_step + day_ini, & |
171 |
time = REAL(mod(itau, day_step)) / day_step, & |
time = REAL(mod(itau, day_step)) / day_step, & |
172 |
lafin = itau + 1 == itaufin) |
lafin = itau + 1 == itaufin) |
197 |
forall (l = 1: llm) |
forall (l = 1: llm) |
198 |
teta(:, 1, l) = SUM(aire_2d(:iim, 1) * teta(:iim, 1, l)) & |
teta(:, 1, l) = SUM(aire_2d(:iim, 1) * teta(:iim, 1, l)) & |
199 |
/ apoln |
/ apoln |
200 |
teta(:, jjm + 1, l) = SUM(aire_2d(:iim, jjm+1) & |
teta(:, jjm + 1, l) = SUM(aire_2d(:iim, jjm + 1) & |
201 |
* teta(:iim, jjm + 1, l)) / apols |
* teta(:iim, jjm + 1, l)) / apols |
202 |
END forall |
END forall |
203 |
END IF |
END IF |