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

Home » Public Forums » archive » How to grid pixel level data where latitude and longitude are 2D arrays
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How to grid pixel level data where latitude and longitude are 2D arrays [message #84954 is a reply to message #84951] Wed, 19 June 2013 13:30 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
masterjedirobyn@gmail.com writes:

> I have been having a problem gridding a very large dataset which contains pixel level data into a gridded average. My data looks like this:
>
> Lat and Lon are float [409,13248], the variables I wish to interpolate are also [409,13248]. I wish to grid these into arrays of [360,180] (1 degree spacing). Lon and Lat are irregular.
>
> I have tried several methods of doing this. First, I looked at http://www.idlcoyote.com/code_tips/griddata.html and followed the process there, using qhull. Then, using the griddata command gave the following error: GRIDDATA: Value of Triangle index is out of allowed range. I then used triangulate instead of qhull and did not run into an error, but the result I got does not seem to be correct. Even if it was correct, the amount of time this calculation takes is huge; it
runs overnight, and that's only on one file. I have many.
>
> Does anyone know a faster, more memory efficient way of gridding data when your latitude and longitude are irregular and in 2D? This calculation typically freezes my machine with IDL using over 100% of the CPU. Is it possible that there could be some trick using Value_Locate? (Although from what I read, value_locate only works when your lon/lats are monotonically increasing/decreasing)

Well, I have never known GridData NOT to take a lot of time! Although
all night does seem a bit excessive. But, I have managed to get it to
work, on occasion. Switching from Triangulate to QHull or visa versa
rings some bells. Have you tried running Grid_Input on your data first?
Have you used the Tolerance keyword to Triangulate? Have you read this
article:

http://www.idlcoyote.com/code_tips/usegriddata.html

That is an awful lot of data points. I can see why there is some
thrashing going on. Can you get this to work if you take some reasonably
small number of random points from your data and worked with those?
Maybe you are so oversampled, it won't make any difference. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Cleaning up an inherited object...
Next Topic: convert .dat to .fits

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

Current Time: Fri Oct 10 04:43:54 PDT 2025

Total time taken to generate the page: 0.80037 seconds