source: LMDZ4/tags/IPSL-CM4_LOOP/libf/phylmd/ini_histhf.h @ 639

Last change on this file since 639 was 639, checked in by (none), 19 years ago

This commit was manufactured by cvs2svn to create tag
'IPSL-CM4_LOOP'.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.5 KB
Line 
1!
2! $Header$
3!
4
5      IF (ok_hf) THEN
6c
7        zout = dtime * REAL(NINT(86400./dtime*ecrit_hf))
8        zsto = zout
9        zsto1 = dtime
10        PRINT*, 'La frequence de sortie instant. est de ', ecrit_hf
11c
12         idayref = day_ref
13         CALL ymds2ju(annee_ref, 1, idayref, 0.0, zjulian)
14
15c
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
24cccIM      CALL histbeg("histhf", iim,zx_lon, jjmp1,zx_lat,
25         CALL histbeg("histhf", iim,zx_lon(:,1), jjmp1,zx_lat(1,:),
26     .                 1,iim,1,jjmp1, itau_phy, zjulian, dtime, 
27     .                 nhori, nid_hf)
28
29         CALL histvert(nid_hf, "presnivs", "Vertical levels", "mb",
30     .                 klev, presnivs, nvert)
31c
32
33      IF(lev_histhf.GE.1) THEN
34c
35c        CALL histdef(nid_hf, "phis", "Surface geop. height", "-",
36c    .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
37c    .                "once", zsto,zout)
38c
39c        CALL histdef(nid_hf, "aire", "Grid area", "-",
40c    .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
41c    .                "once", zsto,zout)
42c
43         CALL histdef(nid_hf, "aireTER","Grid area CONT","-",
44     .                iim,jjmp1,nhori, 1,1,1, -99, 32,
45     .                "once", zsto,zout)
46c
47         CALL histdef(nid_hf, "contfracATM","% sfce ter+lic ","-",
48     .                iim,jjmp1,nhori, 1,1,1, -99, 32,
49     .                "once", zsto,zout)
50c
51         CALL histdef(nid_hf, "contfracOR","% sfce terre OR", "-",
52     .                iim,jjmp1,nhori, 1,1,1, -99, 32,
53     .                "once", zsto,zout)
54c
55c Champs 2D:
56c
57         CALL histdef(nid_hf, "t2m", "Temperature 2m", "K",
58     .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
59     .                "inst(X)", zsto,zout)
60c
61         CALL histdef(nid_hf, "q2m", "Specific humidity", "kg/kg",
62     .                iim,jjmp1,nhori, 1,1,1, -99, 32,
63     .                "inst(X)", zsto,zout)
64c
65         CALL histdef(nid_hf, "psol", "Surface Pressure", "Pa",
66     .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
67     .                "inst(X)", zsto,zout)
68c
69         print*,'ATTENTION METTRE AVE(X) POUR LES PRECIPS'
70
71         CALL histdef(nid_hf, "rain", "Precipitation", "kg/m^2s",
72     .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
73     .                "ave(X)", zsto1,zout)
74c
75cIM ENSEMBLES BEG
76c
77         CALL histdef(nid_hf, "tsol", "Surface Temperature", "K",
78     .                iim,jjmp1,nhori, 1,1,1, -99, 32,
79     .                "inst(X)", zsto,zout)
80c
81         CALL histdef(nid_hf, "slp", "Sea Level Pressure", "Pa",
82     .                iim,jjmp1,nhori, 1,1,1, -99, 32,
83     .                "inst(X)", zsto,zout)
84c
85c
86         CALL histdef(nid_hf, "u10m", "Vent zonal 10m", "m/s",
87     .                iim,jjmp1,nhori, 1,1,1, -99, 32,
88     .                "inst(X)", zsto,zout)
89c
90         CALL histdef(nid_hf, "v10m", "Vent meridien 10m", "m/s",
91     .                iim,jjmp1,nhori, 1,1,1, -99, 32,
92     .                "inst(X)", zsto,zout)
93c
94         CALL histdef(nid_hf, "wind10m","10-m wind speed","m/s",
95     .                iim,jjmp1,nhori, 1,1,1, -99, 32,
96     .                "inst(X)", zsto,zout)
97c
98         DO k=1, nlevENS
99          IF(clev(k).EQ."500") THEN
100          CALL histdef(nid_hf, "phi"//clev(k),
101     .                "Geopotential"//clev(k)//"mb", "m2/s2",
102     .                iim,jjmp1,nhori, 1,1,1, -99, 32,
103     .                "inst(X)", zsto,zout)
104          ENDIF !clev(k).EQ."500"
105         ENDDO !k=1, nlevENS
106c
107      ENDIF !lev_histhf.GE.1
108c
109      IF(lev_histhf.GE.2) THEN
110c
111         CALL histdef(nid_hf, "cldt", "Total cloudiness", "-",
112     .                iim,jjmp1,nhori, 1,1,1, -99, 32,
113     .                "ave(X)", zsto1,zout)
114c
115c -- LOOP
116         CALL histdef(nid_hf, "SWdownOR",
117     .                "Sfce incident SW down radiation OR", "W/m^2",
118     .                iim,jjmp1,nhori, 1,1,1, -99, 32,
119     .                "ave(X)", zsto1,zout)
120c
121         CALL histdef(nid_hf, "SWnetOR",
122     .                "Sfce incident SW net radiation OR", "W/m^2",
123     .                iim,jjmp1,nhori, 1,1,1, -99, 32,
124     .                "ave(X)", zsto1,zout)
125c -- LOOP
126c
127         CALL histdef(nid_hf, "LWdownOR",
128     .                "Sfce incident LW radiation OR", "W/m^2",
129     .                iim,jjmp1,nhori, 1,1,1, -99, 32,
130     .                "ave(X)", zsto1,zout)
131      ENDIF !lev_histhf.GE.2
132c
133cIM ENSEMBLES END
134c
135      IF(lev_histhf.GE.3) THEN
136c
137         DO k=1, nlevENS
138c
139          CALL histdef(nid_hf, "t"//clev(k),
140     .                 "Temperature"//clev(k)//"mb","K",
141     .                iim,jjmp1,nhori, 1,1,1, -99, 32,
142     .                "inst(X)", zsto,zout)
143c
144          IF(clev(k).NE."500") THEN
145          CALL histdef(nid_hf, "phi"//clev(k),
146     .                "Geopotential"//clev(k)//"mb", "m2/s2",
147     .                iim,jjmp1,nhori, 1,1,1, -99, 32,
148     .                "inst(X)", zsto,zout)
149          ENDIF
150c
151          CALL histdef(nid_hf, "q"//clev(k),
152     .                 "Specific humidity"//clev(k)//"mb","kg/kg",
153     .                iim,jjmp1,nhori, 1,1,1, -99, 32,
154     .                "inst(X)", zsto,zout)
155c
156         IF(1.EQ.0) THEN
157         CALL histdef(nid_hf, "rh"//clev(k),
158     .                 "Relative humidity"//clev(k)//"mb", "%",
159     .                iim,jjmp1,nhori, 1,1,1, -99, 32,
160     .                "inst(X)", zsto,zout)
161         ENDIF
162c
163          CALL histdef(nid_hf, "u"//clev(k),
164     .                 "Zonal wind"//clev(k)//"mb","m/s",
165     .                iim,jjmp1,nhori, 1,1,1, -99, 32,
166     .                "inst(X)", zsto,zout)
167c
168          CALL histdef(nid_hf, "v"//clev(k),
169     .                 "Meridional wind"//clev(k)//"mb","m/s",
170     .                iim,jjmp1,nhori, 1,1,1, -99, 32,
171     .                "inst(X)", zsto,zout)
172c
173         ENDDO !nlevENS
174         IF(1.EQ.0) THEN
175         CALL histdef(nid_hf, "cdrm", " Momentum drag coef.", "-",
176     .                iim,jjmp1,nhori, 1,1,1, -99, 32,
177     .                "inst(X)", zsto,zout)
178c
179         CALL histdef(nid_hf, "cdrh", "Heat drag coef.", "-",
180     .                iim,jjmp1,nhori, 1,1,1, -99, 32,
181     .                "inst(X)", zsto,zout)
182         ENDIF !(1.EQ.0) THEN
183c
184      ENDIF !lev_histhf.GE.3
185c
186      IF(lev_histhf.GE.4) THEN
187#define histhf3d
188#ifdef histhf3d
189#include "ini_histhf3d.h"
190#endif
191      ENDIF !lev_histhf.GE.4
192c
193c#define histhf3d
194c#ifdef histhf3d
195c#include "ini_histhf3d.h"
196c#endif
197c
198         CALL histend(nid_hf)
199c
200      endif ! ok_hf
Note: See TracBrowser for help on using the repository browser.