2 |
|
|
3 |
implicit none |
implicit none |
4 |
|
|
5 |
|
integer, save:: nid_ins |
6 |
|
|
7 |
contains |
contains |
8 |
|
|
9 |
subroutine ini_histins(dtime, ok_instan, nid_ins) |
subroutine ini_histins(dtime) |
10 |
|
|
11 |
! From phylmd/ini_histins.h, v 1.2 2005/05/25 13:10:09 |
! From phylmd/ini_histins.h, v 1.2 2005/05/25 13:10:09 |
12 |
|
|
13 |
use dimens_m, only: iim, jjm, llm |
use clesphys, only: ecrit_ins, ok_instan |
14 |
use dimphy, only: klon |
use clesphys2, only: conv_emanuel |
15 |
use temps, only: itau_phy, day_ref, annee_ref |
use dimens_m, only: iim, jjm, llm, nqmx |
16 |
use clesphys, only: ecrit_ins |
use disvert_m, only: presnivs |
17 |
use indicesol, only: nbsrf, clnsurf |
use dynetat0_m, only: day_ref, annee_ref, rlatu, rlonv |
|
USE calendar, only: ymds2ju |
|
18 |
USE histbeg_totreg_m, ONLY : histbeg_totreg |
USE histbeg_totreg_m, ONLY : histbeg_totreg |
19 |
USE histdef_m, ONLY : histdef |
USE histdef_m, ONLY : histdef |
20 |
USE histend_m, ONLY : histend |
USE histend_m, ONLY : histend |
21 |
USE histvert_m, ONLY : histvert |
USE histvert_m, ONLY : histvert |
22 |
use phyetat0_m, only: rlon, rlat |
use indicesol, only: nbsrf, clnsurf |
23 |
use disvert_m, only: presnivs |
use iniadvtrac_m, only: tname, ttext |
24 |
|
use nr_util, only: pi |
25 |
|
use phyetat0_m, only: itau_phy |
26 |
|
USE ymds2ju_m, only: ymds2ju |
27 |
|
|
28 |
REAL, intent(in):: dtime ! pas temporel de la physique (s) |
REAL, intent(in):: dtime ! pas temporel de la physique (s) |
|
logical, intent(in):: ok_instan |
|
|
integer, intent(out):: nid_ins |
|
29 |
|
|
30 |
REAL zx_lon(iim, jjm + 1), zx_lat(iim, jjm + 1) |
! Local: |
31 |
real zjulian, zsto, zout |
real zjulian, zsto, zout |
32 |
integer i, nhori, nvert, idayref, nsrf |
integer nhori, nvert, nsrf, iq, it |
33 |
|
|
34 |
!------------------------------------------------------------------- |
!------------------------------------------------------------------- |
35 |
|
|
36 |
IF (ok_instan) THEN |
IF (ok_instan) THEN |
|
|
|
37 |
zsto = dtime * ecrit_ins |
zsto = dtime * ecrit_ins |
38 |
zout = dtime * ecrit_ins |
zout = dtime * ecrit_ins |
39 |
|
CALL ymds2ju(annee_ref, 1, day_ref, 0.0, zjulian) |
40 |
idayref = day_ref |
CALL histbeg_totreg("histins", rlonv(:iim) / pi * 180., & |
41 |
CALL ymds2ju(annee_ref, 1, idayref, 0.0, zjulian) |
rlatu / pi * 180., 1, iim, & |
42 |
|
1, jjm + 1, itau_phy, zjulian, dtime, nhori, nid_ins) |
|
CALL gr_fi_ecrit(1, klon, iim, (jjm + 1), rlon, zx_lon) |
|
|
DO i = 1, iim |
|
|
zx_lon(i, 1) = rlon(i+1) |
|
|
zx_lon(i, (jjm + 1)) = rlon(i+1) |
|
|
ENDDO |
|
|
CALL gr_fi_ecrit(1, klon, iim, (jjm + 1), rlat, zx_lat) |
|
|
CALL histbeg_totreg("histins", zx_lon(:, 1), zx_lat(1, :), 1, iim, 1, & |
|
|
jjm + 1, itau_phy, zjulian, dtime, nhori, nid_ins) |
|
43 |
write(*, *)'Inst ', itau_phy, zjulian |
write(*, *)'Inst ', itau_phy, zjulian |
44 |
CALL histvert(nid_ins, "presnivs", "Vertical levels", "mb", & |
CALL histvert(nid_ins, "presnivs", "Vertical levels", "mb", & |
45 |
presnivs/100., nvert) |
presnivs/100., nvert) |
|
|
|
46 |
CALL histdef(nid_ins, "phis", "Surface geop. height", "-", & |
CALL histdef(nid_ins, "phis", "Surface geop. height", "-", & |
47 |
iim, (jjm + 1), nhori, 1, 1, 1, -99, & |
iim, (jjm + 1), nhori, 1, 1, 1, -99, & |
48 |
"once", zsto, zout) |
"once", zsto, zout) |
|
|
|
49 |
CALL histdef(nid_ins, "aire", "Grid area", "-", & |
CALL histdef(nid_ins, "aire", "Grid area", "-", & |
50 |
iim, (jjm + 1), nhori, 1, 1, 1, -99, & |
iim, (jjm + 1), nhori, 1, 1, 1, -99, & |
51 |
"once", zsto, zout) |
"once", zsto, zout) |
154 |
"inst(X)", zsto, zout) |
"inst(X)", zsto, zout) |
155 |
|
|
156 |
DO nsrf = 1, nbsrf |
DO nsrf = 1, nbsrf |
|
|
|
157 |
call histdef(nid_ins, "pourc_"//clnsurf(nsrf), & |
call histdef(nid_ins, "pourc_"//clnsurf(nsrf), & |
158 |
"% "//clnsurf(nsrf), "%", & |
"% "//clnsurf(nsrf), "%", & |
159 |
iim, (jjm + 1), nhori, 1, 1, 1, -99, & |
iim, (jjm + 1), nhori, 1, 1, 1, -99, & |
198 |
"rugosite "//clnsurf(nsrf), "-", & |
"rugosite "//clnsurf(nsrf), "-", & |
199 |
iim, (jjm + 1), nhori, 1, 1, 1, -99, & |
iim, (jjm + 1), nhori, 1, 1, 1, -99, & |
200 |
"inst(X)", zsto, zout) |
"inst(X)", zsto, zout) |
|
!XXX |
|
201 |
END DO |
END DO |
202 |
|
|
203 |
CALL histdef(nid_ins, "rugs", "rugosity", "-", & |
CALL histdef(nid_ins, "rugs", "rugosity", "-", & |
204 |
iim, (jjm + 1), nhori, 1, 1, 1, -99, & |
iim, (jjm + 1), nhori, 1, 1, 1, -99, & |
205 |
"inst(X)", zsto, zout) |
"inst(X)", zsto, zout) |
207 |
CALL histdef(nid_ins, "albs", "Surface albedo", "-", & |
CALL histdef(nid_ins, "albs", "Surface albedo", "-", & |
208 |
iim, (jjm + 1), nhori, 1, 1, 1, -99, & |
iim, (jjm + 1), nhori, 1, 1, 1, -99, & |
209 |
"inst(X)", zsto, zout) |
"inst(X)", zsto, zout) |
|
CALL histdef(nid_ins, "albslw", "Surface albedo LW", "-", & |
|
|
iim, (jjm + 1), nhori, 1, 1, 1, -99, & |
|
|
"inst(X)", zsto, zout) |
|
210 |
|
|
|
!IM cf. AM 081204 BEG |
|
|
! HBTM2 |
|
211 |
CALL histdef(nid_ins, "s_pblh", "Boundary Layer Height", "m", & |
CALL histdef(nid_ins, "s_pblh", "Boundary Layer Height", "m", & |
212 |
iim, (jjm + 1), nhori, 1, 1, 1, -99, & |
iim, (jjm + 1), nhori, 1, 1, 1, -99, & |
213 |
"inst(X)", zsto, zout) |
"inst(X)", zsto, zout) |
249 |
iim, (jjm + 1), nhori, 1, 1, 1, -99, & |
iim, (jjm + 1), nhori, 1, 1, 1, -99, & |
250 |
"inst(X)", zsto, zout) |
"inst(X)", zsto, zout) |
251 |
|
|
252 |
!IM cf. AM 081204 END |
if (conv_emanuel) then |
253 |
|
CALL histdef(nid_ins, "ptop", "cloud top pressure", & |
254 |
|
"Pa", iim, jjm + 1, nhori, 1, 1, 1, -99, "inst(X)", zsto, zout) |
255 |
|
CALL histdef(nid_ins, "dnwd0", "unsaturated downdraft", & |
256 |
|
"kg/m2/s", iim, jjm + 1, nhori, llm, 1, llm, nvert, "inst(X)", & |
257 |
|
zsto, zout) |
258 |
|
end if |
259 |
|
|
260 |
! Champs 3D: |
! Champs 3D: |
261 |
|
|
262 |
|
CALL histdef(nid_ins, "tro3", "ozone mole fraction", "-", & |
263 |
|
iim, jjm + 1, nhori, llm, 1, llm, nvert, "inst(X)", zsto, zout) |
264 |
|
|
265 |
CALL histdef(nid_ins, "temp", "Temperature", "K", & |
CALL histdef(nid_ins, "temp", "Temperature", "K", & |
266 |
iim, (jjm + 1), nhori, llm, 1, llm, nvert, & |
iim, (jjm + 1), nhori, llm, 1, llm, nvert, & |
267 |
"inst(X)", zsto, zout) |
"inst(X)", zsto, zout) |
290 |
iim, (jjm + 1), nhori, llm, 1, llm, nvert, & |
iim, (jjm + 1), nhori, llm, 1, llm, nvert, & |
291 |
"inst(X)", zsto, zout) |
"inst(X)", zsto, zout) |
292 |
|
|
293 |
|
CALL histdef(nid_ins, "zmasse", "column density of air in cell", & |
294 |
|
"kg m-2", iim, jjm + 1, nhori, llm, 1, llm, nvert, "inst(X)", & |
295 |
|
zsto, zout) |
296 |
|
|
297 |
|
CALL histdef(nid_ins, "rhum", "Relative humidity", & |
298 |
|
"", iim, jjm + 1, nhori, llm, 1, llm, nvert, "inst(X)", & |
299 |
|
zsto, zout) |
300 |
|
|
301 |
|
DO it = 1, nqmx - 2 |
302 |
|
! champ 2D |
303 |
|
iq=it+2 |
304 |
|
CALL histdef(nid_ins, tname(iq), ttext(iq), "U/kga", iim, jjm+1, & |
305 |
|
nhori, llm, 1, llm, nvert, "inst(X)", zsto, zout) |
306 |
|
CALL histdef(nid_ins, "fl"//tname(iq), "Flux "//ttext(iq), & |
307 |
|
"U/m2/s", iim, jjm+1, nhori, llm, 1, llm, nvert, & |
308 |
|
"inst(X)", zsto, zout) |
309 |
|
|
310 |
|
!---Ajout Olivia |
311 |
|
CALL histdef(nid_ins, "d_tr_th_"//tname(iq), & |
312 |
|
"tendance thermique"// ttext(iq), "?", & |
313 |
|
iim, jjm+1, nhori, llm, 1, llm, nvert, & |
314 |
|
"inst(X)", zsto, zout) |
315 |
|
CALL histdef(nid_ins, "d_tr_cv_"//tname(iq), & |
316 |
|
"tendance convection"// ttext(iq), "?", & |
317 |
|
iim, jjm+1, nhori, llm, 1, llm, nvert, & |
318 |
|
"inst(X)", zsto, zout) |
319 |
|
CALL histdef(nid_ins, "d_tr_cl_"//tname(iq), & |
320 |
|
"tendance couche limite"// ttext(iq), "?", & |
321 |
|
iim, jjm+1, nhori, llm, 1, llm, nvert, & |
322 |
|
"inst(X)", zsto, zout) |
323 |
|
!---fin Olivia |
324 |
|
|
325 |
|
ENDDO |
326 |
|
|
327 |
CALL histend(nid_ins) |
CALL histend(nid_ins) |
328 |
ENDIF |
ENDIF |
329 |
|
|