[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 971001: strings in ncgen



>To: address@hidden
>From: Kate Hedstrom <address@hidden>
>Subject: strings in ncgen
>Organization: .
>Keywords: 199710011535.JAA25965

Hi Kate,

> I'm having a problem with strings in ncgen.  Specifically, "ncgen -b" on
> the first file produces a netcdf file.  ncdump then produces the second
> file.  As you can see, the strings get run together.  I don't know
> anything about lex and wouldn't know how to go about fixing this.
> 
> Kate
> 
> netcdf rect4_error {
> dimensions:
>       len_string = 33 ;
>       num_dim = 2 ;
>       num_nod_var = 3 ;
> variables:
>       char coor_names(num_dim, len_string) ;
>       char name_nod_var(num_nod_var, len_string) ;
> data:
> 
>  coor_names =
>   "x",
>   "y" ;
> 
>  name_nod_var =
>   "TEMP",
>   "QXFLUX",
>   "QYFLUX" ;
> }
> 
> - -----------------------------------------------------------
> 
> netcdf rect4_error {
> dimensions:
>       len_string = 33 ;
>       num_dim = 2 ;
>       num_nod_var = 3 ;
> variables:
>       char coor_names(num_dim, len_string) ;
>       char name_nod_var(num_nod_var, len_string) ;
> data:
> 
>  coor_names =
>   "xy",
>   "" ;
> 
>  name_nod_var =
>   "TEMPQXFLUXQYFLUX",
>   "",
>   "" ;
> }

You're in luck!  A fix is already available and will be in the next
minor release also.  It's on the "Known Problems with the netCDF 3.3.1
Distribution" page, at:

   http://www.unidata.ucar.edu/packages/netcdf/known_problems.html#ncgen-char

and from there, you can click on a patch to ncgen files, at

   http://www.unidata.ucar.edu/packages/netcdf/patch-3.3.1-2

--Russ

_____________________________________________________________________

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu