You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To Reproduce
xcube, version 1.2.0 installed from conda-forge
Download file from CMEMS: ftp://my.cmems-du.eu/Core/OCEANCOLOUR_ATL_BGC_L3_MY_009_113/cmems_obs-oc_atl_bgc-optics_my_l3-multi-1km_P1D/1998/01/19980101_cmems_obs-oc_atl_bgc-optics_my_l3-multi-1km_P1D.nc
>xcube gen -c gen_cmems_009_113_optics.yml 19980101_cmems_obs-oc_atl_bgc-optics_my_l3-multi-1km_P1D.nc
C:\ProgramData\mambaforge\envs\xcube\Lib\site-packages\xcube\core\gen\gen.py:96: UserWarning: append_mode in gen_cube() is deprecated, time slices will now always be inserted, replaced, or appended.
warnings.warn('append_mode in gen_cube() is deprecated, '
Internal error: object of type 'numpy.int8' has no len()
Expected behavior
In this case, a zarr file should be created.
Additional context
The cause is the flag variables with the attributes
flag_meanings: LAND
flag_masks: 1
Adding a dummy attribute so that len(flags_meanings) or len(flags_masks)>1 solves the problem:
Thanks for reporting. For the time being, I'd like to point you to xcube's plugin for cmems: xcube-cmems. Maybe you will find it simpler to use. It will definitely take off you the hassle to download files to your local computer first.
Thanks for the pointer. I had looked at this plugin but didn't see in the example or documentation how to generate a regrided cube from a cmems data store. Could you please advise?
Describe the bug
xcube gen fails with an error when generating a datacube from netcdf file with a single flag. The default processor is being used.
This is the structure of the offending file:
To Reproduce
xcube, version 1.2.0 installed from conda-forge
ftp://my.cmems-du.eu/Core/OCEANCOLOUR_ATL_BGC_L3_MY_009_113/cmems_obs-oc_atl_bgc-optics_my_l3-multi-1km_P1D/1998/01/19980101_cmems_obs-oc_atl_bgc-optics_my_l3-multi-1km_P1D.nc
gen_cmems_009_113_optics.yml
:Expected behavior
In this case, a zarr file should be created.
Additional context
The cause is the flag variables with the attributes
Adding a dummy attribute so that len(flags_meanings) or len(flags_masks)>1 solves the problem:
The text was updated successfully, but these errors were encountered: