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

Home » Public Forums » archive » IDL to write GrADS netCDF (SDF)
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
IDL to write GrADS netCDF (SDF) [message #77654] Wed, 14 September 2011 02:28 Go to next message
Rich Bantges is currently offline  Rich Bantges
Messages: 3
Registered: September 2011
Junior Member
Hi,

I'm trying to write a netCDF file that is compatible with the GrADS
software, so that the netCDF file can be read using the sdfopen
command in GrADS.

I can write a binary file in IDL (using WRITEU) and generate a GrADS
control file (in ASCII), and I can write a netCDF file in IDL. The
problem is, I cannot seem to write a fully compatible netCDF file
using IDL that can then be read in using the GrADS sdfopen command.

Does anyone have a simple IDL procedure that I can work from as an
example please?

I've seen various examples here http://www.unidata.ucar.edu/software/netcdf/examples/program s/
but they don't quite do it.

I know that I can convert binary files to netCDF using tools likes
xconv, but ideally I'd like to just write an SDF (self describing
format) netCDF file directly from IDL (especially as the data I have
are currently saved in IDL .sav files).

Any help would be greatly appreciated!

Rich
Re: IDL to write GrADS netCDF (SDF) [message #77705 is a reply to message #77654] Fri, 16 September 2011 14:34 Go to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article <MPG.28dd0ceec202959298980f@news.giganews.com>,
David Fanning <news@dfanning.com> wrote:

> You see! I LOVE standards! :-)

C and Fortran are very standard. Of course, they did choose
different standards. ;-)

Ken
Re: IDL to write GrADS netCDF (SDF) [message #77706 is a reply to message #77654] Fri, 16 September 2011 11:51 Go to previous message
Brian Wolven is currently offline  Brian Wolven
Messages: 94
Registered: May 2011
Member
On Friday, September 16, 2011 10:36:51 AM UTC-4, David Fanning wrote:

> You see! I LOVE standards! :-)

Row-major standards, or column-major standards?
Re: IDL to write GrADS netCDF (SDF) [message #77707 is a reply to message #77654] Fri, 16 September 2011 07:36 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Kenneth P. Bowman writes:

> Be careful. I don't follow the COARDS standard myself (never
> found a need to), but they are probably referring to the
> C-language convention, where the last index varies fastest.
>
> This is what you see when you use ncdump. You need to remember
> to reverse the apparent order for IDL and Fortran.

You see! I LOVE standards! :-)

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDL to write GrADS netCDF (SDF)
Next Topic: USERSYM & LEGEND

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

Current Time: Wed Oct 08 11:40:38 PDT 2025

Total time taken to generate the page: 0.00491 seconds