Alan D. Snow
Alan D. Snow
BUG: Given nodata value, -999999.0, is beyond the valid range of its data type, float32. (OSX arm64)
> Is there anything I can do to help get it resolved? This is a community project, so you are welcome do debug and report any further information. If you...
Running this should help address linting issues: ``` python -m pip install pre-commit cd ./geocube pre-commit install pre-commit run -a ```
Thanks @Imanflow :+1:
It derives the name from the DataArray. You can set the name on the DataArray property. ```pyrhon da.name = "my_data" vectorize(da) ```
I think that this could be highlighted better. Thoughts about adding a warning if the DataArray name is None?
A warning and a default name sounds like a great way to go. What about `_data` for a default?
Actually, `engine="rasterio"` comes from rioxarray [ref](https://github.com/corteva/rioxarray/blob/21284f67db536d9c104aa872ab0bbc261259e59e/setup.cfg#L50). It calls `rioxarray.open_rasterio`.
If you do this: ```python rds = rioxarray.open_rasterio(os.path.join(input_path, fn_NSIDC_output), group="Geophysical_Data") ``` or this: ```python rds = xarray.open_dataset(os.path.join(input_path, fn_NSIDC_output), group="Geophysical_Data", engine="rasterio") ``` The data plots correctly with rasterio. EDIT: This does...
If you do this, the lat/lon data looks correct: ```python ds_NSIDC_root = xarray.open_dataset(data_path, variable=["cell_lon", "cell_lat"], engine='rasterio') ds_NSIDC_root.cell_lat.plot() ```
This appears to be a rasterio/GDAL issue: ```python import rasterio import netCDF4 import numpy with netCDF4.Dataset(data_path) as nfh: nc_data = nfh['Geophysical_Data']['precipitation_total_surface_flux'][:] with rasterio.open('netcdf:SMAP_L4_SM_gph_20150331T013000_Vv7032_001_HEGOUT.nc:/Geophysical_Data/precipitation_total_surface_flux') as rfh: rio_data = rfh.read(1, masked=True) ```...