netcdf/perl interface and CHAR variables

Hey Folks,

I actually asked this question about 10 years ago and saw my reply/answer on the web, but I need something more exact.

I'm using the latest netCDF/Perl interface and it works great, except for one thing: writing CHAR variables.

Say I have this:                @array = qw ( dog bunny goat);

and I'd like to to this:

                NetCDF::varput($ncid, $varid_pets,      \@start, 
\@count,\@array );

Of course this doesn't work. NetCDF treats strings as arrays, and Perl treats them as scalars. So, what *exact* codelet would I need to get this ncdump partial result?:

        pets = 'dog', 'bunny', 'goat';

thanks,
-Steve Diggs

==============================================================================
To unsubscribe netcdfgroup, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
==============================================================================


  • 2006 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: