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

Home » Public Forums » archive » Re: Retrieving variables from a subroutine
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: Retrieving variables from a subroutine [message #52629 is a reply to message #52615] Mon, 19 February 2007 07:22 Go to previous messageGo to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article <ercbpk$res$1@south.jnrs.ja.net>,
Andy Heaps <a.j.heaps@reading.ac.uk> wrote:

> Does anyone know of any IDL magic that could be used to have a single
> procedural (or other) call, and then somehow end up with the NetCDF
> variables extracted back in the the calling procedure?

I think structures really are the best way to do this. I generally
use a function rather than a procedure, so it is called like this

data = READ_SAT_DAT(input)

where input is a file name or date, depending on the application.

READ_SAT_DATA packages all of the info from the file into an
anonymous structure.

It is not too difficult to get undergrads to understand, for example,
that

data.longitude

contains the longitudes of the satellite fields of view,

data.values

contains the radiances or retrieved quantities, etc.

The structure makes it easy to include the data and all of the
ancillary information (units, long names, etc.) in a single package.

Ken Bowman
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: import vrml in idl
Next Topic: Re: import vrml in idl

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

Current Time: Sun Oct 12 14:34:09 PDT 2025

Total time taken to generate the page: 1.44162 seconds