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

support for _FillValue? #5

Closed
bhelgs opened this issue May 17, 2022 · 7 comments
Closed

support for _FillValue? #5

bhelgs opened this issue May 17, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@bhelgs
Copy link

bhelgs commented May 17, 2022

I was just wondering if _FillValue is currently supported?
It seems that if a user attempts to specify the _FillValue attribute after calling the %write method the user will get the error NC_ELATEFILL(-122) caused by calling put before specifying the fill value.

@bhelgs
Copy link
Author

bhelgs commented May 17, 2022

P.S. @scivision, thank you for creating this library! It looks really nice and I've been interested in trying it out.

@bhelgs
Copy link
Author

bhelgs commented May 17, 2022

I was able to add an optional fill value argument to the writer method.

The adjustment is similar to what's found in the h5netcdf and h5py API's.
Those libraries seem to use fillvalue as a keyword argument to the create_variable/create_dataset.
https://github.com/h5netcdf/h5netcdf/blob/70c3de7578c872ec1ba8fe2949185bbe1a919317/h5netcdf/core.py#L714

@scivision scivision added the enhancement New feature or request label May 19, 2022
@scivision
Copy link
Member

Thanks for the idea. This initially looks straightforward to add to nc4fortran and h5fortran.

@scivision scivision pinned this issue May 19, 2022
@bhelgs
Copy link
Author

bhelgs commented May 24, 2022

yup, a straightforward add.
Thanks. sending you an email.

@scivision
Copy link
Member

scivision commented May 24, 2022

OK great. I just added a fill_value option to h5fortran %create(..., fill_value=) as well. I would guess it's easier for netcdf.

fill syntax example in h5fortran: https://github.com/geospace-code/h5fortran/blob/main/test/test_fill.f90

@scivision
Copy link
Member

scivision commented May 28, 2022

Fill value is working now in main branch via %create(..., fill_value=)

@bhelgs
Copy link
Author

bhelgs commented Jun 2, 2022

I saw you've done quite a bit lately.
Really nice, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants