Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing values not being read correctly afer being written #4

Closed
davidhassell opened this issue Jun 13, 2019 · 1 comment
Closed

Missing values not being read correctly afer being written #4

davidhassell opened this issue Jun 13, 2019 · 1 comment
Assignees
Labels
bug Something isn't working netCDF read Relating to reading netCDF datasets netCDF write Relating to writing netCDF datasets

Comments

@davidhassell
Copy link
Contributor

davidhassell commented Jun 13, 2019

>>> f.data.array
[[[-- -- -- -- -- -- -- -- --]
  [9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0]]]
>>> cfdm.write(f, 'file.nc')
>>> g = cfdm.read('file.nc')[0]
>>> g.data.array
[[[9.96920997e+36 9.96920997e+36 9.96920997e+36 9.96920997e+36
   9.96920997e+36 9.96920997e+36 9.96920997e+36 9.96920997e+36
   9.96920997e+36]
  [9.00000000e+00 1.00000000e+01 1.10000000e+01 1.20000000e+01
   1.30000000e+01 1.40000000e+01 1.50000000e+01 1.60000000e+01
   1.70000000e+01]]]

This only happens for netCDF4 formats. NetCDF3 formats are OK.

@davidhassell
Copy link
Contributor Author

Solution: don't set the fill mode for a netCDF4.Dataset open for writing to off. This will go in to version 1.7.7

@davidhassell davidhassell added the bug Something isn't working label Nov 11, 2019
@davidhassell davidhassell self-assigned this Jan 7, 2020
@davidhassell davidhassell added netCDF read Relating to reading netCDF datasets netCDF write Relating to writing netCDF datasets labels Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working netCDF read Relating to reading netCDF datasets netCDF write Relating to writing netCDF datasets
Projects
None yet
Development

No branches or pull requests

1 participant