source: LMDZ.3.3/branches/rel-LF/libf/phylmd/ini_histhf.h @ 506

Last change on this file since 506 was 506, checked in by lmdzadmin, 20 years ago

IM: ajout lev_hist(hf,day,mth) niveaux output definis dans physiq.def et

variables ENSEMBLES + rearrangement

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