Re: Lat/Lon to Polar: Revisited

  • Subject: Re: Lat/Lon to Polar: Revisited
  • From: "Kevin Manross" <kevin.manross@xxxxxxxx>
  • Date: Fri, 21 Oct 2005 14:59:55 -0500

Thanks for your response, Bill!

Bill Hibbard wrote:

Hi Kevin,

First, I hope you got the recent answers to your questions
on the list. The NOAA mail server was apparently down and
I know of one NOAA person who failed to get some email.

I believe I received the answers to my questions, thanks!

My problem is that I don't know how to construct the data set so that
VisAD can read/plot the az/ran data.  I am unsure whether to try to
create the domain [either (Range, Azimuth) or (Azimuth, Range)] as a
Gridded2DSet, Irregular2DSet, or what.  I have tried both.  The
Gridded2DSet fails saying that I do not have a valid grid (apparently
when azimuth goes from 359  -> 0 degrees).  The Irregular2DSet takes way
to long and runs out of heap space (even when I set it to 512 Mb).  So I
guess my main question is how do I construct my domain set to be a valid
grid composed of radar-centric polar coordinates - if it is even possible?

What you want here is a Gridded2DSet. It could be radius = 0
that is causing the samples along one edge of your grid to be
co-located (i.e., located at the same location). So you may
need to nudge these samples to some radius > 0. Or you may
need to nudge samples along other edges of your grid, to make
sure that there are no co-located samples and no twsited grid
boxes. If worse comes to worse, put print statements in the
consistency check in the Gridded2DSet constructor to tell you
the sample locations of the corners of the offending grid box.

Hmmm. The error I am getting does not appear to be related to a zero radius. Here is the output of the consistency check:

Samples[0][1] = 564688.6 Samples[0][0] = 565236.0 Samples[1][LengthX+1] = 314.9523 Samples[1][1] = 315.0188 Samples[1][1] = 315.0188 Samples[1][0] = 314.96332 Samples[0][LengthX+1] = 564034.06 Samples[0][1] = 564688.6 v00[]=Samples[][516] v10[]=Samples[][517] v01[]=Samples[][1549] v11[]=Samples[][1550]
Pos = true
1st = -333234.62 2nd = -333234.38 3rd = -333223.12 4th = -333223.38
Exception in thread "main" visad.SetException: Gridded2DSet: samples do not form a valid grid (516,0)

It seems to occur at beginning of the second pass of lat/lon values of the original terrain data set domain I.e.,:

LengthX: 1033, LengthY: 863
Line: 0:  36.883, -115.975 --> 565236.0, 314.96332
Line: 1:  36.883, -115.96667 --> 564688.6, 315.0188
Line: 2:  36.883, -115.95833 --> 564141.3, 315.07446


Line: 1031:  36.883, -107.38333 --> 564032.2, 44.914436
Line: 1032:  36.883, -107.375 --> 564578.94, 44.97006
Line: 1033:  36.87467, -115.975 --> 564582.06, 314.89682
Line: 1034:  36.87467, -115.96667 --> 564034.06, 314.9523

I'm using the X & Y lengths from the original lat/lon domain.

Also, I assume that I would set my ScalarMaps to Display.Radius (Range)
and Display.Longitude (Azimuth), but do I set my RealTypes (Range and
Azimuth) to RealType.Radius and RealType.Longitude also?

Actually, you may want to define the grid for each radar
on a different RealTuple (range_i, azimuth_i), each with
a different Radar2DCoordinateSystem to the
(Latitude, Longitude) reference RealTuple. Then just use
the ScalarMaps of Latitude and Longitude to XAxis and

Assuming that I'll process one netCDF file at a time (with a single corresponding radar location), I would then define my RealTypes "range" and "azimuth" and map them to XAxis and YAxis?



Kevin L. Manross        [KD5MYD] <><          (405)-366-0557
CIMMS Research Associate               kevin.manross@xxxxxxxx

"My opinions are my own and not representative of CIMMS, NSSL,
NOAA or any affiliates"

  • 2005 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: