Re: Problems contouring sparse array

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Tue Feb 16 2010 - 18:42:45 MST

Hi Daniel,

The SNOW_6HR data in bad.nc does indeed contain non-zero data, but the
sub-section you are actually plotting does not. Try putting the lines
printMinMax(snow,0)
and then
printMInMax((ymin:ymax,xmin:xmax),0)
in the appropriate places of your code to see the situation.

  -dave

P.S. At some point we would like to add an option to make it possible
to plot "constant" contour fields with a single fill color. Sorry it
is not possible now.

On Feb 16, 2010, at 5:27 PM, Daniel Steinhoff wrote:

> Hello,
>
> I am having issues contouring an array of snowfall accumulation data
> that is generally sparse and also contains very small values. I
> manipulated WRF output files to end up with 6-hourly accumulated
> snowfall ("SNOW_6HR") over a 100 x 100 grid. "okay.nc" contains one
> time period where the plot is okay. "bad.nc" contains a different
> time period where I get the error messages:
>
> warning:ContourPlotInitialize: scalar field is constant; ContourPlot
> not possible:[errno=1102]
> warning:ContourPlotSetValues: Data values out of range of levels set
> by EXPLICITLEVELS mode
>
> I looked at "bad.nc" with ncview, and also dumped out values using
> "ncl_filedump -v SNOW_6HR bad.nc", and in both cases non-zero data
> showed up. I have similar output every 6 hours over this entire
> month, and "bad.nc" represents the only time this month where this
> problem occurred. It has the sparsest grid (least amount of non-
> zero values) of the entire month. Note that I also tried setting
> cnLevelSelectionMode to "AutomaticLevels", and still got the first
> error message. I also tried converting the array to double
> precision, which did not help either. There are some very small
> values in there (down to 10^-41), but when I manipulated the data
> array in NCL to set all zero values to some multiple of one of the
> array indices (and left the extremely small values alone), it
> plotted with no errors. So this has me thinking that the large
> expanses of zeros across the domain might be an issue.
>
> If anyone can help me with this I would appreciate it. Thank you!
>
> Daniel Steinhoff
> Polar Meteorology Group
> Byrd Polar Research Center
> The Ohio State University
>
> <okay.nc><bad.nc><plot_snow_ex.ncl><CONSTANTS_WRF45_d5.nc>
>
> _______________________________________________
> 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 Feb 16 18:42:52 2010

This archive was generated by hypermail 2.1.8 : Thu Feb 18 2010 - 10:33:29 MST