Changeset 888 for trunk/LMDZ.VENUS/Tools
- Timestamp:
- Feb 18, 2013, 2:56:41 PM (12 years ago)
- Location:
- trunk/LMDZ.VENUS/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.VENUS/Tools/fft.F90
r816 r888 208 208 ! 2.1.1 Atmospheric temperature 209 209 !=============================================================================== 210 if (ok_out(4)) then 210 211 allocate(temp(lonlength,latlength,altlength,timelength)) 211 212 … … 216 217 text="t" 217 218 call get_var4d(infid,lonlength,latlength,altlength,timelength,text,temp,ierr1,ierr2) 218 if (ierr1.ne.NF_NOERR) stop "Error: Failed to get temperature ID" 219 endif 220 if (ierr2.ne.NF_NOERR) stop "Error: Failed reading temperature" 219 if (ierr1.ne.NF_NOERR) then 220 print*,"Error: Failed to get temperature ID" 221 ok_out(4)=.false. 222 endif 223 endif 224 if (ierr2.ne.NF_NOERR) then 225 print*,"Error: Failed reading temperature" 226 ok_out(4)=.false. 227 endif 228 endif !ok_out(4) 221 229 222 230 !=============================================================================== 223 231 ! 2.1.2 Winds 224 232 !=============================================================================== 233 ! zonal wind vitu (in m/s) 234 if (ok_out(1)) then 225 235 allocate(vitu(lonlength,latlength,altlength,timelength)) 226 allocate(vitv(lonlength,latlength,altlength,timelength)) 227 allocate(vitw(lonlength,latlength,altlength,timelength)) 228 229 ! zonal wind vitu (in m/s) 236 230 237 text="vitu" 231 238 call get_var4d(infid,lonlength,latlength,altlength,timelength,text,vitu,ierr1,ierr2) 232 if (ierr1.ne.NF_NOERR) stop "Error: Failed to get vitu ID" 233 if (ierr2.ne.NF_NOERR) stop "Error: Failed reading zonal wind" 239 if (ierr1.ne.NF_NOERR) then 240 print*,"Error: Failed to get vitu ID" 241 ok_out(1)=.false. 242 endif 243 if (ierr2.ne.NF_NOERR) then 244 print*,"Error: Failed reading zonal wind" 245 ok_out(1)=.false. 246 endif 247 endif !ok_out(1) 234 248 235 249 ! meridional wind vitv (in m/s) 250 if (ok_out(2)) then 251 allocate(vitv(lonlength,latlength,altlength,timelength)) 252 236 253 text="vitv" 237 254 call get_var4d(infid,lonlength,latlength,altlength,timelength,text,vitv,ierr1,ierr2) 238 if (ierr1.ne.NF_NOERR) stop "Error: Failed to get vitv ID" 239 if (ierr2.ne.NF_NOERR) stop "Error: Failed reading meridional wind" 255 if (ierr1.ne.NF_NOERR) then 256 print*,"Error: Failed to get vitv ID" 257 ok_out(2)=.false. 258 endif 259 if (ierr2.ne.NF_NOERR) then 260 print*,"Error: Failed reading meridional wind" 261 ok_out(2)=.false. 262 endif 263 endif !ok_out(2) 240 264 241 265 ! vertical wind vitw (in Pa/s) 266 if (ok_out(3)) then 267 allocate(vitw(lonlength,latlength,altlength,timelength)) 268 242 269 text="vitw" 243 270 call get_var4d(infid,lonlength,latlength,altlength,timelength,text,vitw,ierr1,ierr2) 244 if (ierr1.ne.NF_NOERR) stop "Error: Failed to get vitw ID" 245 if (ierr2.ne.NF_NOERR) stop "Error: Failed reading vertical wind" 271 if (ierr1.ne.NF_NOERR) then 272 print*,"Error: Failed to get vitw ID" 273 ok_out(3)=.false. 274 endif 275 if (ierr2.ne.NF_NOERR) then 276 print*,"Error: Failed reading vertical wind" 277 ok_out(3)=.false. 278 endif 279 endif !ok_out(3) 246 280 247 281 !=============================================================================== … … 256 290 ! allocations 257 291 !------------- 292 if (ok_out(1)) then 258 293 allocate(fftau(lonlength,latlength,altlength,timelength)) 294 allocate(uprim(lonlength,latlength,altlength,timelength)) 295 allocate(ulf(lonlength,latlength,altlength,timelength)) 296 allocate(ubf(lonlength,latlength,altlength,timelength)) 297 allocate(uhf(lonlength,latlength,altlength,timelength)) 298 endif !ok_out(1) 299 if (ok_out(2)) then 259 300 allocate(fftav(lonlength,latlength,altlength,timelength)) 301 allocate(vprim(lonlength,latlength,altlength,timelength)) 302 allocate(vlf(lonlength,latlength,altlength,timelength)) 303 allocate(vbf(lonlength,latlength,altlength,timelength)) 304 allocate(vhf(lonlength,latlength,altlength,timelength)) 305 endif !ok_out(2) 306 if (ok_out(3)) then 260 307 allocate(fftaw(lonlength,latlength,altlength,timelength)) 308 allocate(wprim(lonlength,latlength,altlength,timelength)) 309 allocate(wlf(lonlength,latlength,altlength,timelength)) 310 allocate(wbf(lonlength,latlength,altlength,timelength)) 311 allocate(whf(lonlength,latlength,altlength,timelength)) 312 endif !ok_out(3) 313 if (ok_out(4)) then 261 314 allocate(fftaT(lonlength,latlength,altlength,timelength)) 262 allocate(uprim(lonlength,latlength,altlength,timelength))263 allocate(vprim(lonlength,latlength,altlength,timelength))264 allocate(wprim(lonlength,latlength,altlength,timelength))265 315 allocate(Tprim(lonlength,latlength,altlength,timelength)) 266 allocate(ulf(lonlength,latlength,altlength,timelength))267 allocate(vlf(lonlength,latlength,altlength,timelength))268 allocate(wlf(lonlength,latlength,altlength,timelength))269 316 allocate(Tlf(lonlength,latlength,altlength,timelength)) 270 allocate(ubf(lonlength,latlength,altlength,timelength))271 allocate(vbf(lonlength,latlength,altlength,timelength))272 allocate(wbf(lonlength,latlength,altlength,timelength))273 317 allocate(Tbf(lonlength,latlength,altlength,timelength)) 274 allocate(uhf(lonlength,latlength,altlength,timelength))275 allocate(vhf(lonlength,latlength,altlength,timelength))276 allocate(whf(lonlength,latlength,altlength,timelength))277 318 allocate(Thf(lonlength,latlength,altlength,timelength)) 319 endif !ok_out(4) 278 320 279 321 ! lon,lat,alt 280 allocate(umean(lonlength,latlength,altlength))281 allocate(vmean(lonlength,latlength,altlength))282 allocate(wmean(lonlength,latlength,altlength))283 allocate(Tmean(lonlength,latlength,altlength))322 if (ok_out(1)) allocate(umean(lonlength,latlength,altlength)) 323 if (ok_out(2)) allocate(vmean(lonlength,latlength,altlength)) 324 if (ok_out(3)) allocate(wmean(lonlength,latlength,altlength)) 325 if (ok_out(4)) allocate(Tmean(lonlength,latlength,altlength)) 284 326 285 327 ! time / frequencies … … 298 340 !----------------- 299 341 300 call moytim(lonlength,latlength,altlength,timelength,miss_val,vitu,umean)301 call moytim(lonlength,latlength,altlength,timelength,miss_val,vitv,vmean)302 call moytim(lonlength,latlength,altlength,timelength,miss_val,vitw,wmean)303 call moytim(lonlength,latlength,altlength,timelength,miss_val,temp,Tmean)342 if (ok_out(1)) call moytim(lonlength,latlength,altlength,timelength,miss_val,vitu,umean) 343 if (ok_out(2)) call moytim(lonlength,latlength,altlength,timelength,miss_val,vitv,vmean) 344 if (ok_out(3)) call moytim(lonlength,latlength,altlength,timelength,miss_val,vitw,wmean) 345 if (ok_out(4)) call moytim(lonlength,latlength,altlength,timelength,miss_val,temp,Tmean) 304 346 305 347 do ilon=1,lonlength … … 307 349 do ilev=1,altlength 308 350 do itim=1,timelength 351 if (ok_out(1)) then 309 352 if ((vitu(ilon,ilat,ilev,itim).ne.miss_val).and. & 310 353 (umean(ilon,ilat,ilev) .ne.miss_val)) then … … 313 356 uprim(ilon,ilat,ilev,itim) = miss_val 314 357 endif 358 endif !ok_out(1) 359 if (ok_out(2)) then 315 360 if ((vitv(ilon,ilat,ilev,itim).ne.miss_val).and. & 316 361 (vmean(ilon,ilat,ilev) .ne.miss_val)) then … … 319 364 vprim(ilon,ilat,ilev,itim) = miss_val 320 365 endif 366 endif !ok_out(2) 367 if (ok_out(3)) then 321 368 if ((vitw(ilon,ilat,ilev,itim).ne.miss_val).and. & 322 369 (wmean(ilon,ilat,ilev) .ne.miss_val)) then … … 325 372 wprim(ilon,ilat,ilev,itim) = miss_val 326 373 endif 374 endif !ok_out(3) 375 if (ok_out(4)) then 327 376 if ((temp(ilon,ilat,ilev,itim).ne.miss_val).and. & 328 377 (Tmean(ilon,ilat,ilev) .ne.miss_val)) then … … 331 380 Tprim(ilon,ilat,ilev,itim) = miss_val 332 381 endif 382 endif !ok_out(4) 333 383 enddo 334 384 enddo … … 743 793 datashape1d =time_dimid2 744 794 795 call write_var1d(outfid2,datashape1d,timelength,& 796 "freq ", "FFT frequencies ","s-1 ",miss_val,& 797 freq ) 798 745 799 call write_var4d(outfid2,datashape4d,lonlength,latlength,altlength,timelength,& 746 800 "fftav ", "FFT ampl of vitv ","m s-1 ",miss_val,& … … 768 822 datashape1d =time_dimid3 769 823 824 call write_var1d(outfid3,datashape1d,timelength,& 825 "freq ", "FFT frequencies ","s-1 ",miss_val,& 826 freq ) 827 770 828 call write_var4d(outfid3,datashape4d,lonlength,latlength,altlength,timelength,& 771 829 "fftaw ", "FFT ampl of vitw ","Pa s-1 ",miss_val,& … … 793 851 datashape1d =time_dimid4 794 852 853 call write_var1d(outfid4,datashape1d,timelength,& 854 "freq ", "FFT frequencies ","s-1 ",miss_val,& 855 freq ) 856 795 857 call write_var4d(outfid4,datashape4d,lonlength,latlength,altlength,timelength,& 796 858 "fftaT ", "FFT ampl of temp ","K ",miss_val,& -
trunk/LMDZ.VENUS/Tools/filter.h
r816 r888 11 11 12 12 ! Choice of output files: 13 ! 14 logical,dimension(4) ,parameter:: ok_out=(/.true.,.true.,.false.,.true./)13 ! (U, V, W, T) 14 logical,dimension(4) :: ok_out=(/.true.,.true.,.false.,.true./) 15 15
Note: See TracChangeset
for help on using the changeset viewer.