1 | ! |
---|
2 | ! $Header: /home/cvsroot/LMDZ4/libf/phylmd/write_histmth.h,v 1.2 2005/03/09 12:30:16 fairhead Exp $ |
---|
3 | ! |
---|
4 | IF (ok_mensuel) THEN |
---|
5 | c |
---|
6 | ndex2d = 0 |
---|
7 | ndex3d = 0 |
---|
8 | zx_tmp_2d = 0. |
---|
9 | zx_tmp_3d = 0. |
---|
10 | zx_tmp_fi2d=0. |
---|
11 | zx_tmp_fi3d=0. |
---|
12 | |
---|
13 | zsto = dtime |
---|
14 | zout = dtime * ecrit_mth |
---|
15 | itau_w = itau_phy + itap |
---|
16 | |
---|
17 | c |
---|
18 | c------------------------------------------------------- |
---|
19 | IF(lev_histmth.GE.1) THEN |
---|
20 | c |
---|
21 | ccccccccccccc 2D fields, basics |
---|
22 | c |
---|
23 | i = NINT(zout/zsto) |
---|
24 | CALL gr_fi_ecrit(1,klon,iim,jjmp1,pphis,zx_tmp_2d) |
---|
25 | CALL histwrite(nid_mth,"phis",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
26 | C |
---|
27 | i = NINT(zout/zsto) |
---|
28 | CALL gr_fi_ecrit(1,klon,iim,jjmp1,airephy,zx_tmp_2d) |
---|
29 | CALL histwrite(nid_mth,"aire",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
30 | c |
---|
31 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, ftsol,zx_tmp_2d) |
---|
32 | CALL histwrite(nid_mth,"tsol",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
33 | c |
---|
34 | DO i = 1, klon |
---|
35 | zx_tmp_fi2d(i) = paprs(i,1) |
---|
36 | ENDDO |
---|
37 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) |
---|
38 | CALL histwrite(nid_mth,"psol",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
39 | c |
---|
40 | c CALL gr_fi_ecrit(1, klon,iim,jjmp1, ue,zx_tmp_2d) |
---|
41 | c CALL histwrite(nid_mth,"ue",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
42 | c |
---|
43 | c CALL gr_fi_ecrit(1, klon,iim,jjmp1, ve,zx_tmp_2d) |
---|
44 | c VENUS: regardee a l'envers!!!!!!!!!!!!!!! |
---|
45 | c zx_tmp_2d=-1.*zx_tmp_2d |
---|
46 | c CALL histwrite(nid_mth,"ve",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
47 | c |
---|
48 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, cdragh,zx_tmp_2d) |
---|
49 | CALL histwrite(nid_mth,"cdragh",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
50 | c |
---|
51 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, cdragm,zx_tmp_2d) |
---|
52 | CALL histwrite(nid_mth,"cdragm",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
53 | c |
---|
54 | ENDIF !lev_histmth.GE.1 |
---|
55 | c |
---|
56 | c------------------------------------------------------- |
---|
57 | IF(lev_histmth.GE.2) THEN |
---|
58 | c |
---|
59 | ccccccccccccc 3D fields, basics |
---|
60 | c |
---|
61 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, t_seri, zx_tmp_3d) |
---|
62 | CALL histwrite(nid_mth,"temp",itau_w,zx_tmp_3d, |
---|
63 | . iim*jjmp1*klev,ndex3d) |
---|
64 | c |
---|
65 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, pplay, zx_tmp_3d) |
---|
66 | CALL histwrite(nid_mth,"pres",itau_w,zx_tmp_3d, |
---|
67 | . iim*jjmp1*klev,ndex3d) |
---|
68 | c |
---|
69 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, zphi, zx_tmp_3d) |
---|
70 | CALL histwrite(nid_mth,"geop",itau_w,zx_tmp_3d, |
---|
71 | . iim*jjmp1*klev,ndex3d) |
---|
72 | c |
---|
73 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, u_seri, zx_tmp_3d) |
---|
74 | CALL histwrite(nid_mth,"vitu",itau_w,zx_tmp_3d, |
---|
75 | . iim*jjmp1*klev,ndex3d) |
---|
76 | c |
---|
77 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, v_seri, zx_tmp_3d) |
---|
78 | c VENUS: regardee a l'envers!!!!!!!!!!!!!!! |
---|
79 | zx_tmp_3d=-1.*zx_tmp_3d |
---|
80 | CALL histwrite(nid_mth,"vitv",itau_w,zx_tmp_3d, |
---|
81 | . iim*jjmp1*klev,ndex3d) |
---|
82 | c |
---|
83 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, omega, zx_tmp_3d) |
---|
84 | CALL histwrite(nid_mth,"vitw",itau_w,zx_tmp_3d, |
---|
85 | . iim*jjmp1*klev,ndex3d) |
---|
86 | c |
---|
87 | c en (m/s)/s |
---|
88 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_u_dyn, zx_tmp_3d) |
---|
89 | CALL histwrite(nid_mth,"dudyn",itau_w,zx_tmp_3d, |
---|
90 | . iim*jjmp1*klev,ndex3d) |
---|
91 | c |
---|
92 | c en (m/s)/s |
---|
93 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_u_vdf, zx_tmp_3d) |
---|
94 | CALL histwrite(nid_mth,"duvdf",itau_w,zx_tmp_3d, |
---|
95 | . iim*jjmp1*klev,ndex3d) |
---|
96 | c |
---|
97 | c CALL gr_fi_ecrit(klev,klon,iim,jjmp1, mang, zx_tmp_3d) |
---|
98 | c CALL histwrite(nid_mth,"mang",itau_w,zx_tmp_3d, |
---|
99 | c . iim*jjmp1*klev,ndex3d) |
---|
100 | c |
---|
101 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, ycoefh, zx_tmp_3d) |
---|
102 | CALL histwrite(nid_mth,"Kz",itau_w,zx_tmp_3d, |
---|
103 | . iim*jjmp1*klev,ndex3d) |
---|
104 | c |
---|
105 | c plusieurs traceurs |
---|
106 | IF (iflag_trac.eq.1) THEN |
---|
107 | DO iq=1,nqmax |
---|
108 | IF (iq.LE.99) THEN |
---|
109 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, qx(1,1,iq), zx_tmp_3d) |
---|
110 | WRITE(str2,'(i2.2)') iq |
---|
111 | CALL histwrite(nid_mth,tname(iq),itau_w,zx_tmp_3d, |
---|
112 | . iim*jjmp1*klev,ndex3d) |
---|
113 | ELSE |
---|
114 | PRINT*, "Trop de traceurs" |
---|
115 | CALL abort |
---|
116 | ENDIF |
---|
117 | ENDDO |
---|
118 | ENDIF |
---|
119 | c |
---|
120 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, topsw,zx_tmp_2d) |
---|
121 | CALL histwrite(nid_mth,"tops",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
122 | c |
---|
123 | ENDIF !lev_histmth.GE.2 |
---|
124 | c |
---|
125 | c------------------------------------------------------- |
---|
126 | IF(lev_histmth.GE.3) THEN |
---|
127 | c |
---|
128 | cccccccccccccccccc Radiative transfer |
---|
129 | c |
---|
130 | c 2D |
---|
131 | c |
---|
132 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, toplw,zx_tmp_2d) |
---|
133 | CALL histwrite(nid_mth,"topl",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
134 | c |
---|
135 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, solsw,zx_tmp_2d) |
---|
136 | CALL histwrite(nid_mth,"sols",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
137 | c |
---|
138 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, sollw,zx_tmp_2d) |
---|
139 | CALL histwrite(nid_mth,"soll",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
140 | c |
---|
141 | c 3D |
---|
142 | c |
---|
143 | zx_tmp_fi3d(1:klon,1:klev)=swnet(1:klon,1:klev) |
---|
144 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) |
---|
145 | CALL histwrite(nid_mth,"SWnet",itau_w,zx_tmp_3d, |
---|
146 | . iim*jjmp1*klev,ndex3d) |
---|
147 | c |
---|
148 | zx_tmp_fi3d(1:klon,1:klev)=lwnet(1:klon,1:klev) |
---|
149 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) |
---|
150 | CALL histwrite(nid_mth,"LWnet",itau_w,zx_tmp_3d, |
---|
151 | . iim*jjmp1*klev,ndex3d) |
---|
152 | c |
---|
153 | zx_tmp_fi3d(1:klon,1:klev)=fluxt(1:klon,1:klev) |
---|
154 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) |
---|
155 | CALL histwrite(nid_mth,"fluxvdf",itau_w,zx_tmp_3d, |
---|
156 | . iim*jjmp1*klev,ndex3d) |
---|
157 | c |
---|
158 | zx_tmp_fi3d(1:klon,1:klev)=flux_dyn(1:klon,1:klev) |
---|
159 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) |
---|
160 | CALL histwrite(nid_mth,"fluxdyn",itau_w,zx_tmp_3d, |
---|
161 | . iim*jjmp1*klev,ndex3d) |
---|
162 | c |
---|
163 | zx_tmp_fi3d(1:klon,1:klev)=flux_ajs(1:klon,1:klev) |
---|
164 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) |
---|
165 | CALL histwrite(nid_mth,"fluxajs",itau_w,zx_tmp_3d, |
---|
166 | . iim*jjmp1*klev,ndex3d) |
---|
167 | c |
---|
168 | c zx_tmp_fi3d(1:klon,1:klev)=flux_ec(1:klon,1:klev) |
---|
169 | c CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) |
---|
170 | c CALL histwrite(nid_mth,"fluxec",itau_w,zx_tmp_3d, |
---|
171 | c . iim*jjmp1*klev,ndex3d) |
---|
172 | c |
---|
173 | ENDIF !lev_histmth.GE.3 |
---|
174 | c |
---|
175 | c------------------------------------------------------- |
---|
176 | IF(lev_histmth.GE.4) THEN |
---|
177 | c |
---|
178 | c en K/s |
---|
179 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_t_dyn, zx_tmp_3d) |
---|
180 | CALL histwrite(nid_mth,"dtdyn",itau_w,zx_tmp_3d, |
---|
181 | . iim*jjmp1*klev,ndex3d) |
---|
182 | c |
---|
183 | c en K/s |
---|
184 | c CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_t, zx_tmp_3d) |
---|
185 | c CALL histwrite(nid_mth,"dtphy",itau_w,zx_tmp_3d, |
---|
186 | c . iim*jjmp1*klev,ndex3d) |
---|
187 | c |
---|
188 | c en K/s |
---|
189 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1,d_t_vdf,zx_tmp_3d) |
---|
190 | CALL histwrite(nid_mth,"dtvdf",itau_w,zx_tmp_3d, |
---|
191 | . iim*jjmp1*klev,ndex3d) |
---|
192 | c |
---|
193 | c en K/s |
---|
194 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1,d_t_ajs,zx_tmp_3d) |
---|
195 | CALL histwrite(nid_mth,"dtajs",itau_w,zx_tmp_3d, |
---|
196 | . iim*jjmp1*klev,ndex3d) |
---|
197 | c |
---|
198 | c K/day ==> K/s |
---|
199 | zx_tmp_fi3d(1:klon,1:klev)=heat(1:klon,1:klev)/RDAY |
---|
200 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) |
---|
201 | CALL histwrite(nid_mth,"dtswr",itau_w,zx_tmp_3d, |
---|
202 | . iim*jjmp1*klev,ndex3d) |
---|
203 | c |
---|
204 | c K/day ==> K/s |
---|
205 | zx_tmp_fi3d(1:klon,1:klev)=-1.*cool(1:klon,1:klev)/RDAY |
---|
206 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) |
---|
207 | CALL histwrite(nid_mth,"dtlwr",itau_w,zx_tmp_3d, |
---|
208 | . iim*jjmp1*klev,ndex3d) |
---|
209 | c en K/s |
---|
210 | c zx_tmp_fi3d(1:klon,1:klev)=d_t_ec(1:klon,1:klev) |
---|
211 | c CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) |
---|
212 | c CALL histwrite(nid_mth,"dtec",itau_w,zx_tmp_3d, |
---|
213 | c . iim*jjmp1*klev,ndex3d) |
---|
214 | c |
---|
215 | c en (m/s)/s |
---|
216 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_u_ajs, zx_tmp_3d) |
---|
217 | CALL histwrite(nid_mth,"duajs",itau_w,zx_tmp_3d, |
---|
218 | . iim*jjmp1*klev,ndex3d) |
---|
219 | c |
---|
220 | c en (m/s)/s |
---|
221 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_u_oro, zx_tmp_3d) |
---|
222 | CALL histwrite(nid_mth,"dugwo",itau_w,zx_tmp_3d, |
---|
223 | . iim*jjmp1*klev,ndex3d) |
---|
224 | c |
---|
225 | c en (m/s)/s |
---|
226 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_u_hin, zx_tmp_3d) |
---|
227 | CALL histwrite(nid_mth,"dugwno",itau_w,zx_tmp_3d, |
---|
228 | . iim*jjmp1*klev,ndex3d) |
---|
229 | c |
---|
230 | c en (m/s)/s |
---|
231 | c CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_v_vdf, zx_tmp_3d) |
---|
232 | c VENUS: regardee a l'envers!!!!!!!!!!!!!!! |
---|
233 | c zx_tmp_3d=-1.*zx_tmp_3d |
---|
234 | c CALL histwrite(nid_mth,"dvvdf",itau_w,zx_tmp_3d, |
---|
235 | c . iim*jjmp1*klev,ndex3d) |
---|
236 | c |
---|
237 | ENDIF !lev_histmth.GE.4 |
---|
238 | c |
---|
239 | c------------------------------------------------------- |
---|
240 | IF(lev_histmth.GE.5) THEN |
---|
241 | c |
---|
242 | c |
---|
243 | c CALL gr_fi_ecrit(1, klon,iim,jjmp1, fluxu , zx_tmp_2d) |
---|
244 | c CALL histwrite(nid_mth,"taux_",itau_w, |
---|
245 | c $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
246 | c |
---|
247 | c CALL gr_fi_ecrit(1, klon,iim,jjmp1, fluxv , zx_tmp_2d) |
---|
248 | c CALL histwrite(nid_mth,"tauy_",itau_w, |
---|
249 | c $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
250 | c |
---|
251 | c CALL gr_fi_ecrit(1, klon,iim,jjmp1, cdragm,zx_tmp_2d) |
---|
252 | c CALL histwrite(nid_mth,"cdrm",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
253 | c |
---|
254 | c CALL gr_fi_ecrit(1, klon,iim,jjmp1, cdragh,zx_tmp_2d) |
---|
255 | c CALL histwrite(nid_mth,"cdrh",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
256 | c |
---|
257 | ENDIF !lev_histmth.GE.5 |
---|
258 | c------------------------------------------------------- |
---|
259 | c |
---|
260 | if (ok_sync) then |
---|
261 | call histsync(nid_mth) |
---|
262 | endif |
---|
263 | ENDIF |
---|