1 | ! |
---|
2 | ! $Header: /home/cvsroot/LMDZ4/libf/phylmd/write_histins.h,v 1.1.1.1 2004/05/19 12:53:09 lmdzadmin Exp $ |
---|
3 | ! |
---|
4 | IF (ok_instan) THEN |
---|
5 | |
---|
6 | zsto = dtime * REAL(ecrit_ins) |
---|
7 | zout = dtime * REAL(ecrit_ins) |
---|
8 | itau_w = itau_phy + itap |
---|
9 | |
---|
10 | c------------------------------------------------------- |
---|
11 | IF(lev_histday.GE.1) THEN |
---|
12 | |
---|
13 | ccccccccccccc 2D fields, invariables |
---|
14 | |
---|
15 | call histwrite_phy(nid_ins,.false.,"phis",itau_w,pphis) |
---|
16 | c call histwrite_phy(nid_ins,.false.,"aire",itau_w,cell_area) |
---|
17 | cell_area_out(:)=cell_area(:) |
---|
18 | if (is_north_pole_phy) cell_area_out(1)=cell_area(1)/nbp_lon |
---|
19 | if (is_south_pole_phy) cell_area_out(klon)=cell_area(klon)/nbp_lon |
---|
20 | call histwrite_phy(nid_ins,.false.,"aire",itau_w,cell_area_out) |
---|
21 | |
---|
22 | ccccccc axe Ls ... Faudrait le reduire a axe temporel seulement... |
---|
23 | do i=1,klon |
---|
24 | tmpout(i,1) = zls*180./RPI |
---|
25 | enddo |
---|
26 | call histwrite_phy(nid_ins,.false.,"ls",itau_w,tmpout(:,1)) |
---|
27 | |
---|
28 | ccccccccccccc 2D fields, variables |
---|
29 | |
---|
30 | call histwrite_phy(nid_ins,.false.,"tsol",itau_w,ftsol) |
---|
31 | call histwrite_phy(nid_ins,.false.,"psol",itau_w,paprs(:,1)) |
---|
32 | |
---|
33 | c call histwrite_phy(nid_ins,.false.,"ue",itau_w,ue) |
---|
34 | c call histwrite_phy(nid_ins,.false.,"ve",itau_w,ve) |
---|
35 | |
---|
36 | ENDIF !lev_histday.GE.1 |
---|
37 | |
---|
38 | c------------------------------------------------------- |
---|
39 | IF(lev_histday.GE.2) THEN |
---|
40 | |
---|
41 | ccccccccccccc 3D fields, basics |
---|
42 | |
---|
43 | call histwrite_phy(nid_ins,.false.,"temp",itau_w,t_seri) |
---|
44 | call histwrite_phy(nid_ins,.false.,"pres",itau_w,pplay) |
---|
45 | call histwrite_phy(nid_ins,.false.,"geop",itau_w,zphi) |
---|
46 | call histwrite_phy(nid_ins,.false.,"vitu",itau_w,u_seri) |
---|
47 | call histwrite_phy(nid_ins,.false.,"vitv",itau_w,v_seri) |
---|
48 | call histwrite_phy(nid_ins,.false.,"vitw",itau_w,omega) |
---|
49 | call histwrite_phy(nid_ins,.false.,"tops",itau_w,topsw) |
---|
50 | c call histwrite_phy(nid_ins,.false.,"duvdf",itau_w,d_u_vdf) |
---|
51 | c call histwrite_phy(nid_ins,.false.,"dudyn",itau_w,d_u_dyn) |
---|
52 | |
---|
53 | ENDIF !lev_histday.GE.2 |
---|
54 | |
---|
55 | c------------------------------------------------------- |
---|
56 | IF(lev_histday.GE.3) THEN |
---|
57 | |
---|
58 | cccccccccccccccccc Tracers |
---|
59 | |
---|
60 | if (iflag_trac.eq.1) THEN |
---|
61 | if (microfi.eq.1) then |
---|
62 | DO iq=1,nmicro |
---|
63 | call histwrite_phy(nid_ins,.false.,tname(iq), |
---|
64 | . itau_w,qaer(1:klon,1:klev,iq)) |
---|
65 | ENDDO |
---|
66 | endif |
---|
67 | if (nmicro.lt.nqmax) then |
---|
68 | DO iq=nmicro+1,nqmax |
---|
69 | call histwrite_phy(nid_ins,.false.,tname(iq), |
---|
70 | . itau_w,tr_seri(1:klon,1:klev,iq)) |
---|
71 | ENDDO |
---|
72 | endif |
---|
73 | endif |
---|
74 | |
---|
75 | cccccccccccccccccc Radiative transfer |
---|
76 | |
---|
77 | c 2D |
---|
78 | |
---|
79 | call histwrite_phy(nid_ins,.false.,"topl",itau_w,toplw) |
---|
80 | call histwrite_phy(nid_ins,.false.,"sols",itau_w,solsw) |
---|
81 | call histwrite_phy(nid_ins,.false.,"soll",itau_w,sollw) |
---|
82 | |
---|
83 | c 3D |
---|
84 | |
---|
85 | call histwrite_phy(nid_ins,.false.,"SWnet", |
---|
86 | . itau_w,swnet(1:klon,1:klev)) |
---|
87 | call histwrite_phy(nid_ins,.false.,"LWnet", |
---|
88 | . itau_w,lwnet(1:klon,1:klev)) |
---|
89 | |
---|
90 | c -------------- |
---|
91 | c ----- OPACITE BRUME |
---|
92 | do k=7,NSPECV,10 |
---|
93 | do i=1,klon |
---|
94 | do l=1,klev |
---|
95 | t_tauhvd(i,l)=TAUHVD(i,klev-l+1,k) |
---|
96 | enddo |
---|
97 | enddo |
---|
98 | write(str2,'(i2.2)') k |
---|
99 | call histwrite_phy(nid_ins,.false.,"thv"//str2,itau_w,t_tauhvd) |
---|
100 | enddo ! fin boucle NSPECV |
---|
101 | |
---|
102 | do k=8,NSPECI,10 |
---|
103 | do i=1,klon |
---|
104 | do l=1,klev |
---|
105 | t_tauhvd(i,l)=TAUHID(i,klev-l+1,k) |
---|
106 | enddo |
---|
107 | enddo |
---|
108 | write(str2,'(i2.2)') k |
---|
109 | call histwrite_phy(nid_ins,.false.,"thi"//str2,itau_w,t_tauhvd) |
---|
110 | enddo ! fin boucle NSPECI |
---|
111 | c -------------- |
---|
112 | c ----- EXTINCTION BRUME |
---|
113 | do k=7,NSPECV,10 |
---|
114 | do i=1,klon |
---|
115 | do l=1,klev |
---|
116 | if(l.ne.klev) |
---|
117 | s t_khvd(i,l)=TAUHVD(i,klev-l+1,k) |
---|
118 | s -TAUHVD(i,klev-l+1-1,k) |
---|
119 | if(l.eq.klev) |
---|
120 | s t_khvd(i,l)=TAUHVD(i,klev-l+1,k) |
---|
121 | |
---|
122 | t_khvd(i,l)=t_khvd(i,l)/(zzlev(i,l+1)-zzlev(i,l)) |
---|
123 | enddo |
---|
124 | enddo |
---|
125 | write(str2,'(i2.2)') k |
---|
126 | call histwrite_phy(nid_ins,.false.,"khv"//str2,itau_w,t_khvd) |
---|
127 | enddo ! fin boucle NSPECV |
---|
128 | |
---|
129 | do k=8,NSPECI,10 |
---|
130 | do i=1,klon |
---|
131 | do l=1,klev |
---|
132 | if(l.ne.klev) |
---|
133 | s t_khvd(i,l)=TAUHID(i,klev-l+1,k) |
---|
134 | s -TAUHID(i,klev-l+1-1,k) |
---|
135 | if(l.eq.klev) |
---|
136 | s t_khvd(i,l)=TAUHID(i,klev-l+1,k) |
---|
137 | |
---|
138 | t_khvd(i,l)=t_khvd(i,l)/(zzlev(i,l+1)-zzlev(i,l)) |
---|
139 | enddo |
---|
140 | enddo |
---|
141 | write(str2,'(i2.2)') k |
---|
142 | call histwrite_phy(nid_ins,.false.,"khi"//str2,itau_w,t_khvd) |
---|
143 | enddo ! fin boucle NSPECI |
---|
144 | c -------------- |
---|
145 | c ----- OPACITE GAZ |
---|
146 | do k=7,NSPECV,10 |
---|
147 | do i=1,klon |
---|
148 | do l=1,klev |
---|
149 | t_tauhvd(i,l)=TAUGVD(i,klev-l+1,k) |
---|
150 | enddo |
---|
151 | enddo |
---|
152 | write(str2,'(i2.2)') k |
---|
153 | call histwrite_phy(nid_ins,.false.,"tgv"//str2,itau_w,t_tauhvd) |
---|
154 | enddo ! fin boucle NSPECV |
---|
155 | |
---|
156 | do k=8,NSPECI,10 |
---|
157 | do i=1,klon |
---|
158 | do l=1,klev |
---|
159 | t_tauhvd(i,l)=TAUGID(i,klev-l+1,k) |
---|
160 | enddo |
---|
161 | enddo |
---|
162 | write(str2,'(i2.2)') k |
---|
163 | call histwrite_phy(nid_ins,.false.,"tgi"//str2,itau_w,t_tauhvd) |
---|
164 | enddo ! fin boucle NSPECI |
---|
165 | c -------------- |
---|
166 | c ----- EXTINCTION GAZ |
---|
167 | do k=7,NSPECV,10 |
---|
168 | do i=1,klon |
---|
169 | do l=1,klev |
---|
170 | if(l.ne.klev) |
---|
171 | s t_khvd(i,l)=TAUGVD(i,klev-l+1,k) |
---|
172 | s -TAUGVD(i,klev-l+1-1,k) |
---|
173 | if(l.eq.klev) |
---|
174 | s t_khvd(i,l)=TAUGVD(i,klev-l+1,k) |
---|
175 | |
---|
176 | t_khvd(i,l)=t_khvd(i,l)/(zzlev(i,l+1)-zzlev(i,l)) |
---|
177 | enddo |
---|
178 | enddo |
---|
179 | write(str2,'(i2.2)') k |
---|
180 | call histwrite_phy(nid_ins,.false.,"kgv"//str2,itau_w,t_khvd) |
---|
181 | enddo ! fin boucle NSPECV |
---|
182 | |
---|
183 | do k=8,NSPECI,10 |
---|
184 | do i=1,klon |
---|
185 | do l=1,klev |
---|
186 | if(l.ne.klev) |
---|
187 | s t_khvd(i,l)=TAUGID(i,klev-l+1,k) |
---|
188 | s -TAUGID(i,klev-l+1-1,k) |
---|
189 | |
---|
190 | if(l.eq.klev) |
---|
191 | s t_khvd(i,l)=TAUGID(i,klev-l+1,k) |
---|
192 | |
---|
193 | t_khvd(i,l)=t_khvd(i,l)/(zzlev(i,l+1)-zzlev(i,l)) |
---|
194 | enddo |
---|
195 | enddo |
---|
196 | write(str2,'(i2.2)') k |
---|
197 | call histwrite_phy(nid_ins,.false.,"kgi"//str2,itau_w,t_khvd) |
---|
198 | enddo ! fin boucle NSPECI |
---|
199 | |
---|
200 | ENDIF !lev_histday.GE.3 |
---|
201 | |
---|
202 | c------------------------------------------------------- |
---|
203 | IF(lev_histday.GE.4) THEN |
---|
204 | |
---|
205 | call histwrite_phy(nid_ins,.false.,"dtdyn",itau_w,d_t_dyn) |
---|
206 | call histwrite_phy(nid_ins,.false.,"dtphy",itau_w,d_t) |
---|
207 | c K/s |
---|
208 | call histwrite_phy(nid_ins,.false.,"dtvdf",itau_w,d_t_vdf) |
---|
209 | c K/s |
---|
210 | call histwrite_phy(nid_ins,.false.,"dtajs",itau_w,d_t_ajs) |
---|
211 | c K/s |
---|
212 | call histwrite_phy(nid_ins,.false.,"dtswr",itau_w,heat) |
---|
213 | c K/s |
---|
214 | call histwrite_phy(nid_ins,.false.,"dtlwr",itau_w,-1.*cool) |
---|
215 | c K/s |
---|
216 | c call histwrite_phy(nid_ins,.false.,"dtec",itau_w,d_t_ec) |
---|
217 | c call histwrite_phy(nid_ins,.false.,"dvvdf",itau_w,d_v_vdf) |
---|
218 | |
---|
219 | ENDIF !lev_histday.GE.4 |
---|
220 | |
---|
221 | c------------------------------------------------------- |
---|
222 | IF(lev_histday.GE.5) THEN |
---|
223 | |
---|
224 | c call histwrite_phy(nid_ins,.false.,"taux",itau_w,fluxu) |
---|
225 | c call histwrite_phy(nid_ins,.false.,"tauy",itau_w,fluxv) |
---|
226 | c call histwrite_phy(nid_ins,.false.,"cdrm",itau_w,cdragm) |
---|
227 | c call histwrite_phy(nid_ins,.false.,"cdrh",itau_w,cdragh) |
---|
228 | |
---|
229 | ENDIF !lev_histday.GE.5 |
---|
230 | c------------------------------------------------------- |
---|
231 | |
---|
232 | if (ok_sync) then |
---|
233 | call histsync(nid_ins) |
---|
234 | endif |
---|
235 | ENDIF |
---|