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

[netCDF #PJO-313024]: _FillValue when data already exists



My speculation is that this is an order of creation problem.
That is, you are creating and writing to the variable before
you attempt to set the _FillValue attribute.
You might try to rewrite your code to make sure that the
order of events is as follows:
1. create variable (but do not write to it)
2. add _FillValue attribute
3. write data to the variable.

> 
> I have been stuck for several days with an issue related to _FillValue, did 
> tons of online research but found no hint related to this issue : 
> NC_ELATEFILL Attempt to define fill value when data already exists.
> 
> Hence why I'm reaching your email support for some help.
> 
> 
> After creating a netcdfFile C++ object with these flags: NC_NOCLOBBER | 
> NC_NETCDF4 I proceed onto creating a netcdf variable the following way:
> 
> ncf["/time"](tester.timeData, "/Time")("_FillValue", NC_FILL_DOUBLE); //When 
> executing this code, I get the NC_ELATEFILL error
> 
> My question is: how can I use _FillValue as a reference storage value? By 
> this I mean: I would like my variable to be filled with external data values, 
> while also having the _FillValue atribute as a reference value just in case.
> 
> Hopefully you could give some guidance in this topic. I am looking forward to 
> hearing from you
>
=Dennis Heimbigner
  Unidata


Ticket Details
===================
Ticket ID: PJO-313024
Department: Support netCDF
Priority: Normal
Status: Open
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.