Re: Unable to write out filtered data

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue Nov 15 2011 - 09:02:52 MST

Hi Zablone,

The error message is indicating that you may have all missing values in your uwn array.

You can check this quickly with:

   print(all(ismissing(uwn)))

This will print True or False depending on whether all your values are missing.

If these values are all missing, then double check everything that you are inputting to band_pass_latlon_time,
especially "x" to make sure it has valid values. Using "print(min(x))" and "print(max(x))" are easy, quick ways
to look at your data.

--Mary

On Nov 15, 2011, at 3:49 AM, Zablone Owiti wrote:

> Dear all,
> I'm new to NCL and am trying to filter and write the filtered data to a file using the following code:
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl"
> begin
>
> f = addfile("uwnd.mon.mean.nc", "r")
> x = f->uwnd
> print( getfilevarnames(f))
>
> srate = 1 ; monthly means
> bpf = (/20,36,49/) ;
> wgty =latRegWgt(x&lon,"double",0)
> opt = False
>
> xBPF = band_pass_latlon_time (x(time|:,lat|:,lon|:), srate, bpf, opt)
> xBPF !0 = "time"
> xBPF !1 = "lat"
> xBPF !2 = "lon"
> printVarSummary( xBPF )
>
> ;Return variable to original dimension
>
> uwn = xBPF(time|:,lat|:,lon|:)
>
> uwn&time = x&time
> uwn&lon = x&lon
> uwn&lat = x&lat
> copy_VarAtts(x,uwn)
> ;open file to write
> fileName = "uwnd.nc"
> setfileoption("nc","Format","LargeFile")
> outFile = addfile(fileName,"c")
>
> ;write data to file
> outFile->uwn = uwn
> printVarSummary( uwn )
> ;print("Thank you,come again." + systemfunc("date"))
> end
>
> When I try to plot the written data (uwnd.nc), I get the error:
> Warning: Countour plot; no valid values in scalar field; contourPlot possible: [errno=1101]
>
> Any help please
>
>
> ===================================================
> ZABLONE OWITI
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Nov 15 09:03:01 2011

This archive was generated by hypermail 2.1.8 : Thu Nov 17 2011 - 11:50:12 MST