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