Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: Lat/Lon to Polar: Revisited

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 have several netCDF terrain files that are read into VisAD as
> ((Longitude, Latitude) -> Altitude).  I have an EarthLocationTuple
> (radar site) that is  located in the (lat/lon) center of each terrain file.
>
> I can use Radar"X"DCoordinateSystem to get an az/ran for each lat/lon
> gridpoint of my terrain file.  I would like to create a corresponding
> set of ((Range, Azimuth)->Altitude) netCDF files for each of the
> original terrain files.  Doing this would hopefully speed up many
> calculations - or at least simplfy my code by eliminating the lat/lon ->
> az/ran conversion.
>
> 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.

> 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
YAxis.

Good luck,
Bill


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690