1 | ! |
---|
2 | ! $Header$ |
---|
3 | ! |
---|
4 | |
---|
5 | IF (ok_hf) THEN |
---|
6 | c |
---|
7 | zstohf = ecrit_hf |
---|
8 | zstophy = dtime |
---|
9 | zstoday = ecrit_day |
---|
10 | zout = ecrit_hf |
---|
11 | c |
---|
12 | idayref = day_ref |
---|
13 | CALL ymds2ju(annee_ref, 1, idayref, 0.0, zjulian) |
---|
14 | |
---|
15 | c |
---|
16 | CALL gr_fi_ecrit(1,klon,iim,jjmp1,rlon,zx_lon) |
---|
17 | DO i = 1, iim |
---|
18 | zx_lon(i,1) = rlon(i+1) |
---|
19 | zx_lon(i,jjmp1) = rlon(i+1) |
---|
20 | ENDDO |
---|
21 | |
---|
22 | CALL gr_fi_ecrit(1,klon,iim,jjmp1,rlat,zx_lat) |
---|
23 | CALL histbeg("histhf", iim,zx_lon(:,1), jjmp1,zx_lat(1,:), |
---|
24 | . 1,iim,1,jjmp1, itau_phy, zjulian, dtime, |
---|
25 | . nhori, nid_hf) |
---|
26 | |
---|
27 | CALL histvert(nid_hf, "presnivs", "Vertical levels", "mb", |
---|
28 | . klev, presnivs/100., nvert) |
---|
29 | c |
---|
30 | |
---|
31 | IF(type_run.EQ."CLIM".OR.type_run.EQ."ENSP") THEN |
---|
32 | c |
---|
33 | IF(lev_histhf.GE.1) THEN |
---|
34 | c |
---|
35 | CALL histdef(nid_hf, "aireTER","Grid area CONT","-", |
---|
36 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
37 | . "once", zstohf,zout) |
---|
38 | c |
---|
39 | CALL histdef(nid_hf, "contfracATM","% sfce ter+lic ","-", |
---|
40 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
41 | . "once", zstohf,zout) |
---|
42 | c |
---|
43 | CALL histdef(nid_hf, "contfracOR","% sfce terre OR", "-", |
---|
44 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
45 | . "once", zstohf,zout) |
---|
46 | c |
---|
47 | c Champs 2D: |
---|
48 | c |
---|
49 | CALL histdef(nid_hf, "t2m", "Temperature 2m", "K", |
---|
50 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
51 | . "inst(X)", zstohf,zout) |
---|
52 | c |
---|
53 | CALL histdef(nid_hf, "q2m", "Specific humidity", "kg/kg", |
---|
54 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
55 | . "inst(X)", zstohf,zout) |
---|
56 | c |
---|
57 | CALL histdef(nid_hf, "psol", "Surface Pressure", "Pa", |
---|
58 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
59 | . "inst(X)", zstohf,zout) |
---|
60 | c |
---|
61 | CALL histdef(nid_hf, "precip", "Precipitation", "kg/(s*m2)", |
---|
62 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
63 | . "ave(X)", zstophy,zout) |
---|
64 | c |
---|
65 | cIM ENSEMBLES BEG |
---|
66 | CALL histdef(nid_hf, "tsol", "Surface Temperature", "K", |
---|
67 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
68 | . "inst(X)", zstohf,zout) |
---|
69 | c |
---|
70 | CALL histdef(nid_hf, "slp", "Sea Level Pressure", "Pa", |
---|
71 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
72 | . "inst(X)", zstohf,zout) |
---|
73 | c |
---|
74 | CALL histdef(nid_hf, "u10m", "Vent zonal 10m", "m/s", |
---|
75 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
76 | . "inst(X)", zstohf,zout) |
---|
77 | c |
---|
78 | CALL histdef(nid_hf, "v10m", "Vent meridien 10m", "m/s", |
---|
79 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
80 | . "inst(X)", zstohf,zout) |
---|
81 | c |
---|
82 | CALL histdef(nid_hf, "wind10m","10-m wind speed","m/s", |
---|
83 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
84 | . "inst(X)", zstohf,zout) |
---|
85 | c |
---|
86 | DO k=1, nlevSTD |
---|
87 | c |
---|
88 | c bb=clevSTD(k) |
---|
89 | c |
---|
90 | IF(k.GE.2.AND.k.LE.12) bb2=clevSTD(k) |
---|
91 | IF(k.GE.13.AND.k.LE.17) bb3=clevSTD(k) |
---|
92 | c |
---|
93 | c IF(k.GE.2) THEN |
---|
94 | c aa=clevSTD(k) |
---|
95 | c bb=aa(1:lnblnk1(aa)) |
---|
96 | c ENDIF |
---|
97 | c |
---|
98 | IF(bb2.EQ."500") THEN |
---|
99 | CALL histdef(nid_hf, "phi"//bb2, |
---|
100 | . "Geopotential "//bb2//"mb", "m", |
---|
101 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
102 | . "inst(X)", zstohf,zout) |
---|
103 | ENDIF !bb2.EQ."500" |
---|
104 | ENDDO !k=1, nlevSTD |
---|
105 | c |
---|
106 | ENDIF !lev_histhf.GE.1 |
---|
107 | c |
---|
108 | IF(lev_histhf.GE.2) THEN |
---|
109 | c |
---|
110 | CALL histdef(nid_hf, "cldt", "Total cloudiness", "%", |
---|
111 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
112 | . "ave(X)", zstophy,zout) |
---|
113 | c |
---|
114 | CALL histdef(nid_hf, "SWnetOR", |
---|
115 | . "Sfce net SW radiation OR", "W/m2", |
---|
116 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
117 | . "ave(X)", zstophy,zout) |
---|
118 | c |
---|
119 | CALL histdef(nid_hf, "SWdownOR", |
---|
120 | . "Sfce incident SW radiation OR", "W/m2", |
---|
121 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
122 | . "ave(X)", zstophy,zout) |
---|
123 | c |
---|
124 | CALL histdef(nid_hf, "LWdownOR", |
---|
125 | . "Sfce incident LW radiation OR", "W/m2", |
---|
126 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
127 | . "ave(X)", zstophy,zout) |
---|
128 | ENDIF !lev_histhf.GE.2 |
---|
129 | c |
---|
130 | cIM ENSEMBLES END |
---|
131 | c |
---|
132 | IF(lev_histhf.GE.3) THEN |
---|
133 | c |
---|
134 | DO k=1, nlevSTD |
---|
135 | c |
---|
136 | c bb=clevSTD(k) |
---|
137 | c |
---|
138 | c IF(k.GE.2) THEN |
---|
139 | IF(k.GE.2.AND.k.LE.12) bb2=clevSTD(k) |
---|
140 | IF(k.GE.13.AND.k.LE.17) bb3=clevSTD(k) |
---|
141 | c aa=clevSTD(k) |
---|
142 | c bb=aa(1:lnblnk1(aa)) |
---|
143 | c ENDIF |
---|
144 | c |
---|
145 | IF(bb2.EQ."850".or.bb2.EQ."700".OR. |
---|
146 | $ bb2.EQ."500".or.bb2.EQ."200") THEN |
---|
147 | c |
---|
148 | CALL histdef(nid_hf, "t"//bb2, |
---|
149 | . "Temperature "//bb2//"mb","K", |
---|
150 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
151 | . "inst(X)", zstohf,zout) |
---|
152 | c |
---|
153 | IF(bb2.NE."500") THEN |
---|
154 | CALL histdef(nid_hf, "phi"//bb2, |
---|
155 | . "Geopotential "//bb2//"mb", "m", |
---|
156 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
157 | . "inst(X)", zstohf,zout) |
---|
158 | ENDIF |
---|
159 | c |
---|
160 | CALL histdef(nid_hf, "q"//bb2, |
---|
161 | . "Specific humidity "//bb2//"mb","kg/kg", |
---|
162 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
163 | . "inst(X)", zstohf,zout) |
---|
164 | c |
---|
165 | CALL histdef(nid_hf, "u"//bb2, |
---|
166 | . "Zonal wind "//bb2//"mb","m/s", |
---|
167 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
168 | . "inst(X)", zstohf,zout) |
---|
169 | c |
---|
170 | CALL histdef(nid_hf, "v"//bb2, |
---|
171 | . "Meridional wind "//bb2//"mb","m/s", |
---|
172 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
173 | . "inst(X)", zstohf,zout) |
---|
174 | c |
---|
175 | ENDIF !IF(bb2.EQ."850".or.bb2.EQ."700".OR. |
---|
176 | c |
---|
177 | ENDDO !nlevSTD |
---|
178 | c |
---|
179 | ENDIF !lev_histhf.GE.3 |
---|
180 | c |
---|
181 | IF(lev_histhf.GE.4) THEN |
---|
182 | c |
---|
183 | cIM sorties hf 3D |
---|
184 | c |
---|
185 | #undef histhf3d |
---|
186 | #define histhf3d |
---|
187 | #ifdef histhf3d |
---|
188 | #include "ini_histhf3d.h" |
---|
189 | #endif |
---|
190 | ENDIF !lev_histhf.GE.4 |
---|
191 | c |
---|
192 | c |
---|
193 | ELSE IF(type_run.EQ."AMIP".OR.type_run.EQ."CFMI") THEN |
---|
194 | c |
---|
195 | IF(lev_histhf.GE.1) THEN |
---|
196 | c |
---|
197 | DO k=1, nlevSTD |
---|
198 | c |
---|
199 | c |
---|
200 | c bb=clevSTD(k) |
---|
201 | c |
---|
202 | c IF(k.GE.2) THEN |
---|
203 | IF(k.GE.2.AND.k.LE.12) bb2=clevSTD(k) |
---|
204 | IF(k.GE.13.AND.k.LE.17) bb3=clevSTD(k) |
---|
205 | c aa=clevSTD(k) |
---|
206 | c bb=aa(1:lnblnk1(aa)) |
---|
207 | c ENDIF |
---|
208 | c |
---|
209 | IF(bb2.EQ."850".or.bb2.EQ."200") THEN |
---|
210 | c |
---|
211 | CALL histdef(nid_hf, "u"//bb2, |
---|
212 | . "Zonal wind "//bb2//"mb","m/s", |
---|
213 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
214 | . "inst(X)", zstohf,zstohf) |
---|
215 | c |
---|
216 | CALL histdef(nid_hf, "v"//bb2, |
---|
217 | . "Meridional wind "//bb2//"mb","m/s", |
---|
218 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
219 | . "inst(X)", zstohf,zstohf) |
---|
220 | c |
---|
221 | ENDIF !bb2.EQ."850".or.bb2.EQ."200" |
---|
222 | ENDDO !k=1, nlevSTD |
---|
223 | c |
---|
224 | CALL histdef(nid_hf, "topl", |
---|
225 | . "Outgoing longwave radiation", "W/m2", |
---|
226 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
227 | . "ave(X)", zstophy,zout) |
---|
228 | c |
---|
229 | CALL histdef(nid_hf, "precip","Total precipitation rate", |
---|
230 | . "kg/(s*m2)",iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
231 | . "ave(X)", zstophy,zout) |
---|
232 | c |
---|
233 | CALL histdef(nid_hf, "slp", |
---|
234 | . "Mean sea-level pressure", "Pa", |
---|
235 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
236 | . "inst(X)", zstohf,zout) |
---|
237 | c |
---|
238 | cIM 280504 BEG |
---|
239 | ENDIF !(lev_histhf.GE.1) THEN |
---|
240 | c |
---|
241 | IF(lev_histhf.GE.2) THEN |
---|
242 | c |
---|
243 | DO k=1, nlevSTD |
---|
244 | c |
---|
245 | c bb=clevSTD(k) |
---|
246 | c |
---|
247 | c IF(k.GE.2) THEN |
---|
248 | IF(k.GE.2.AND.k.LE.12) bb2=clevSTD(k) |
---|
249 | IF(k.GE.13.AND.k.LE.17) bb3=clevSTD(k) |
---|
250 | c aa=clevSTD(k) |
---|
251 | c bb=aa(1:lnblnk1(aa)) |
---|
252 | c ENDIF |
---|
253 | c |
---|
254 | IF(bb2.EQ."850".OR.bb2.EQ."500") THEN |
---|
255 | c |
---|
256 | CALL histdef(nid_hf, "t"//bb2, |
---|
257 | . "Temperature "//bb2//"mb","K", |
---|
258 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
259 | . "inst(X)", zstohf,zstohf) |
---|
260 | c |
---|
261 | CALL histdef(nid_hf, "q"//bb2, |
---|
262 | . "Specific humidity "//bb2//"mb","kg/kg", |
---|
263 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
264 | . "inst(X)", zstohf,zstohf) |
---|
265 | c |
---|
266 | ENDIF !bb2 |
---|
267 | c |
---|
268 | IF(bb2.EQ."500") THEN |
---|
269 | c |
---|
270 | CALL histdef(nid_hf, "phi"//bb2, |
---|
271 | . "Geopotential "//bb2//"mb", "m", |
---|
272 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
273 | . "inst(X)", zstohf,zstohf) |
---|
274 | c |
---|
275 | CALL histdef(nid_hf, "w"//bb2, |
---|
276 | . "Vertical motion "//bb2//"mb","Pa/s", |
---|
277 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
278 | . "inst(X)", zstohf,zstohf) |
---|
279 | ENDIF !bb2.EQ."500" |
---|
280 | c |
---|
281 | IF(bb3.EQ."50") THEN |
---|
282 | c |
---|
283 | CALL histdef(nid_hf, "t"//bb3, |
---|
284 | . "Temperature "//bb3//"mb","K", |
---|
285 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
286 | . "inst(X)", zstohf,zstohf) |
---|
287 | c |
---|
288 | CALL histdef(nid_hf, "u"//bb3, |
---|
289 | . "Zonal wind "//bb3//"mb","m/s", |
---|
290 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
291 | . "inst(X)", zstohf,zstohf) |
---|
292 | c |
---|
293 | CALL histdef(nid_hf, "v"//bb3, |
---|
294 | . "Meridional wind "//bb3//"mb","m/s", |
---|
295 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
296 | . "inst(X)", zstohf,zstohf) |
---|
297 | c |
---|
298 | ENDIF !bb3 |
---|
299 | c |
---|
300 | ENDDO !k=1, nlevSTD |
---|
301 | c |
---|
302 | CALL histdef(nid_hf, "u10m", "Vent zonal 10m", "m/s", |
---|
303 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
304 | . "inst(X)", zstohf,zout) |
---|
305 | c |
---|
306 | CALL histdef(nid_hf, "v10m", "Vent meridien 10m", "m/s", |
---|
307 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
308 | . "inst(X)", zstohf,zout) |
---|
309 | c |
---|
310 | CALL histdef(nid_hf, "t2m", "Temperature 2m", "K", |
---|
311 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
312 | . "inst(X)", zstohf,zout) |
---|
313 | c |
---|
314 | CALL histdef(nid_hf, "q2m", "Specific humidity", "kg/kg", |
---|
315 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
316 | . "inst(X)", zstohf,zout) |
---|
317 | c |
---|
318 | CALL histdef(nid_hf, "psol", "Surface Pressure", "Pa", |
---|
319 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
320 | . "inst(X)", zstohf,zout) |
---|
321 | c |
---|
322 | CALL histdef(nid_hf, "cldt", "Total cloudiness", "%", |
---|
323 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
324 | . "ave(X)", zstohf,zout) |
---|
325 | c |
---|
326 | CALL histdef(nid_hf, "taux", |
---|
327 | $ "Zonal wind stress","Pa", |
---|
328 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
329 | $ "ave(X)", zstohf,zout) |
---|
330 | c |
---|
331 | CALL histdef(nid_hf, "tauy", |
---|
332 | $ "Meridional wind stress ", "Pa", |
---|
333 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
334 | $ "ave(X)", zstohf,zout) |
---|
335 | c |
---|
336 | CALL histdef(nid_hf, "prw", "Precipitable water", "kg/m2", |
---|
337 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
338 | cIM 090904 . "ave(X)", zstohf,zout) |
---|
339 | . "ave(X)", zstophy,zout) |
---|
340 | c |
---|
341 | CALL histdef(nid_hf, "sens", "Sensible heat flux", "W/m2", |
---|
342 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
343 | cIM 090904 . "ave(X)", zstohf,zout) |
---|
344 | . "ave(X)", zstophy,zout) |
---|
345 | c |
---|
346 | CALL histdef(nid_hf, "flat", "Latent heat flux", "W/m2", |
---|
347 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
348 | . "ave(X)", zstohf,zout) |
---|
349 | c |
---|
350 | c CALL histdef(nid_hf, "snow_mass", "Snow Mass", "kg/m2", |
---|
351 | c . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
352 | c . "ave(X)", zstohf,zout) |
---|
353 | c |
---|
354 | CALL histdef(nid_hf, "SWdnSFC", "SWdn at surface","W/m2", |
---|
355 | . iim,jjmp1,nhori, 1,1,1,-99, |
---|
356 | . 32, "ave(X)", zstohf,zout) |
---|
357 | c |
---|
358 | CALL histdef(nid_hf, "SWupSFC", "SWup at surface","W/m2", |
---|
359 | . iim,jjmp1,nhori, 1,1,1,-99, |
---|
360 | . 32, "ave(X)", zstohf,zout) |
---|
361 | c |
---|
362 | CALL histdef(nid_hf,"LWdnSFC","Down. IR rad. at surface", |
---|
363 | . "W/m2", iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
364 | . "ave(X)", zstohf,zout) |
---|
365 | c |
---|
366 | CALL histdef(nid_hf,"LWupSFC","Upwd. IR rad. at surface", |
---|
367 | . "W/m2", iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
368 | . "ave(X)", zstohf,zout) |
---|
369 | c |
---|
370 | CALL histdef(nid_hf, "SWdnTOA", "SWdn at TOA","W/m2", |
---|
371 | . iim,jjmp1,nhori, 1,1,1,-99, |
---|
372 | . 32, "ave(X)", zstohf,zout) |
---|
373 | c |
---|
374 | CALL histdef(nid_hf, "SWupTOA", "SWup at TOA","W/m2", |
---|
375 | . iim,jjmp1,nhori, 1,1,1,-99, |
---|
376 | . 32, "ave(X)", zstohf,zout) |
---|
377 | c |
---|
378 | DO k=1, nbteta |
---|
379 | CALL histdef(nid_hf, "PV"//ctetaSTD(k), |
---|
380 | $ "Vorticite potentielle "//ctetaSTD(k)//"K", |
---|
381 | $ "1/(Pa*s)",iim,jjmp1,nhori, 1,1,1, -99, |
---|
382 | $ 32, "inst(X)", zstohf,zout) |
---|
383 | ENDDO !k=1, nbteta |
---|
384 | c |
---|
385 | c planetary boundary layer height |
---|
386 | c |
---|
387 | c ENDIF !1.EQ.0 |
---|
388 | c |
---|
389 | ENDIF !(lev_histhf.GE.2) THEN |
---|
390 | cIM 280504 END |
---|
391 | c |
---|
392 | ENDIF !type_run |
---|
393 | c |
---|
394 | CALL histend(nid_hf) |
---|
395 | c |
---|
396 | ENDIF ! ok_hf |
---|