[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[IDV #MGR-676445]: comparing netCDF point data + pixel value



Hi Valentijn-

> i hope you are fine. Europe is (not) preparing for another bird-flew 
> outbreak, and as my chicken are to quick to catch anyway i'm afraid they'll 
> wont be here for long;-(

I'm sorry to hear that.  I wish I could even have chickens at my house!
 
> I was exploring the use of point observation of surface temperatures we made 
> over Burkina Faso last year september. Now, the guys at GEON IDV make 
> available a nice ASCII-to-netCDF converter so that shouldn't be a problem. I 
> already converted some, and the data displays nicely in IDV. What troubles me 
> is the following. I would like to create a scatterplot of one point location 
> (possibly with stationID) against surface temperatures from the same location 
> in an imageSequence (like what you get from data plobe). Now the times in the 
> point data cover the same period as the imageSequence, but not with exactly 
> the same timestep. The satellite data used to create the imageSequence comes 
> every 15 minutes, yet the point data varies in timestep (sometimes every 5 
> min, 10min, 30 min, etc.) Is IDV able to still find data pairs by 
> interpolating between the various timesteps, and to create a scatterplot (or 
> to compute an r-squared at jython level)?

You could use some of the methods in ucar.unidata.data.grid.GridUtil
to sample your image sequence:

GridUtil.sample(image, LatLonPoint)

This will return a grid of points of the form:

time->((x,y)->imagevalue))

You could then make a set from the list of times in your point
observations and resample the grid to that set of times, using
the GridUtil.resampleGrid(grid, set, samplingMode) method.
For the samplingMode, you can use WEIGHTED_AVERAGE or NEAREST_NEIGHBOR
to get averaged or closest samples.

The charting facility in the IDV supports scatterplots, but it
is not generic enough yet to take these two grids in the forms
you'll end up with and plot them.  However, you could use them
in some Jython formula.

Don Murray

Ticket Details
===================
Ticket ID: MGR-676445
Department: Support IDV
Priority: High
Status: Open