YAXArrays.jl icon indicating copy to clipboard operation
YAXArrays.jl copied to clipboard

Add missing_value keyword argument to Cube and open_dataset functions

Open felixcremer opened this issue 3 years ago • 1 comments

We should provide a keyword argument for the openning of a dataset to specify the missing value. Possible values for the missing_value could be NaN, :fill_value, some_value.

The open question is, what should be the default value of this keyword argument.

felixcremer avatar Oct 04 '22 07:10 felixcremer

@felixcremer maybe related but it looks like there was a breaking change in Zarr (fill_as_missing has been deprecated) that has leaked into YAXArray. This:

ds = YAXArrays.open_dataset("http://its-live-data.s3.amazonaws.com/datacubes/v02/S50W070/ITS_LIVE_vel_EPSG32718_G0120_X450000_Y4450000.zarr")

returns the error:

ERROR: MethodError: no method matching zopen(::Zarr.ConsolidatedStore{Zarr.HTTPStore}, ::String; fill_as_missing=true)
Closest candidates are:
  zopen(::Zarr.AbstractStore, ::Any; consolidated) at ~/.julia/packages/Zarr/2V5d9/src/ZGroup.jl:74 got unsupported keyword argument "fill_as_missing"
  zopen(::Zarr.AbstractStore) at ~/.julia/packages/Zarr/2V5d9/src/ZGroup.jl:74 got unsupported keyword argument "fill_as_missing"
  zopen(::String, ::Any; kwargs...) at ~/.julia/packages/Zarr/2V5d9/src/ZGroup.jl:90

alex-s-gardner avatar Oct 08 '22 04:10 alex-s-gardner