Changeset 1056 for trunk/LMDZ.TITAN/libf/phytitan/write_histins.h
- Timestamp:
- Oct 7, 2013, 6:42:03 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.TITAN/libf/phytitan/write_histins.h
r808 r1056 3 3 ! 4 4 IF (ok_instan) 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 c 13 zsto = dtime * FLOAT(ecrit_ins) 14 zout = dtime * FLOAT(ecrit_ins) 5 6 zsto = dtime * REAL(ecrit_ins) 7 zout = dtime * REAL(ecrit_ins) 15 8 itau_w = itau_phy + itap 16 9 17 c18 10 c------------------------------------------------------- 19 11 IF(lev_histday.GE.1) THEN 20 c 12 21 13 ccccccccccccc 2D fields, invariables 22 c 23 CALL gr_fi_ecrit(1,klon,iim,jjmp1,pphis,zx_tmp_2d) 24 CALL histwrite(nid_ins,"phis",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) 25 C 26 CALL gr_fi_ecrit(1,klon,iim,jjmp1,airephy,zx_tmp_2d) 27 CALL histwrite(nid_ins,"aire",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) 28 c 14 15 call histwrite_phy(nid_ins,.false.,"phis",itau_w,pphis) 16 call histwrite_phy(nid_ins,.false.,"aire",itau_w,airephy) 17 29 18 ccccccc axe Ls ... Faudrait le reduire a axe temporel seulement... 30 do j=1,jjmp1 31 do i=1,iim 32 zx_tmp_2d(i,j)=zls*180./RPI ! zls est en radians !! 33 enddo 19 do i=1,klon 20 tmpout(i,1) = zls*180./RPI 34 21 enddo 35 CALL histwrite(nid_ins,"ls",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)36 c 22 call histwrite_phy(nid_ins,.false.,"ls",itau_w,tmpout(:,1)) 23 37 24 ccccccccccccc 2D fields, variables 38 c 39 CALL gr_fi_ecrit(1, klon,iim,jjmp1, ftsol,zx_tmp_2d) 40 CALL histwrite(nid_ins,"tsol",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) 41 c 42 DO i = 1, klon 43 zx_tmp_fi2d(i) = paprs(i,1) 44 ENDDO 45 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) 46 CALL histwrite(nid_ins,"psol",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) 47 c 48 c CALL gr_fi_ecrit(1, klon,iim,jjmp1, ue,zx_tmp_2d) 49 c CALL histwrite(nid_ins,"ue",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) 50 c 51 c CALL gr_fi_ecrit(1, klon,iim,jjmp1, ve,zx_tmp_2d) 52 c CALL histwrite(nid_ins,"ve",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) 53 c 25 26 call histwrite_phy(nid_ins,.false.,"tsol",itau_w,ftsol) 27 call histwrite_phy(nid_ins,.false.,"psol",itau_w,paprs(:,1)) 28 29 c call histwrite_phy(nid_ins,.false.,"ue",itau_w,ue) 30 c call histwrite_phy(nid_ins,.false.,"ve",itau_w,ve) 31 54 32 ENDIF !lev_histday.GE.1 55 c 33 56 34 c------------------------------------------------------- 57 35 IF(lev_histday.GE.2) THEN 58 c 36 59 37 ccccccccccccc 3D fields, basics 60 c 61 CALL gr_fi_ecrit(klev,klon,iim,jjmp1, t_seri, zx_tmp_3d) 62 CALL histwrite(nid_ins,"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_ins,"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_ins,"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_ins,"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 CALL histwrite(nid_ins,"vitv",itau_w,zx_tmp_3d, 79 . iim*jjmp1*klev,ndex3d) 80 c 81 CALL gr_fi_ecrit(klev,klon,iim,jjmp1, omega, zx_tmp_3d) 82 CALL histwrite(nid_ins,"vitw",itau_w,zx_tmp_3d, 83 . iim*jjmp1*klev,ndex3d) 84 c 85 CALL gr_fi_ecrit(1, klon,iim,jjmp1, topsw,zx_tmp_2d) 86 CALL histwrite(nid_ins,"tops",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) 87 c 88 c CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_u_vdf, zx_tmp_3d) 89 c CALL histwrite(nid_ins,"duvdf",itau_w,zx_tmp_3d, 90 c . iim*jjmp1*klev,ndex3d) 91 c 92 c CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_u_dyn, zx_tmp_3d) 93 c CALL histwrite(nid_ins,"dudyn",itau_w,zx_tmp_3d, 94 c . iim*jjmp1*klev,ndex3d) 95 c 38 39 call histwrite_phy(nid_ins,.false.,"temp",itau_w,t_seri) 40 call histwrite_phy(nid_ins,.false.,"pres",itau_w,pplay) 41 call histwrite_phy(nid_ins,.false.,"geop",itau_w,zphi) 42 call histwrite_phy(nid_ins,.false.,"vitu",itau_w,u_seri) 43 call histwrite_phy(nid_ins,.false.,"vitv",itau_w,v_seri) 44 call histwrite_phy(nid_ins,.false.,"vitw",itau_w,omega) 45 call histwrite_phy(nid_ins,.false.,"tops",itau_w,topsw) 46 c call histwrite_phy(nid_ins,.false.,"duvdf",itau_w,d_u_vdf) 47 c call histwrite_phy(nid_ins,.false.,"dudyn",itau_w,d_u_dyn) 48 96 49 ENDIF !lev_histday.GE.2 97 c 50 98 51 c------------------------------------------------------- 99 52 IF(lev_histday.GE.3) THEN 100 c 53 101 54 cccccccccccccccccc Tracers 102 c 55 103 56 if (iflag_trac.eq.1) THEN 104 57 if (microfi.eq.1) then 105 58 DO iq=1,nmicro 106 CALL gr_fi_ecrit(klev,klon,iim,jjmp1, qaer(1,1,iq), zx_tmp_3d) 107 CALL histwrite(nid_ins,tname(iq),itau_w,zx_tmp_3d, 108 . iim*jjmp1*klev,ndex3d) 59 call histwrite_phy(nid_ins,.false.,tname(iq), 60 . itau_w,qaer(1:klon,1:klev,iq)) 109 61 ENDDO 110 62 endif 111 63 if (nmicro.lt.nqmax) then 112 64 DO iq=nmicro+1,nqmax 113 CALL gr_fi_ecrit(klev,klon,iim,jjmp1,tr_seri(1,1,iq),zx_tmp_3d) 114 CALL histwrite(nid_ins,tname(iq),itau_w,zx_tmp_3d, 115 . iim*jjmp1*klev,ndex3d) 65 call histwrite_phy(nid_ins,.false.,tname(iq), 66 . itau_w,tr_seri(1:klon,1:klev,iq)) 116 67 ENDDO 117 68 endif 118 69 endif 119 c 70 120 71 cccccccccccccccccc Radiative transfer 121 c 72 122 73 c 2D 123 c 124 CALL gr_fi_ecrit(1, klon,iim,jjmp1, toplw,zx_tmp_2d) 125 CALL histwrite(nid_ins,"topl",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) 126 c 127 CALL gr_fi_ecrit(1, klon,iim,jjmp1, solsw,zx_tmp_2d) 128 CALL histwrite(nid_ins,"sols",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) 129 c 130 CALL gr_fi_ecrit(1, klon,iim,jjmp1, sollw,zx_tmp_2d) 131 CALL histwrite(nid_ins,"soll",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) 132 c 74 75 call histwrite_phy(nid_ins,.false.,"topl",itau_w,toplw) 76 call histwrite_phy(nid_ins,.false.,"sols",itau_w,solsw) 77 call histwrite_phy(nid_ins,.false.,"soll",itau_w,sollw) 78 133 79 c 3D 134 c 135 zx_tmp_fi3d(1:klon,1:klev)=swnet(1:klon,1:klev) 136 CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) 137 CALL histwrite(nid_ins,"SWnet",itau_w,zx_tmp_3d, 138 . iim*jjmp1*klev,ndex3d) 139 c 140 zx_tmp_fi3d(1:klon,1:klev)=lwnet(1:klon,1:klev) 141 CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) 142 CALL histwrite(nid_ins,"LWnet",itau_w,zx_tmp_3d, 143 . iim*jjmp1*klev,ndex3d) 144 c 80 81 call histwrite_phy(nid_ins,.false.,"SWnet", 82 . itau_w,swnet(1:klon,1:klev)) 83 call histwrite_phy(nid_ins,.false.,"LWnet", 84 . itau_w,lwnet(1:klon,1:klev)) 85 145 86 c -------------- 146 87 c ----- OPACITE BRUME … … 151 92 enddo 152 93 enddo 153 write(str1,'(i2.2)') k 154 zx_tmp_fi3d(1:klon,1:klev)=t_tauhvd(1:klon,1:klev) 155 CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) 156 CALL histwrite(nid_ins,"thv"//str1,itau_w,zx_tmp_3d, 157 . iim*jjmp1*klev,ndex3d) 94 write(str2,'(i2.2)') k 95 call histwrite_phy(nid_ins,.false.,"thv"//str2,itau_w,t_tauhvd) 158 96 enddo ! fin boucle NSPECV 159 97 … … 164 102 enddo 165 103 enddo 166 write(str1,'(i2.2)') k 167 zx_tmp_fi3d(1:klon,1:klev)=t_tauhvd(1:klon,1:klev) 168 CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) 169 CALL histwrite(nid_ins,"thi"//str1,itau_w,zx_tmp_3d, 170 . iim*jjmp1*klev,ndex3d) 104 write(str2,'(i2.2)') k 105 call histwrite_phy(nid_ins,.false.,"thi"//str2,itau_w,t_tauhvd) 171 106 enddo ! fin boucle NSPECI 172 107 c -------------- … … 178 113 s t_khvd(i,l)=TAUHVD(i,klev-l+1,k) 179 114 s -TAUHVD(i,klev-l+1-1,k) 180 181 115 if(l.eq.klev) 182 116 s t_khvd(i,l)=TAUHVD(i,klev-l+1,k) … … 185 119 enddo 186 120 enddo 187 write(str1,'(i2.2)') k 188 zx_tmp_fi3d(1:klon,1:klev)=t_khvd(1:klon,1:klev) 189 CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) 190 CALL histwrite(nid_ins,"khv"//str1,itau_w,zx_tmp_3d, 191 . iim*jjmp1*klev,ndex3d) 121 write(str2,'(i2.2)') k 122 call histwrite_phy(nid_ins,.false.,"khv"//str2,itau_w,t_khvd) 192 123 enddo ! fin boucle NSPECV 193 124 … … 198 129 s t_khvd(i,l)=TAUHID(i,klev-l+1,k) 199 130 s -TAUHID(i,klev-l+1-1,k) 200 201 131 if(l.eq.klev) 202 132 s t_khvd(i,l)=TAUHID(i,klev-l+1,k) … … 205 135 enddo 206 136 enddo 207 write(str1,'(i2.2)') k 208 zx_tmp_fi3d(1:klon,1:klev)=t_khvd(1:klon,1:klev) 209 CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) 210 CALL histwrite(nid_ins,"khi"//str1,itau_w,zx_tmp_3d, 211 . iim*jjmp1*klev,ndex3d) 137 write(str2,'(i2.2)') k 138 call histwrite_phy(nid_ins,.false.,"khi"//str2,itau_w,t_khvd) 212 139 enddo ! fin boucle NSPECI 213 140 c -------------- … … 219 146 enddo 220 147 enddo 221 write(str1,'(i2.2)') k 222 zx_tmp_fi3d(1:klon,1:klev)=t_tauhvd(1:klon,1:klev) 223 CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) 224 CALL histwrite(nid_ins,"tgv"//str1,itau_w,zx_tmp_3d, 225 . iim*jjmp1*klev,ndex3d) 148 write(str2,'(i2.2)') k 149 call histwrite_phy(nid_ins,.false.,"tgv"//str2,itau_w,t_tauhvd) 226 150 enddo ! fin boucle NSPECV 227 151 … … 232 156 enddo 233 157 enddo 234 write(str1,'(i2.2)') k 235 zx_tmp_fi3d(1:klon,1:klev)=t_tauhvd(1:klon,1:klev) 236 CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) 237 CALL histwrite(nid_ins,"tgi"//str1,itau_w,zx_tmp_3d, 238 . iim*jjmp1*klev,ndex3d) 158 write(str2,'(i2.2)') k 159 call histwrite_phy(nid_ins,.false.,"tgi"//str2,itau_w,t_tauhvd) 239 160 enddo ! fin boucle NSPECI 240 161 c -------------- … … 246 167 s t_khvd(i,l)=TAUGVD(i,klev-l+1,k) 247 168 s -TAUGVD(i,klev-l+1-1,k) 248 249 169 if(l.eq.klev) 250 170 s t_khvd(i,l)=TAUGVD(i,klev-l+1,k) … … 253 173 enddo 254 174 enddo 255 write(str1,'(i2.2)') k 256 zx_tmp_fi3d(1:klon,1:klev)=t_khvd(1:klon,1:klev) 257 CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) 258 CALL histwrite(nid_ins,"kgv"//str1,itau_w,zx_tmp_3d, 259 . iim*jjmp1*klev,ndex3d) 175 write(str2,'(i2.2)') k 176 call histwrite_phy(nid_ins,.false.,"kgv"//str2,itau_w,t_khvd) 260 177 enddo ! fin boucle NSPECV 261 178 … … 273 190 enddo 274 191 enddo 275 write(str1,'(i2.2)') k 276 zx_tmp_fi3d(1:klon,1:klev)=t_khvd(1:klon,1:klev) 277 CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) 278 CALL histwrite(nid_ins,"kgi"//str1,itau_w,zx_tmp_3d, 279 . iim*jjmp1*klev,ndex3d) 192 write(str2,'(i2.2)') k 193 call histwrite_phy(nid_ins,.false.,"kgi"//str2,itau_w,t_khvd) 280 194 enddo ! fin boucle NSPECI 281 195 282 196 ENDIF !lev_histday.GE.3 283 c 197 284 198 c------------------------------------------------------- 285 199 IF(lev_histday.GE.4) THEN 286 c 287 CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_t_dyn, zx_tmp_3d) 288 CALL histwrite(nid_ins,"dtdyn",itau_w,zx_tmp_3d, 289 . iim*jjmp1*klev,ndex3d) 290 c 291 CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_t, zx_tmp_3d) 292 CALL histwrite(nid_ins,"dtphy",itau_w,zx_tmp_3d, 293 . iim*jjmp1*klev,ndex3d) 294 c K/s 295 zx_tmp_fi3d(1:klon,1:klev)=d_t_vdf(1:klon,1:klev) 296 CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) 297 CALL histwrite(nid_ins,"dtvdf",itau_w,zx_tmp_3d, 298 . iim*jjmp1*klev,ndex3d) 299 c 300 c K/s 301 zx_tmp_fi3d(1:klon,1:klev)=d_t_ajs(1:klon,1:klev) 302 CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) 303 CALL histwrite(nid_ins,"dtajs",itau_w,zx_tmp_3d, 304 . iim*jjmp1*klev,ndex3d) 305 c 306 c K/s 307 zx_tmp_fi3d(1:klon,1:klev)=heat(1:klon,1:klev) 308 CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) 309 CALL histwrite(nid_ins,"dtswr",itau_w,zx_tmp_3d, 310 . iim*jjmp1*klev,ndex3d) 311 c 200 201 call histwrite_phy(nid_ins,.false.,"dtdyn",itau_w,d_t_dyn) 202 call histwrite_phy(nid_ins,.false.,"dtphy",itau_w,d_t) 203 c K/s 204 call histwrite_phy(nid_ins,.false.,"dtvdf",itau_w,d_t_vdf) 205 c K/s 206 call histwrite_phy(nid_ins,.false.,"dtajs",itau_w,d_t_ajs) 207 c K/s 208 call histwrite_phy(nid_ins,.false.,"dtswr",itau_w,heat) 209 c K/s 210 call histwrite_phy(nid_ins,.false.,"dtlwr",itau_w,-1.*cool) 312 211 c K/s 313 zx_tmp_fi3d(1:klon,1:klev)=-1.*cool(1:klon,1:klev) 314 CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) 315 CALL histwrite(nid_ins,"dtlwr",itau_w,zx_tmp_3d, 316 . iim*jjmp1*klev,ndex3d) 317 c K/s 318 c zx_tmp_fi3d(1:klon,1:klev)=d_t_ec(1:klon,1:klev) 319 c CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d) 320 c CALL histwrite(nid_ins,"dtec",itau_w,zx_tmp_3d, 321 c . iim*jjmp1*klev,ndex3d) 322 c 323 c CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_v_vdf, zx_tmp_3d) 324 c CALL histwrite(nid_ins,"dvvdf",itau_w,zx_tmp_3d, 325 c . iim*jjmp1*klev,ndex3d) 326 c 212 c call histwrite_phy(nid_ins,.false.,"dtec",itau_w,d_t_ec) 213 c call histwrite_phy(nid_ins,.false.,"dvvdf",itau_w,d_v_vdf) 214 327 215 ENDIF !lev_histday.GE.4 328 c 216 329 217 c------------------------------------------------------- 330 218 IF(lev_histday.GE.5) THEN 331 c 332 c 333 c CALL gr_fi_ecrit(1, klon,iim,jjmp1, fluxu , zx_tmp_2d) 334 c CALL histwrite(nid_ins,"taux_",itau_w, 335 c $ zx_tmp_2d,iim*jjmp1,ndex2d) 336 c 337 c CALL gr_fi_ecrit(1, klon,iim,jjmp1, fluxv , zx_tmp_2d) 338 c CALL histwrite(nid_ins,"tauy_",itau_w, 339 c $ zx_tmp_2d,iim*jjmp1,ndex2d) 340 c 341 c CALL gr_fi_ecrit(1, klon,iim,jjmp1, cdragm,zx_tmp_2d) 342 c CALL histwrite(nid_ins,"cdrm",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) 343 c 344 c CALL gr_fi_ecrit(1, klon,iim,jjmp1, cdragh,zx_tmp_2d) 345 c CALL histwrite(nid_ins,"cdrh",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) 346 c 219 220 c call histwrite_phy(nid_ins,.false.,"taux",itau_w,fluxu) 221 c call histwrite_phy(nid_ins,.false.,"tauy",itau_w,fluxv) 222 c call histwrite_phy(nid_ins,.false.,"cdrm",itau_w,cdragm) 223 c call histwrite_phy(nid_ins,.false.,"cdrh",itau_w,cdragh) 224 347 225 ENDIF !lev_histday.GE.5 348 226 c------------------------------------------------------- 349 c 227 350 228 if (ok_sync) then 351 229 call histsync(nid_ins)
Note: See TracChangeset
for help on using the changeset viewer.