1 | IF (ok_mensuel) THEN |
---|
2 | c |
---|
3 | ndex2d = 0 |
---|
4 | ndex3d = 0 |
---|
5 | zx_tmp_2d = 0. |
---|
6 | zx_tmp_3d = 0. |
---|
7 | zx_tmp_fi2d=0. |
---|
8 | zx_tmp_fi3d=0. |
---|
9 | c |
---|
10 | zsto = dtime |
---|
11 | zout = dtime * FLOAT(ecrit_mth) |
---|
12 | itau_w = itau_phy + itap |
---|
13 | c |
---|
14 | c------------------------------------------------------- |
---|
15 | IF(lev_histmth.GE.1) THEN |
---|
16 | c |
---|
17 | ccccccccccccc 2D fields, invariables |
---|
18 | c |
---|
19 | CALL gr_fi_ecrit(1,klon,iim,jjmp1,pphis,zx_tmp_2d) |
---|
20 | CALL histwrite(nid_mth,"phis",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
21 | C |
---|
22 | CALL gr_fi_ecrit(1,klon,iim,jjmp1,airephy,zx_tmp_2d) |
---|
23 | CALL histwrite(nid_mth,"aire",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
24 | c |
---|
25 | ccccccc axe Ls |
---|
26 | do j=1,jjmp1 |
---|
27 | do i=1,iim |
---|
28 | zx_tmp_2d(i,j)=zls*180./RPI ! zls est en radians !! |
---|
29 | enddo |
---|
30 | enddo |
---|
31 | CALL histwrite(nid_mth,"ls",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
32 | c |
---|
33 | ccccccccccccc 2D fields, variables |
---|
34 | c |
---|
35 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, ftsol,zx_tmp_2d) |
---|
36 | CALL histwrite(nid_mth,"tsol",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
37 | c |
---|
38 | DO i = 1, klon |
---|
39 | zx_tmp_fi2d(i) = paprs(i,1) |
---|
40 | ENDDO |
---|
41 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) |
---|
42 | CALL histwrite(nid_mth,"psol",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
43 | c |
---|
44 | c CALL gr_fi_ecrit(1, klon,iim,jjmp1, ue,zx_tmp_2d) |
---|
45 | c CALL histwrite(nid_mth,"ue",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
46 | c |
---|
47 | c CALL gr_fi_ecrit(1, klon,iim,jjmp1, ve,zx_tmp_2d) |
---|
48 | c CALL histwrite(nid_mth,"ve",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
49 | c |
---|
50 | ENDIF !lev_histmth.GE.1 |
---|
51 | c |
---|
52 | c------------------------------------------------------- |
---|
53 | IF(lev_histmth.GE.2) THEN |
---|
54 | c |
---|
55 | ccccccccccccc 3D fields, basics |
---|
56 | c |
---|
57 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, t_seri, zx_tmp_3d) |
---|
58 | CALL histwrite(nid_mth,"temp",itau_w,zx_tmp_3d, |
---|
59 | . iim*jjmp1*klev,ndex3d) |
---|
60 | c |
---|
61 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, pplay, zx_tmp_3d) |
---|
62 | CALL histwrite(nid_mth,"pres",itau_w,zx_tmp_3d, |
---|
63 | . iim*jjmp1*klev,ndex3d) |
---|
64 | c |
---|
65 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, zphi, zx_tmp_3d) |
---|
66 | CALL histwrite(nid_mth,"geop",itau_w,zx_tmp_3d, |
---|
67 | . iim*jjmp1*klev,ndex3d) |
---|
68 | c |
---|
69 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, u_seri, zx_tmp_3d) |
---|
70 | CALL histwrite(nid_mth,"vitu",itau_w,zx_tmp_3d, |
---|
71 | . iim*jjmp1*klev,ndex3d) |
---|
72 | c |
---|
73 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, v_seri, zx_tmp_3d) |
---|
74 | CALL histwrite(nid_mth,"vitv",itau_w,zx_tmp_3d, |
---|
75 | . iim*jjmp1*klev,ndex3d) |
---|
76 | c |
---|
77 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, omega, zx_tmp_3d) |
---|
78 | CALL histwrite(nid_mth,"vitw",itau_w,zx_tmp_3d, |
---|
79 | . iim*jjmp1*klev,ndex3d) |
---|
80 | c |
---|
81 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, topsw,zx_tmp_2d) |
---|
82 | CALL histwrite(nid_mth,"tops",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
83 | c |
---|
84 | if (iflag_trac.eq.1) THEN |
---|
85 | if (microfi.eq.1) then |
---|
86 | c DO iq=1,nmicro |
---|
87 | c CALL gr_fi_ecrit(klev,klon,iim,jjmp1, qaer(1,1,iq), zx_tmp_3d) |
---|
88 | c CALL histwrite(nid_mth,tname(iq),itau_w,zx_tmp_3d, |
---|
89 | c . iim*jjmp1*klev,ndex3d) |
---|
90 | c ENDDO |
---|
91 | c endif |
---|
92 | if (nmicro.lt.nqmax) then |
---|
93 | DO iq=nmicro+1,nqmax |
---|
94 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1,tr_seri(1,1,iq),zx_tmp_3d) |
---|
95 | CALL histwrite(nid_mth,tname(iq),itau_w,zx_tmp_3d, |
---|
96 | . iim*jjmp1*klev,ndex3d) |
---|
97 | ENDDO |
---|
98 | c Condensation: |
---|
99 | c DO iq=nmicro+1,nqmax |
---|
100 | c CALL gr_fi_ecrit(klev,klon,iim,jjmp1,d_tr_mph(1,1,iq),zx_tmp_3d) |
---|
101 | c CALL histwrite(nid_mth,"c_"//tname(iq),itau_w,zx_tmp_3d, |
---|
102 | c . iim*jjmp1*klev,ndex3d) |
---|
103 | c ENDDO |
---|
104 | endif |
---|
105 | endif |
---|
106 | c |
---|
107 | ENDIF !lev_histmth.GE.2 |
---|
108 | c |
---|
109 | c------------------------------------------------------- |
---|
110 | IF(lev_histmth.GE.3) THEN |
---|
111 | c |
---|
112 | cccccccccccccccccc Radiative transfer |
---|
113 | c |
---|
114 | c 2D |
---|
115 | c |
---|
116 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, toplw,zx_tmp_2d) |
---|
117 | CALL histwrite(nid_mth,"topl",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
118 | c |
---|
119 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, solsw,zx_tmp_2d) |
---|
120 | CALL histwrite(nid_mth,"sols",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
121 | c |
---|
122 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, sollw,zx_tmp_2d) |
---|
123 | CALL histwrite(nid_mth,"soll",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
124 | c |
---|
125 | c 3D |
---|
126 | c |
---|
127 | zx_tmp_fi3d(1:klon,1:klev)=swnet(1:klon,1:klev) |
---|
128 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) |
---|
129 | CALL histwrite(nid_mth,"SWnet",itau_w,zx_tmp_3d, |
---|
130 | . iim*jjmp1*klev,ndex3d) |
---|
131 | c |
---|
132 | zx_tmp_fi3d(1:klon,1:klev)=lwnet(1:klon,1:klev) |
---|
133 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) |
---|
134 | CALL histwrite(nid_mth,"LWnet",itau_w,zx_tmp_3d, |
---|
135 | . iim*jjmp1*klev,ndex3d) |
---|
136 | c |
---|
137 | c 3D adding Tau and k (31/08/10) |
---|
138 | c |
---|
139 | do k=3,nspecv,5 |
---|
140 | do i=1,klon |
---|
141 | do l=1,klev |
---|
142 | t_tauhvd(i,j)=TAUHVD(i,klev-l+1,k) |
---|
143 | enddo |
---|
144 | enddo |
---|
145 | write(str1,'(i2.2)') k |
---|
146 | zx_tmp_fi3d(1:klon,1:klev)=t_tauhvd(1:klon,1:klev) |
---|
147 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) |
---|
148 | CALL histwrite(nid_mth,"thv"//str1,itau_w,zx_tmp_3d, |
---|
149 | . iim*jjmp1*klev,ndex3d) |
---|
150 | enddo ! fin boucle nspecv |
---|
151 | |
---|
152 | do k=3,nspecv,5 |
---|
153 | do i=1,klon |
---|
154 | do l=1,klev |
---|
155 | if(l.ne.klev) |
---|
156 | s t_khvd(i,l)=TAUHVD(i,klev-l+1,k) |
---|
157 | s -TAUHVD(i,klev-l+1-1,k) |
---|
158 | |
---|
159 | if(l.eq.klev) |
---|
160 | s t_khvd(i,l)=TAUHVD(i,klev-l+1,k) |
---|
161 | |
---|
162 | t_khvd(i,l)=t_khvd(i,l)/(zzlev(i,l+1)-zzlev(i,l)) |
---|
163 | enddo |
---|
164 | enddo |
---|
165 | write(str1,'(i2.2)') k |
---|
166 | zx_tmp_fi3d(1:klon,1:klev)=t_khvd(1:klon,1:klev) |
---|
167 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) |
---|
168 | CALL histwrite(nid_mth,"khv"//str1,itau_w,zx_tmp_3d, |
---|
169 | . iim*jjmp1*klev,ndex3d) |
---|
170 | enddo ! fin boucle nspecv |
---|
171 | |
---|
172 | ENDIF !lev_histmth.GE.3 |
---|
173 | c |
---|
174 | c------------------------------------------------------- |
---|
175 | IF(lev_histmth.GE.4) THEN |
---|
176 | c |
---|
177 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_t_dyn, zx_tmp_3d) |
---|
178 | CALL histwrite(nid_mth,"dtdyn",itau_w,zx_tmp_3d, |
---|
179 | . iim*jjmp1*klev,ndex3d) |
---|
180 | c |
---|
181 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_t, zx_tmp_3d) |
---|
182 | CALL histwrite(nid_mth,"dtphy",itau_w,zx_tmp_3d, |
---|
183 | . iim*jjmp1*klev,ndex3d) |
---|
184 | c K/s |
---|
185 | zx_tmp_fi3d(1:klon,1:klev)=d_t_vdf(1:klon,1:klev) |
---|
186 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) |
---|
187 | CALL histwrite(nid_mth,"dtvdf",itau_w,zx_tmp_3d, |
---|
188 | . iim*jjmp1*klev,ndex3d) |
---|
189 | c |
---|
190 | c K/s |
---|
191 | zx_tmp_fi3d(1:klon,1:klev)=d_t_ajs(1:klon,1:klev) |
---|
192 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) |
---|
193 | CALL histwrite(nid_mth,"dtajs",itau_w,zx_tmp_3d, |
---|
194 | . iim*jjmp1*klev,ndex3d) |
---|
195 | c |
---|
196 | c K/s |
---|
197 | zx_tmp_fi3d(1:klon,1:klev)=heat(1:klon,1:klev) |
---|
198 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) |
---|
199 | CALL histwrite(nid_mth,"dtswr",itau_w,zx_tmp_3d, |
---|
200 | . iim*jjmp1*klev,ndex3d) |
---|
201 | c |
---|
202 | c K/s |
---|
203 | zx_tmp_fi3d(1:klon,1:klev)=-1.*cool(1:klon,1:klev) |
---|
204 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) |
---|
205 | CALL histwrite(nid_mth,"dtlwr",itau_w,zx_tmp_3d, |
---|
206 | . iim*jjmp1*klev,ndex3d) |
---|
207 | c K/s |
---|
208 | c zx_tmp_fi3d(1:klon,1:klev)=d_t_ec(1:klon,1:klev) |
---|
209 | c CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) |
---|
210 | c CALL histwrite(nid_mth,"dtec",itau_w,zx_tmp_3d, |
---|
211 | c . iim*jjmp1*klev,ndex3d) |
---|
212 | c |
---|
213 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_u_vdf, zx_tmp_3d) |
---|
214 | CALL histwrite(nid_mth,"duvdf",itau_w,zx_tmp_3d, |
---|
215 | . iim*jjmp1*klev,ndex3d) |
---|
216 | c |
---|
217 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_u_dyn, zx_tmp_3d) |
---|
218 | CALL histwrite(nid_mth,"dudyn",itau_w,zx_tmp_3d, |
---|
219 | . iim*jjmp1*klev,ndex3d) |
---|
220 | c |
---|
221 | c CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_v_vdf, zx_tmp_3d) |
---|
222 | c CALL histwrite(nid_mth,"dvvdf",itau_w,zx_tmp_3d, |
---|
223 | c . iim*jjmp1*klev,ndex3d) |
---|
224 | c |
---|
225 | ENDIF !lev_histmth.GE.4 |
---|
226 | c |
---|
227 | c------------------------------------------------------- |
---|
228 | IF(lev_histmth.GE.5) THEN |
---|
229 | c |
---|
230 | c |
---|
231 | c CALL gr_fi_ecrit(1, klon,iim,jjmp1, fluxu , zx_tmp_2d) |
---|
232 | c CALL histwrite(nid_mth,"taux_",itau_w, |
---|
233 | c $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
234 | c |
---|
235 | c CALL gr_fi_ecrit(1, klon,iim,jjmp1, fluxv , zx_tmp_2d) |
---|
236 | c CALL histwrite(nid_mth,"tauy_",itau_w, |
---|
237 | c $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
238 | c |
---|
239 | c CALL gr_fi_ecrit(1, klon,iim,jjmp1, cdragm,zx_tmp_2d) |
---|
240 | c CALL histwrite(nid_mth,"cdrm",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
241 | c |
---|
242 | c CALL gr_fi_ecrit(1, klon,iim,jjmp1, cdragh,zx_tmp_2d) |
---|
243 | c CALL histwrite(nid_mth,"cdrh",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
244 | c |
---|
245 | ENDIF !lev_histmth.GE.5 |
---|
246 | c------------------------------------------------------- |
---|
247 | c |
---|
248 | if (ok_sync) then |
---|
249 | call histsync(nid_mth) |
---|
250 | endif |
---|
251 | |
---|
252 | ENDIF |
---|