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

Home » Public Forums » archive » ncdf string array dimension
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
ncdf string array dimension [message #63573] Fri, 14 November 2008 15:21 Go to next message
mccreigh is currently offline  mccreigh
Messages: 13
Registered: January 2008
Junior Member
(I solved this, but there were no obvious hits on this group, so i
thought I'd post it for others scratching their heads in the future.)
When you want to write a string array to a netcdf file, you may find
you are getting an error that the dimensions of your variable dont
match what is declared (in ncdf_vardef). You have to declare the
maximum length of your strings as the first dimension of the string
array variable, else it could be ragged. (Which is how you feel after
combing the IDL documentation for clues).

here's the example that saved the day:

http://www.astro.virginia.edu/class/oconnell/astr511/idl_5.1 _html/idl2d7.htm
Re: ncdf string array dimension [message #63667 is a reply to message #63573] Sat, 15 November 2008 00:19 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
changuito schrieb:
> (I solved this, but there were no obvious hits on this group, so i
> thought I'd post it for others scratching their heads in the future.)
> When you want to write a string array to a netcdf file, you may find
> you are getting an error that the dimensions of your variable dont
> match what is declared (in ncdf_vardef). You have to declare the
> maximum length of your strings as the first dimension of the string
> array variable, else it could be ragged. (Which is how you feel after
> combing the IDL documentation for clues).
>
> here's the example that saved the day:
>
> http://www.astro.virginia.edu/class/oconnell/astr511/idl_5.1 _html/idl2d7.htm


thanks, but you should have asked before. No questions - no answers - no
hits.

The reason for this behaviour is that the data is internally stored as
byte array. That makes 2 dimensions.


cheers

Reimar
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: conditional operator
Next Topic: Re: combobox widget text

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

Current Time: Wed Oct 08 18:35:46 PDT 2025

Total time taken to generate the page: 0.00486 seconds