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