Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: [netcdfgroup] netcdf4 -problems

Henry Butowsky <henryb@xxxxxxxxxxxx> writes:

> Hi all,
> Not sure if this a bug or a feature in netcdf4 (hdf5 files)
>     After my script has written variables to output I then add  the 
> attributes:
>    
>     With the following code executed in define mode
>     
> (void)nco_put_att(out_id,var_id,"_FillValue",var_ref->type,1,var_ref->mss_val.vp);
>            
>
>      I get the the error message:
>
>      nco_err_exit(): ERROR Error code is -122. Translation into English with 
> nc_strerror(-122) is "Attempt to define fill   value when data already 
> exists."
>
>     Regards Henry
>

This is a new feature! ;-)

Fill values must be defined before any data are written to a
variable. They cannot be changed after some data have been written.

This makes sense but is not the case with classic netcdf. You can go
around changing fill values to your heart's content!

But not with netCDF-4 files...

Ed
-- 
Ed Hartnett  -- ed@xxxxxxxxxxxxxxxx


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690