95 |
REAL flic_tmp(iim + 1, jjm + 1) !fraction land ice temporary |
REAL flic_tmp(iim + 1, jjm + 1) !fraction land ice temporary |
96 |
|
|
97 |
INTEGER l, ji |
INTEGER l, ji |
|
INTEGER nq |
|
98 |
|
|
99 |
REAL pk(iim + 1, jjm + 1, llm) ! fonction d'Exner aux milieux des couches |
REAL pk(iim + 1, jjm + 1, llm) ! fonction d'Exner aux milieux des couches |
100 |
real pks(iim + 1, jjm + 1) |
real pks(iim + 1, jjm + 1) |
185 |
|
|
186 |
q3d(:, :, :, 2:4) = 0. ! liquid water, radon and lead |
q3d(:, :, :, 2:4) = 0. ! liquid water, radon and lead |
187 |
|
|
188 |
! Ozone: |
if (nqmx >= 5) then |
189 |
|
! Ozone: |
190 |
|
|
191 |
! Compute ozone parameters on the LMDZ grid: |
! Compute ozone parameters on the LMDZ grid: |
192 |
call regr_coefoz |
call regr_coefoz |
193 |
|
|
194 |
! Find the month containing the day number "dayref": |
! Find the month containing the day number "dayref": |
195 |
month = (dayref - 1) / 30 + 1 |
month = (dayref - 1) / 30 + 1 |
196 |
print *, "month = ", month |
print *, "month = ", month |
197 |
|
|
198 |
call nf95_open("coefoz_LMDZ.nc", nf90_nowrite, ncid) |
call nf95_open("coefoz_LMDZ.nc", nf90_nowrite, ncid) |
199 |
|
|
200 |
! Get data at the right month from the input file: |
! Get data at the right month from the input file: |
201 |
call nf95_inq_varid(ncid, "r_Mob", varid) |
call nf95_inq_varid(ncid, "r_Mob", varid) |
202 |
ncerr = nf90_get_var(ncid, varid, q3d(:, :, :, 5), & |
ncerr = nf90_get_var(ncid, varid, q3d(:, :, :, 5), & |
203 |
start=(/1, 1, 1, month/)) |
start=(/1, 1, 1, month/)) |
204 |
call handle_err("nf90_get_var r_Mob", ncerr) |
call handle_err("nf90_get_var r_Mob", ncerr) |
205 |
|
|
206 |
call nf95_close(ncid) |
call nf95_close(ncid) |
207 |
! Latitudes are in increasing order in the input file while |
! Latitudes are in increasing order in the input file while |
208 |
! "rlatu" is in decreasing order so we need to invert order. Also, we |
! "rlatu" is in decreasing order so we need to invert order. Also, we |
209 |
! compute mass fraction from mole fraction: |
! compute mass fraction from mole fraction: |
210 |
q3d(:, :, :, 5) = q3d(:, jjm+1:1:-1, :, 5) * 48. / 29. |
q3d(:, :, :, 5) = q3d(:, jjm+1:1:-1, :, 5) * 48. / 29. |
211 |
|
end if |
212 |
|
|
213 |
tsol(:) = pack(tsol_2d, dyn_phy) |
tsol(:) = pack(tsol_2d, dyn_phy) |
214 |
qsol(:) = pack(qsol_2d, dyn_phy) |
qsol(:) = pack(qsol_2d, dyn_phy) |
306 |
END forall |
END forall |
307 |
|
|
308 |
! Initialisation pour traceurs: |
! Initialisation pour traceurs: |
309 |
call iniadvtrac(nq) |
call iniadvtrac |
310 |
! Ecriture: |
! Ecriture: |
311 |
CALL inidissip(lstardis, nitergdiv, nitergrot, niterh, tetagdiv, & |
CALL inidissip(lstardis, nitergdiv, nitergrot, niterh, tetagdiv, & |
312 |
tetagrot, tetatemp) |
tetagrot, tetatemp) |
318 |
CALL geopot(ip1jmp1, tpot, pk , pks, phis , phi) |
CALL geopot(ip1jmp1, tpot, pk , pks, phis , phi) |
319 |
CALL caldyn0(0, uvent, vvent, tpot, psol, masse, pk, phis, phi, w, & |
CALL caldyn0(0, uvent, vvent, tpot, psol, masse, pk, phis, phi, w, & |
320 |
pbaru, pbarv, 0) |
pbaru, pbarv, 0) |
321 |
CALL dynredem0("start.nc", dayref, phis, nqmx) |
CALL dynredem0("start.nc", dayref, phis) |
322 |
CALL dynredem1("start.nc", 0., vvent, uvent, tpot, q3d, nqmx, masse, psol) |
CALL dynredem1("start.nc", 0., vvent, uvent, tpot, q3d, masse, psol) |
323 |
|
|
324 |
! Ecriture état initial physique: |
! Ecriture état initial physique: |
325 |
print *, 'dtvr = ', dtvr |
print *, 'dtvr = ', dtvr |