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.

Problem setting fill value.

NOTE: The netcdf-hdf mailing list is no longer active. The list archives are made available for historical reasons.

G'Day

When I try setting the fill value for a variable of type DFNT_CHAR I 
seem to get only the first character of the string I am using. For example:

        dimSize[0] = SD_UNLIMITED;
        dimSize[1] = 17;
        sdsID = SDcreate(hdfFile, "Universal Time", DFNT_CHAR,
                                   2,               dimSize);

        fillval = (char *) malloc(sizeof("thisisafillvalue."));
        fillval = "thisisafillvalue.";
        SDsetfillvalue(sdsID, (VOIDP) fillval));

When I run ncdump on the resulting file I get:

        Universal Time:_FillValue = "t" ;

The actual values stored in the variable are fine. Am I doing something 
wrong or is this a bug ? I have a short program which illustrates this
effect. I can send a tar or sharfile of it on request.

        regards
                Ata <(|)>.

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