source: LMDZ4/branches/LMDZ4_par_0/libf/phylmd/ini_histhf.h @ 4999

Last change on this file since 4999 was 634, checked in by Laurent Fairhead, 19 years ago

Modifications faites à la physique pour la rendre parallele YM
Une branche de travail LMDZ4_par_0 a été créée provisoirement afin de tester
les modifs pleinement avant leurs inclusions dans le tronc principal
LF

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