comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » A new object to play with: horizontal (rectangular) grids
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
A new object to play with: horizontal (rectangular) grids [message #25073] Thu, 10 May 2001 12:07
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
Dear all,

while I was trying to fix a bug in a regridding program that I once wrote ;-( I decided enough is enough, and I finally sat down to create an object to deal with "georeferencing" as I hope I may call it. Those of you who have developped visualisation routines for geophysical data may have run into the following problems (if not, you are either much smarter than me or just lucky):

1. longitude vectors can wrap around the globe, and they sometimes start at or near 0. degrees, sometimes at or near -180. This can cause a lot of headache when you try to get an index vector for longitudes from -60. to 60. degrees or from 120. to -150. degrees, for example.

2. latitude vectors can be sorted in ascending or descending order, depending on the model or data set in question. As a user, I would always expect a vector in descending order if I extract latitudes from 80. to -80. degrees, for example.

3. sometimes you want to look at grid box "center" coordinates, at other times you need the edge values.

4. you can never remember the exact starting point of a grid (did it have an edge or a center value at 0. degree?)

5. what do you do if the point (or range endpoint) you want to extract lies exactly on the grid box boundary? Sometimes you want to include it in your selection, other times you don't.

The solution to all of these problems (and possible others) is now almost ready, and you can download a first test version from ftp://ftp.dkrz.de/pub/Outgoing/martin_schultz/idl/ . So far, not all the features are fully implemented, and it works only for longitudes (i.e. I haven't implemented the ordering of latitude vectors yet). It is really work in progress, but I decided to post this article anyway, because now is the time where you can still influence the design process if you have serious objections to how certain things work or how they are called. As always the program (mgs_hgrid__define.pro) has a lot of documentation embedded, and there is an example program at the end to show you how to work with this object.

Try it out and let me know if this may be useful to you, this always encourages me to spend more effort on something like this ;-)

Cheers,
Martin



--
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[[ Dr. Martin Schultz Max-Planck-Institut fuer Meteorologie [[
[[ Bundesstr. 55, 20146 Hamburg [[ [[ phone: +49 40 41173-308 [[
[[ fax: +49 40 41173-298 [[ [[ martin.schultz@dkrz.de [[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[Message index]
 
Read Message
Previous Topic: Re: New IDL User Questions
Next Topic: Re: Image overlay

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:37:52 PDT 2025

Total time taken to generate the page: 0.00401 seconds