NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
REZA@xxxxxxxxxxxxxxx writes > Date: Wed, 18 Sep 1991 15:01:28 -0400 (EDT) > From: REZA@xxxxxxxxxxxxxxx > Subject: Fill problem > To: netcdfgroup@xxxxxxxxxxxxxxxx > > > I just installed Ver 1.11 of netCDF, and have a problem with > setting fill values for short integers. It fills only every other value with > my fill value (0) and the rest with the default fill value (-32767). Does > anybody know what is the problem? > > Here is the NCDUMP output: > > netcdf fcoads { > dimensions: > lat = 2 ; > lon = 1 ; > time = 2 ; > stat = 8 ; > > variables: > short A(time, lat, lon, stat) ; > A:units = "Celsius" ; > A:long_name = "air temperature" ; > A:_FillValue = 0s ; > A:missing_value = 0s ; > > data: > > A > -32767, 0, -32767, 0, -32767, 0, -32767, 0, > -32767, 0, -32767, 0, -32767, 0, -32767, 0, > -32767, 0, -32767, 0, -32767, 0, -32767, 0, > -32767, 0, -32767, 0, -32767, 0, -32767, 0 ; > > > } > > Thanks, Reza > REZA@xxxxxxxxxxxxxxx This is a bug. At the end of this message find a fix, in form of diff suitable for use by 'patch'. Enjoy. -glenn 5c5 < /* $Id: cdf.c,v 1.38 1991/03/07 10:58:10 davis Exp $ */ --- > /* $Id: cdf.c,v 1.40 1991/09/18 20:21:34 davis Exp $ */ 25c25,26 < fclose(handle->stream) ; --- > if( handle->stream ) > fclose(handle->stream) ; 317c318 < u_char fillp[2*sizeof(double)] ; --- > char fillp[2*sizeof(double)] ; 343c344,352 < NC_copy_arrayvals((char *)fillp, (*attr)->data) ; --- > { > int len = NC_typelen(vp->type) ; > char *cp = fillp ; > while(cp < &fillp[sizeof(fillp) -1]) > { > NC_copy_arrayvals(cp, (*attr)->data) ; > cp += len ; > } > }
netcdfgroup
archives: