Closed sum1lim closed 4 years ago
Fixes pacificclimate/thunderbird#17
I downloaded the test input file and ran update_metadata
on it, but did not see the same effect.
Question about this: NA
isn't actually a possible value in a NetCDF variable. Values are only represented as NA
, based on the value of the _FillValue
attribute. So, by definition, changing the metadata of variable attributes could change whether values appear to be NA
or not.
Unfortunately, you haven't provided enough information here to be able to determine whether that is what's happening. Could you also provide the full attributes of the gdd
variable from ncdump -h
both before and after the process?
As @corviday mentioned, it looks like the effect is not happening on my workstation as well, so I think this issue can be closed. Maybe there was a confusion working across multiple projects. However, the issue addressed in the PR still remains. @jameshiebert, I would still like to discuss it in the PR.
_FillValues are represented as NA in the output NetCDF file while they are represented as -32768 in this test input file. For example,
ncdump gdd_annual_CanESM2_rcp85_r1i1p1_1951-2100.nc
beforeupdate_meatadata
:ncdump gdd_annual_CanESM2_rcp85_r1i1p1_1951-2100.nc
afterupdate_meatadata
:I am not sure if these changes in _FillValues will cause any problem in further processes since they are meaningless values, but it would be nice to point out if they are actually OK to remain as NA values. I believe the outcome is caused by
NetCDF4
Dataset
operations that are wrapped bynchelpers
CFDataset