source: LMDZ4/tags/LMDZ4_V3_3/libf/phylmd/ini_histhf.h @ 3281

Last change on this file since 3281 was 919, checked in by (none), 17 years ago

This commit was manufactured by cvs2svn to create tag 'LMDZ4_V3_3'.

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