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

Home » Public Forums » archive » Re: equal lat long grid
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: equal lat long grid [message #48295] Mon, 10 April 2006 11:56 Go to next message
glaciologist is currently offline  glaciologist
Messages: 4
Registered: April 2006
Junior Member
try using MS2GT and the EASE grid...
http://nsidc.org/data/modis/ms2gt/tutorial_1.html#gpdfile
Re: equal lat long grid [message #48303 is a reply to message #48295] Sun, 09 April 2006 23:51 Go to previous messageGo to next message
peter.albert@gmx.de is currently offline  peter.albert@gmx.de
Messages: 108
Registered: July 2005
Senior Member
Hi Pawan,

I once wrote lonlat2reg() which can be found here:
http://wew.met.fu-berlin.de/idl/lonlat2reg.pro

Input can be any arrays or vectors with (irregular) longitude /
latitude and data information. Output is a structure with the number of
irregular data points in each regular grid box, their sum, squared sum
and average, standard deviation and the lon / lat values of the grid
center. The target regular grid is defined via keywords. You choose the
lower left corner, the size of each grid and the number of grid boxes.
N.b. the lower left corner is the lower left corner, not the center of
the lower leftmost grid box.

And yes, it uses histogram and reverse indices!

Cheers,

Peter
Re: equal lat long grid [message #48318 is a reply to message #48303] Fri, 07 April 2006 13:37 Go to previous messageGo to next message
greg michael is currently offline  greg michael
Messages: 163
Registered: January 2006
Senior Member
For each of your 241x721 map cells, you're checking every one of your 2
million points to see if it belongs - this is about 2e5 x 2e6 = 4e11
operations. Suppose you did it the other way around - for each of your
points you decide which cell it belongs to - then you have only 2e6
operations - should be of the order of 100,000 times faster, shouldn't
it?

regards,
Greg
Re: equal lat long grid [message #48514 is a reply to message #48303] Thu, 27 April 2006 08:10 Go to previous messageGo to next message
Pawan is currently offline  Pawan
Messages: 9
Registered: April 2006
Junior Member
Thanks, Peter ...I will try and let you know about my experience....For
time being I used an Fortran code which take less than 1 mint to
performe gridding.

Pawan
Re: equal lat long grid [message #48587 is a reply to message #48303] Fri, 28 April 2006 11:45 Go to previous message
Pawan is currently offline  Pawan
Messages: 9
Registered: April 2006
Junior Member
Hi Peter,

I am running this program on IDL_6.0 on Linux machine and it gives me
error on the following location. IDL does not recognize indgen_array.

glon = indgen_array(nlon, nlat, /lon) * dlon + lon0[0] + dlon / 2.
glat = indgen_array(nlon, nlat, /lat) * dlat + lat0[0] + dlat / 2.

I was wondering is this just indgen or some other thing you want to do
here ?

glon = indgen(nlon, nlat) * dlon + lon0[0] + dlon / 2.
glat = indgen(nlon, nlat) * dlat + lat0[0] + dlat / 2.

Thanks,
Pawan
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Saving the IDL terminal datastream
Next Topic: equal lat long grid

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

Current Time: Wed Oct 08 17:12:56 PDT 2025

Total time taken to generate the page: 0.00703 seconds