- Bundled xcube Viewer 1.7.2
that comes with, e.g., several bug fixes including issues with the time series legend,
the zoom information box, persisted states, and the progress bar, as well as updated
dependencies such as
chartlets ^0.2.0.
- Adapted to xarray version 2026.04.0 (#1211)
- Expanded support for keyword arguments of
rioxarray.open_rasteriowhen opening raster files viaxcube.core.store.DataStore.open_data(). (#1192)rioxarray.open_rasteriois now called withchunks="auto"by default inxcube.core.store.fs.impl.rasteriowhen reading GeoTIFF and JPEG2000 files. This enables more efficient, storage-aware chunking without requiring users to rechunk data manually.- Added the optional argument
band_as_variable. When set toTrue(default), the original dataset structure returned byrioxarrayis preserved instead of splitting raster bands into separate data variables. This improves data access patterns and avoids unnecessary transformations.
- Avoid authentication error due to missing cryptography package (#1191)
-
Require dask >=2024.8 (#1196)
-
For Read the Docs, use Ubuntu 24.04 and Python mambaforge-23.11 (#1205)
- Bundled xcube Viewer 1.7.1 that comes with, e.g., a progress bar for tile loading, a zoom information box, an About window, a ‘copy screenshot to clipboard’ feature and a new styling of the map buttons.
- Fixed duplicate rendering of the
preload_datatable in the data store framework. The table now updates in place instead of clearing the entire Jupyter cell output.
- Added function
get_filename_extensions()to data store framework:from xcube.core.store import get_filename_extensions. It allows for retrieving mappings of recognized filename extensions to respective data openers and writers. (#726) - The file data stores (e.g.,
store = new_data_store("file")) now support reading JPEG2000 files as datasets or multi-level datasets from file systems. Openers and writers are available asdataset:jpeg2000:<protocol>ormldataset:jpeg2000:<protocol>, where protocol is the respective file system. These openers and writers are available to any file system data store, e.g.,"file","s3". - Enhanced
ExecutorPreloadHandleto propagatepreload_paramsto thepreload_datamethod, and renamed thePreloadStatusargumentstoppedtocompleted. (#1184) - Delegation of the visualization of the preload handle changed: If code runs as
script, the class
PreloadDisplayis used which visualizes the progress of the preload as a plain text; if the code is run in a Jupyter notebook cell, the classIPyPreloadDisplayand the progress of the preload is shown as a HTML table. (#1184) xcube servenow provides new metadata details of a multilevel dataset:- The spatial unit of the dataset is now given by property
spatialUnits - The resolutions are now given by property
resolutionsand provide the average x,y resolutions for each level of the dataset given in the spatial units of the dataset's CRS.
- The spatial unit of the dataset is now given by property
- Added two new versions of the xcube logo, one for dark and one for light themes, and replaced the logo in the documentation with the light logo.
- Fix STAC item asset endpoint_url (was incorrectly set to http://localhost:8080/s3; now correctly parsed from the base URL). (#1178)
- Disabled
compactmode for JupyterLab Viewer integration. (#1173)
-
Improved the demos for the xcube Viewer server-side extensions in various ways (#1134):
- enhanced user input validation
- added error message label
- fixed bugs in code
- improved UI styles and general UX
-
Added the following data stores to
Access Datapage in documentation:https,ftp,reference,smos,stac,stac-cdse,stac-xcube,gedidb,eopf-zarr,esa-cci-kc. -
Added link of xcube viewer documentation to
Viewer Apppage in documentation. -
Bundled xcube Viewer 1.6.1
This release is fully dedicated to a more efficient and robust approach for dataset reprojection:
-
New method: Added
xcube.core.resampling.reproject_dataset, a high-performance alternative toxcube.core.resampling.resample_in_spacefor reprojecting datasets to different coordinate reference systems (CRS). -
Recommended usage: Ideal for reprojection between regular grids. It improves computational efficiency and simplifies the reprojection process. It is not addressing rectification from irregular to regular grids (e.g., Sentinel-3).
-
Validation: The notebook
examples/notebook/resampling/reproject_esa_cci_landcover_new_method.ipynbshows thatreproject_datasetandresample_in_spaceproduce nearly identical results when reprojecting to a different CRS, with only negligible differences. -
Backward compatibility:
resample_in_spaceremains available to preserve compatibility with existing services. Oncereproject_datasetproves stable in production use, it may be integrated intoresample_in_space. -
Technical context:
resample_in_spacecurrently uses either affine transforms or the Spatial Rectification Algorithm, which is specialized for non-regular 2D grids (e.g., Sentinel-3). While applicable to regular grid reprojection, the algorithm is unnecessarily complex for such cases.
- Bundled xcube Viewer 1.6.0 that comes with enhanced layer management.
-
Make test suite compatible with click >=8.2.0 (#1155)
-
Pinned
tornado >=6.0,<6.5due to an incompatibility with current xcube server implementation.
-
Bundled xcube Viewer 1.5.1 with many fixes.
-
Introduced a server-side configuration attribute
EntrypointDatasetIdto specify the initial dataset that should be displayed in the viewer application upon loading. (#1135) -
Added support for
SortValuein the server configuration to define dataset sorting within groups displayed in the viewer app's dataset selection dropdown. (#1135) -
Added a new server-side configuration attribute
DatasetGroupsto allow users to define the display order of dataset groups in the viewer application. See: xcube-dev/xcube-viewer#521 -
Introduced support for a
Descriptionfield underDatasetGroups, shown as a tooltip when hovering over group titles in the viewer. See: xcube-dev/xcube-viewer#521
- Improved the filesystem data stores (
"file","s3", ...):- Added parameter
engineand its schema. It names an xarray backend to be used instead of the automatically detected one. - Added schema for the existing
replaceparameter. - Updated schema for the
num_levelsparameter which now explains the parameter in more detail.
- Added parameter
-
Bundled xcube Viewer 1.5.0 with an updated UI/UX regarding side panel management including server-side panel extensions.
-
Added a new server-side panel extension to the
examples/serve/panels-demofor demonstration. It shows spectrum plots for a selected map point.
-
Extension panels for xcube Viewer of type
xcube.webapi.viewer.contrib.panel.Panelnow have two more properties:icon: name of a Material Design Icon to be used for the icon button that represents the panel in the viewer's sidebar.position: to set the position of the respective icon button in the viewer's sidebar.
-
Added a new abstract class
PreloadedDataStorethat defines the return type of thepreload_datamethod inxcube.core.store.DataStore. ThePreloadedDataStoreis a data store containing apreload_handlefield, which holds the handle associated with a preload job. -
Renamed xrlint config file from
xrlint_config.yamltoxrlint-config.yaml.
-
xcube Server now can be configured to provide abstracts/descriptions for datasets so they can be rendered as markdown in xcube Viewer (xcube-dev/xcube-viewer#454). (#1122)
- New
descriptionproperties have been added to responses from xcube Server for datasets and variables. - User can now provide abstracts or descriptions using markdown format for dataset
configurations in xcube Server. A new configuration setting
Descriptionnow accompanies settings such asTitle. - Default values for the
Descriptionsetting are derived from metadata of datasets and variable CF attributes.
- New
-
Improved axis labeling in 2D histogram visualization in the Panel demo.
-
Added support for the xcube Viewer's
Markdowncomponent so it can be used in server-side viewer extensions. See new packagexcube.webapi.viewer.componentsexporting classMarkdownwhich has a singletextproperty that takes the markdown text. -
Bundled xcube Viewer 1.4.2.
- Reformatted code base according to the default settings used by isort and ruff. Updated development dependencies accordingly.
- Updated copyright notices.
- Ensured xcube can be installed and tested in Python 3.13 environments.
- Added a configuration file
xrlint_config.yamlfor the xrlint tool to the project repository.
-
Bundled xcube Viewer 1.4.1 with fixes regarding the share feature.
-
No longer logging a
TypeErrorif xcube server'sGET viewer/ext/contributionsis called without any viewer extensions configured. (#1116)
- Bug fix in
resample_in_space: Resolved an issue where theresample_in_spacefunction no longer worked with irregular grid mappings, such as Sentinel-3 data,
due to changes introduced in version 1.8.0. (#1114)
- Added demo panel
Spectral Viewthat creates a plot with the reflectances for one selected Place (Point) at a selected time for variables that represent wavelengths.
-
The method
xcube.core.GridMapping.transformnow supports lazy execution. If computations based on actual data are required—such as determining whether the grid mapping is regular or estimating the resolution in the x or y direction—only a single chunk is accessed whenever possible, ensuring faster performance. -
The function
xcube.core.resampling.rectify_datasetnow supportsxarray.Datasetscontaining multi-dimensional data variables structured asvar(..., y_dim, x_dim). The two spatial dimensions (y_dimandx_dim) must occupy the last two positions in the variable's dimensions. -
Added a new preload API to xcube data stores:
- Enhanced the
xcube.core.store.DataStoreclass to optionally support preloading of datasets via an API represented by the
newxcube.core.store.DataPreloaderinterface. - Added handy default implementations
NullPreloadHandleandExecutorPreloadHandleto be returned by implementations of theprepare_data()method of a given data store.
- Enhanced the
-
A
xy_reskeyword argument was added to thetransform()method ofxcube.core.gridmapping.GridMapping, enabling users to set the grid-mapping resolution directly, which speeds up the method by avoiding time-consuming spatial resolution estimation. (#1082) -
The behaviour of the function
xcube.core.resample.resample_in_space()has been changed if notile_sizeis specified for the target grid mapping. It now defaults to thetile_sizeof the source grid mapping, improving the user-friendliness of resampling and reprojection. (#1082) -
The
"https"data store (store = new_data_store("https", ...)) now allows for lazily accessing NetCDF files. Implementation note: For this to work, theDatasetNetcdfFsDataAccessorclass has been adjusted. (#1083) -
Added new endpoint
/viewer/stateto xcube Server that allows for xcube Viewer state persistence. (#1088)The new viewer API operations are:
GET /viewer/stateto get a keys of stored states or restore a specific state;PUT /viewer/stateto store a state and receive a key for it.
Persistence is configured using new optional
Viewer/Persistencesetting:Viewer: Persistence: # Any filesystem. Can also be relative to base_dir. Path: memory://states # Filesystem-specific storage options # StorageOptions: ...
-
The
get_data_ids()method inDataStorehas an enhancedinclude_attrsparameter. Previously accepting onlyContainer[str], it now also supports aboolvalue. Settinginclude_attrstoTrueretrieves all attributes of the data_ids. -
Updated dependency
urllib3to be>=2.0.
- The function
xcube.core.resample.resample_in_space()now supports the parametersource_ds_subset=Truewhen callingrectify_dataset. This feature enables performing the reprojection exclusively on the spatially congruent subset of the dataset. - The function
xcube.core.resample.resample_in_space()now always operates lazily and therefore supports chunk-wise, parallel processing. (#1082) - Bug fix in the
has_datamethod of the"https"data store (store = new_data_store("https", ...)). (#1084) - Bug fix in the
has_datamethod of all filesystem-based data store ("file", "s3", "https").data_typecan be any of the supported data types, e.g. for.tiffile,data_typecan be eitherdatasetormldataset. (#1084) - The explanation of the parameter
xy_scalein the methodxcube.core.gridmapping.GridMapping.scalehas been corrected. (#1086) - The spurious tileserver/viewer warning "no explicit representation of timezones available…" (formerly "parsing timezone aware datetimes is deprecated…") is no longer generated. (#807)
-
Added experimental feature that allows for extending the xcube Viewer user interface with server-side panels. For this to work, users can now configure xcube Server to load one or more Python modules that provide
xcube.webapi.viewer.contrib.PanelUI-contributions. Panel instances provide two decoratorslayout()andcallback()which are used to implement the UI and the interaction behaviour, respectively. The functionality is provided by the Chartlets Python library. A working example can be found inexamples/serve/panels-demo. -
The xcube test helper module
test.s3testhas been enhanced to support testing the experimental server-side panels described above:- added new decorator
@s3_test()for individual tests withtimeoutarg; - added new context manager
s3_test_server()withtimeoutarg to be used within tests function bodies; S3Test,@s3_test(), ands3_test_server()now restore environment variables modified for the Moto S3 test server.
- added new decorator
- Level creation now supports aggregation method
modeto aggregate to the value which is most frequent. (#913)
- The
timequery parameter of the/statisticsendpoint of xcube server has now been made optional. (#1066) - The
/statisticsendpoint now supports datasets using non-WGS84 grid systems, expanding its compatibility with a wider range of geospatial datasets. (#1069) - Bug fix in
resampling_in_spacewhen projecting from geographic to non-geographic projection. (#1073) - Bug fix of the
extentfield in the single item collection published by the xcube server STAC API so that it follows the collection STAC specifications. (#1077)
-
Bundled xcube-viewer 1.3.0.
-
xcube server can now deal with "user-defined" variables. Endpoints that accept a
{varName}path parameter in their URL path can now be called with assignment expressions of the form<var_name>=<var_expr>where<var_name>is the name user defined variable and<var_expr>is an arbitrary band-math expression, see xcube-dev/xcube-viewer#371. -
xcube server now allows for configuring new dataset properties
GroupTitleandTags. This feature has been added in order to support grouping and filtering of datasets in UIs, see xcube-dev/xcube-viewer#385. -
Added server endpoint
GET /statistics/{varName}with query parameterslon,lat,timewhich is used to extract single point data. This feature has been added in order to support xcube-dev/xcube-viewer#404. -
The xcube server STAC API now publishes all fields available via the
/datasetsendpoint. This includes colormap information for each asset such as colorBarName, colorBarNorm, colorBarMin, colorBarMax, tileLevelMin, tileLevelMax. (#935, #940) -
xcube server now allows for configuring custom color maps via the configuration file. It supports continuous, stepwise and categorical colormaps, which may be configured as shown in the section CustomColorMaps of the xcube serve documentation (#1055)
- Migrated the
.github/workflows/xcube_build_docker.yamland the correspondingDockerfilefromsetup.pytopyproject.toml. Additionally, updated the relevant documentation indoc/sourceto reflect this change fromsetup.pytopyproject.toml.(related to #992) - Normalisation with
xcube.core.normalize.normalize_datasetfails when chunk encoding must be updated (#1033) - The
open_datamethod of xcube's defaultxcube.core.store.DataStoreimplementations now supports a keyword argumentdata_type, which determines the data type of the return value. Note thatopener_idincludes thedata_typeat its first position and will override thedata_typeargument. To preserve backward compatibility, the keyword argumentdata_typehas not yet been literally specified asopen_data()method argument, but may be passed as part of**open_params. (#1030) - The
xcube.core.store.DataDescriptorclass now supports specifying time ranges using bothdatetime.dateanddatetime.datetimeobjects. Previously, onlydatetime.dateobjects were supported. - The xcube server STAC API has been adjusted so that the data store
parameters and data ID, which are needed to open the data referred to by a STAC item,
are now included with the item's
analyticasset. Furthermore, a second assert calledanalytic_multireswill be published referring to the multi-resolution data format levels (#1020). - Improved the way color mapping works in xcube server to support simplified color bar management in xcube viewer, see xcube-dev/xcube-viewer#390. (#1043)
- The xcube server's dataset configuration extraction methodology has been updated. When the data resource ID is provided in the Path field, xcube will attempt to access the dataset using the given ID. If wildcard patterns are used, the server will crawl through the data store to find matching data IDs. This process may result in a long setup time if the data store contains numerous data IDs. A UserWarning will be issued for the "stac" data store.
- Corrected extent object of a STAC collection issued by xcube server, following the collection STAC specifications (#1053)
- When opening a GeoTIFF file using a file system data store, the default return value
is changed from
MultiLevelDatasettoxr.Dataset, if nodata_typeis assigned in theopen_paramsof thestore.open_data()method. (#1054) xcube server has been adapted to always openMultiLevelDatasets from a specified data store, if that data type is supported. - Adjustments to
resample_in_time()inxcube/core/resampling/temporal.pyso that xcube now supportsxarray=2024.7.
- Renamed internal color mapping types from
"node","bound","key"into"continuous","stepwise","categorical".
-
Added new statistics API to xcube server. The service computes basic statistical values and a histogram for given data variable, time stamp, and a GeoJSON geometry. Its endpoint is:
/statistics/{datasetId}/{varName}?time={time}. Geometry is passed as request body in form of a GeoJSON geometry object. -
xcube server's tile API can now handle user-defined colormaps from xcube viewer. Custom color bars are still passed using query parameter
cmapto endpoint/tiles/{datasetId}/{varName}/{z}/{y}/{x}, but in the case of custom color bars it is a JSON-encoded object with the following format:{"name": <str>, "type": <str>, "colors": <list>}. (#975) The object properties arename: a unique name.type: optional type of control values.colors: a list of pairs[[<v1>,<c1>], [<v2>,<c2>], [<v3>,<c3>], ...]that map a control value to a hexadecimal color value using CSS format"#RRGGBBAA".
The
typevalues are"node": control points are nodes of a continuous color gradient."bound": control points form bounds that map to a color, which means the last color is unused."key": control points are keys (integers) that identify a color.
-
xcube server's tile API now allows specifying the data normalisation step before a color mapping is applied to the variable data to be visualized. This affects endpoint
/tiles/{datasetId}/{varName}/{z}/{y}/{x}and the WMTS API. The possible normalisation values arelin: linear mapping of data values betweenvminandvmaxto range 0 to 1 (usesmatplotlib.colors.Normalize(vmin, vmax)).log: logarithmic mapping of data values betweenvminandvmaxto range 0 to 1 (usesmatplotlib.colors.LogNorm(vmin, vmax)).cat: categorical mapping of data values to indices into the color mapping. (usesmatplotlib.colors.BoundaryNorm(categories)). This normalisation currently only works with user-defined colormaps of typekeyorbound(see above).
The normalisation can be specified in three different ways (in order):
- As query parameter
normpassed to the tile endpoint. - Property
Normin theStyles/ColorMappingelement in xcube server configuration. - Data variable attribute
color_norm.
-
xcube server can now read SNAP color palette definition files (
*.cpd) with alpha values. (#932) -
The class
xcube.webapi.viewer.Viewernow accepts root paths or URLs that will each be scanned for datasets. The roots are passed as keyword argumentrootswhose value is a path or URL or an iterable of paths or URLs. A new keyword argumentmax_depthdefines the maximum subdirectory depths used to search for datasets in caserootsis given. It defaults to1. -
The behaviour of function
resample_in_space()of modulexcube.core.resamplingchanged in this version. (#1001)- A new keyword argument
ref_dscan now be used to provide a reference dataset for the reprojection. It can be passed instead oftarget_rm. Ifref_dsis given, it also forces the returned target dataset to have the same spatial coordinates asref_ds. - In the case of up-sampling, we no longer recover
NaNvalues by default as it may require considerable CPU overhead. To enforce the old behaviour, provide thevar_configskeyword-argument and setrecover_nantoTruefor desired variables.
- A new keyword argument
-
The class
MaskSet()of modulexcube.core.masksetnow correctly recognises the variable attributesflag_values,flag_masks,flag_meaningswhen their values are lists (ESA CCI LC data encodes them as JSON arrays). (#1002) -
The class
MaskSet()now provides a methodget_cmap()which creates a suitable matplotlib color map for variables that define theflag_valuesCF-attribute and optionally aflag_colorsattribute. (#1011) -
The
Api.routedecorator andApiRouteconstructor inxcube.server.apinow have aslashargument which lets a route support an optional trailing slash.
-
When using the
xcube.webapi.viewer.Viewerclass in Jupyter notebooks multi-level datasets opened from S3 or from deeper subdirectories into the local filesystem are now fully supported. (#1007) -
Fixed an issue with xcube server
/timeseriesendpoint that returned status 500 if a given dataset used a CRS other geographic and the geometry was not a point. (#995) -
Fixed broken table of contents links in dataset convention document.
-
Web API endpoints with an optional trailing slash are no longer listed twice in the automatically generated OpenAPI documentation (#965)
-
Several minor updates to make xcube compatible with NumPy 2.0.0 (#1024)
-
The
get_cmap()method ofutil.cmaps.ColormapProvidernow returns aTuple[matplotlib.colors.Colormap, Colormap]instead ofTuple[str, matplotlib.colors.Colormap]. -
The signatures of functions
resample_in_space(),rectify_dataset(), andaffine_transform_dataset()of modulexcube.core.resamplingchanged:- Source dataset must be provided as 1st positional argument.
- Introduced keyword argument
ref_dsthat can be provided instead oftarget_gm. If given, it forces the returned dataset to have the same coordinates asref_ds.
-
Removed API deprecated since many releases:
- Removed keyword argument
basefrom functionxcube.core.resampling.temporal.resample_in_time(). - Removed option
basefrom CLI commandxcube resample. - Removed keyword argument
assert_cubefromxcube.core.timeseries.get_time_series(). - Removed property
xcube.core.xarray.DatasetAccessor.levels. - Removed function
xcube.core.tile.parse_non_spatial_labels(). - Removed keyword argument
tagfrom context managerxcube.util.perf.measure_time(). - Removed function
xcube.core.geom.convert_geometry(). - Removed function
xcube.core.geom.is_dataset_y_axis_inverted(). - Removed function
xcube.util.assertions.assert_condition(). - Removed function
xcube.util.cmaps.get_cmaps(). - Removed function
xcube.util.cmaps.get_cmap(). - Removed function
xcube.util.cmaps.ensure_cmaps_loaded(). - Removed endpoint
/datasets/{datasetId}/vars/{varName}/tiles2/{z}/{y}/{x}from xcube server.
- Removed keyword argument
-
Make tests compatible with PyTest 8.2.0. (#973)
-
Addressed all warnings from xarray indicating that
Dataset.dimswill be replaced byDataset.sizes. (#981) -
NUMBA_DISABLE_JIT set to
0to enablenumba.jitin github workflow. (#946) -
Added GitHub workflow to perform an automatic xcube release on PyPI after a GitHub release. To install xcube via the
piptool usepip install xcube-core,
since the name "xcube" is already taken on PyPI by another software. (#982) -
Added project URLs and classifiers to
setup.py, which will be shown in the left sidebar on the PyPI xcube-core webpage. -
Refactored xcube workflow to build docker images only on release and deleted the update xcube tag job.
-
Used
pyupgradeto automatically upgrade language syntax for Python versions >= 3.9. -
Migrated the xcube project setup from
setup.pyto the modernpyproject.tomlformat. -
The functions
mask_dataset_by_geometry()andclip_dataset_by_geometry()of modulexcube.core.geomhave a new keyword argumentupdate_attrs: bool = Trueas part of the fix for #995. -
Decreased number of warnings in the xcube workflow step unittest-xcube.
-
Added new data store
"https"that uses fsspec.implementations.http.HTTPFileSystem), so that the upcoming xcube STAC data store will be able to access files from URLs. -
The workflow
.github/workflows/xcube_publish_pypi.ymlchanges the line in thepyproject.toml, where the package name is defined toname = "xcube-core". This allows to release xcube under the package name "xcube-core" on PyPI where the name "xcube" is already taken. #1010 -
Updated the 'How do I ...' page in the xcube documentation.
-
Embedded xcube-viewer 1.1.1.
-
Fixed xcube plugin auto-recognition in case a plugin project uses
pyproject.tomlfile. (#963) -
Updated copyright notices in all source code files.
-
Enhanced spatial resampling in module
xcube.core.resampling(#955):- Added optional keyword argument
interpolationto functionrectify_dataset()with values"nearest","triangular", and"bilinear"where"triangular"interpolates between 3 and"bilinear"between 4 adjacent source pixels. - Function
rectify_dataset()is now ~2 times faster by early detection of already transformed target pixels. - Added a documentation page that explains the algorithm used in
rectify_dataset(). - Added optional keyword argument
rectify_kwargstoresample_in_space(). If given, it is spread into keyword arguments passed to the internalrectify_dataset()delegation, if any. - Deprecated unused keyword argument
xy_var_namesof functionrectify_dataset().
- Added optional keyword argument
-
Replace use of deprecated method in testing module. (#961)
-
Update dependencies to better match imports; remove the defaults channel; turn adlfs into a soft dependency. (#945)
-
Reformatted xcube code base using black default settings. It implies a line length of 88 characters and double quotes for string literals. Also added
.editorconfigfor IDEs not recognising black's defaults. -
Renamed xcube's main branch from
mastertomainon GitHub. -
xcube's code base changed its docstring format from reST style to the much better readable Google style. Existing docstrings have been converted using the awesome docconvert tool.
-
Add a
data_vars_onlyparameter tochunk_datasetandupdate_dataset_chunk_encoding(#958). -
Update some unit tests to make them compatible with xarray 2024.3.0 (#958).
-
Added documentation page "How do I ..." that points users to applicable xcube Python API.
- Data stores can now return data iterators from their
open_data()method. For example, a data store implementation can now return a data cube either with a time dimension of size 100, or could be asked to return 100 cube time slices with dimension size 1 in form of an iterator. This feature has been added to effectively support the new zappend tool. (#919)
- Fix two OGC Collections unit tests that were failing under Windows. (#937)
-
Minor updates to make xcube compatible with pandas 2 and Python 3.12. (#933)
-
Minor updates to make xcube compatible with xarray >=2023.9.0. (#897, #939)
-
Added new
referencefilesystem data store to support "kerchunked" NetCDF files in object storage. (#928)See also
-
Improved xcube Server's STAC API:
- Provide links for multiple coverages data formats
- Add
crsandcrs_storageproperties to STAC data - Add spatial and temporal grid data to collection descriptions
- Add a schema endpoint returning a JSON schema of a dataset's data variables
- Add links to domain set, range type, and range schema to collection descriptions
-
Improved xcube Server's Coverages API:
- Support scaling parameters
scale-factor,scale-axes, andscale-size - Improve handling of bbox parameters
- Handle half-open datetime intervals
- More robust and standard-compliant parameter parsing and checking
- More informative responses for incorrect or unsupported parameters
- Omit unnecessary dimensions in TIFF and PNG coverages
- Use crs_wkt when determining CRS, if present and needed
- Change default subsetting and bbox CRS from EPSG:4326 to OGC:CRS84
- Implement reprojection for bbox
- Ensure datetime parameters match dataset’s timezone awareness
- Reimplement subsetting (better standards conformance, cleaner code)
- Set Content-Bbox and Content-Crs headers in the HTTP response
- Support safe CURIE syntax for CRS specification
- Support scaling parameters
- Fixed
KeyError: 'lon_bnds'raised occasionally when opening (mostly NetCDF) datasets. (#930) - Make S3 unit tests compatible with moto 5 server. (#922)
- Make some CLI unit tests compatible with pytest 8. (#922)
- Rename some test classes to avoid spurious warnings. (#924)
- Require Python >=3.9 (previously >=3.8)
- Updated Dockerfile and GitHub workflows; no changes to the xcube codebase itself
- Added a basic implementation of the draft version of OGC API - Coverages. (#879, #889, #900)
- Adapted the STAC implementation to additionally offer datasets as individual collections for better integration with OGC API - Coverages. (#889)
- Various minor improvements to STAC implementation. (#900)
- Resolved the issue for CRS84 error due to latest version of gdal (#869)
- Fixed incorrect additional variable data in STAC datacube properties. (#889)
- Fixed access of geotiff datasets from public s3 buckets (#893)
update_dataset_attrscan now also handle datasets with CRS other than WGS84 and update the metadata according to the ESIP Attribute Convention for Data Discovery.- removed deprecated module xcube edit, which has been deprecated since version 0.13.0
- Update "Development process" section of developer guide.
- Updated GitHub workflow to build docker image for GitHub releases only and not on each commit to main.
-
Added a new, experimental
/computeAPI to xcube server. It comprises the following endpoints:GET compute/operations- List available operations.GET compute/operations/{opId}- Get details of a given operation.PUT compute/jobs- Start a new job that executes an operation.GET compute/jobs- Get all jobs.GET compute/jobs/{jobId}- Get details of a given job.DELETE compute/jobs/{jobId}- Cancel a given job.
The available operations are currently taken from module
xcube.webapi.compute.operations.To disable the new API use the following server configuration:
api_spec: excludes: ["compute"] ...
- Added
shutdown_on_close=Trueparameter to coiled params to ensure that the clusters are shut down on close. (#881) - Introduced new parameter
regionfor utility functionnew_clusterinxcube.util.daskwhich will ensure coiled creates the dask cluster in the prefered default region: eu-central-1. (#882) - Server offers the function
add_place_groupinplaces/context.py, which allows plugins to add place groups from external sources.
- Fixed Windows-only bug in
xcube serve --config <path>: If configpathis provided with back-slashes, a missingbase_dirconfig parameter is now correctly set to the parent directory ofpath. Before, the current working directory was used.
- Updated AppVeyor and GitHub workflow configurations to use micromamba rather than mamba (#785)
- Fixed issue where geotiff access from a protected s3 bucket was denied (#863)
- Bundled new build of xcube-viewer 1.1.0.1 that will correctly respect a given xcube server from loaded from the viewer configuration.
-
Bundled xcube-viewer 1.1.0.
-
Updated installation instructions (#859)
-
Included support for FTP filesystem by adding a new data store
ftp.These changes will enable access to data cubes (
.zarror.levels) in FTP storage as shown here:store = new_data_store( "ftp", # FTP filesystem protocol root="path/to/files", # Path on FTP server storage_options= {'host': 'ftp.xxx', # The url to the ftp server 'port': 21 # Port, defaults to 21 # Optionally, use # 'username': 'xxx' # 'password': 'xxx'} ) store.list_data_ids()
Note that there is no anon parameter, as the store will assume no anonymity if no username and password are set.
Same configuration for xcube Server:
DataStores: - Identifier: siec StoreId: ftp StoreParams: root: my_path_on_the_host max_depth: 1 storage_options: host: "ftp.xxx" port: xxx username: "xxx" password': "xxx"
-
Updated xcube Dataset Specification. (addressing #844)
-
Added xcube Data Access documentation.
-
Fixed various issues with the auto-generated Python API documentation.
-
Fixed a problem where time series requests may have missed outer values of a requested time range. (#860)
- Introduced query parameter
tolerancefor endpoint/timeseries/{datasetId}/{varName}which is the number of seconds by which the given time range is expanded. Its default value is one second to overcome rounding problems with microsecond fractions. (#860) - We now round the time dimension labels for a dataset as
follows (rounding frequency is 1 second by default):
- First times stamp:
floor(time[0]) - Last times stamp:
ceil(time[-1]) - In-between time stamps:
round(time[1: -1])
- First times stamp:
- Introduced query parameter
- Pinned
gdaldependency to>=3.0, <3.6.3due to incompatibilities.
-
When running xcube in a JupyterLab, the class
xcube.webapi.viewer.Viewercan be used to programmatically launch a xcube Viewer UI. The class now recognizes an environment variableXCUBE_JUPYTER_LAB_URLthat contains a JupyterLab's public base URL for a given user. To work properly, the jupyter-server-proxy extension must be installed and enabled. -
Bundled xcube-viewer 1.0.2.1.
-
Setting a dataset's
BoundingBoxin the server configuration is now recognised when requesting the dataset details. (#845) -
It is now possible to enforce the order of variables reported by xcube server. The new server configuration key
Variablescan be added toDatasetsconfigurations. Is a list of wildcard patterns that determines the order of variables and the subset of variables to be reported. (#835) -
Pinned Pandas dependency to lower than 2.0 because of incompatibility with both xarray and xcube (see pydata/xarray#7716). Therefore, the following xcube deprecations have been introduced:
- The optional
--base/-bof thexcube resampleCLI tool. - The keyword argument
baseof thexcube.core.resample.resample_in_timefunction.
- The optional
-
Bundled xcube-viewer 1.0.2.
Same as 1.0.2, just fixed unit tests due to minor Python environment change.
-
Bundled latest xcube-viewer 1.0.1.
-
xcube is now compatible with Python 3.10. (#583)
-
The
Viewer.add_dataset()method of the xcube JupyterLab integration has been enhanced by two optional keyword argumentsstyleandcolor_mappingsto allow for customized, initial color mapping of dataset variables. The example notebook xcube-viewer-in-jl.ipynb has been updated to reflect the enhancement. -
Fixed an issue with new xcube data store
abfsfor the Azure Blob filesystem. (#798)
- Fixed recurring issue where xcube server was unable to locate Python
code downloaded from S3 when configuring dynamically computed datasets
(configuration
FileSystem: memory) or augmenting existing datasets by dynamically computed variables (configurationAugmentation). (#828)
-
Added a catalog API compliant to STAC to xcube server. (#455)
- It serves a single collection named "datacubes" whose items are the datasets published by the service.
- The collection items make use the STAC datacube extension.
-
Simplified the cloud deployment of xcube server/viewer applications (#815). This has been achieved by the following new xcube server features:
- Configuration files can now also be URLs which allows
provisioning from S3-compatible object storage.
For example, it is now possible to invoke xcube server as follows:
$ xcube serve --config s3://cyanoalert/xcube/demo.yaml ...
- A new endpoint
/viewer/config/{*path}allows for configuring the viewer accessible via endpoint/viewer. The actual source for the configuration items is configured by xcube server configuration using the new entryViewer/Configuration/Path, for example:Viewer: Configuration: Path: s3://cyanoalert/xcube/viewer-config
- A typical xcube server configuration comprises many paths, and
relative paths of known configuration parameters are resolved against
the
base_dirconfiguration parameter. However, for values of parameters passed to user functions that represent paths in user code, this cannot be done automatically. For such situations, expressions can be used. An expression is any string between"${"and"}"in a configuration value. An expression can contain the variablesbase_dir(a string),ctxthe current server context (typexcube.webapi.datasets.DatasetsContext), as well as the functionresolve_config_path(path)that is used to make a path absolut with respect tobase_dirand to normalize it. For exampleAugmentation: Path: augmentation/metadata.py Function: metadata:update_metadata InputParameters: bands_config: ${resolve_config_path("../common/bands.yaml")}
- Configuration files can now also be URLs which allows
provisioning from S3-compatible object storage.
For example, it is now possible to invoke xcube server as follows:
-
xcube's spatial resampling functions
resample_in_space(),affine_transform_dataset(), andrectify_dataset()exported from modulexcube.core.resamplingnow encode the target grid mapping into the resampled datasets. (#822)This new default behaviour can be switched off by keyword argument
encode_cf=False. The grid mapping name can be set by keyword argumentgm_name. Ifgm_nameis not given a grid mapping will not be encoded if all the following conditions are true:- The target CRS is geographic;
- The spatial dimension names are "lon" and "lat";
- The spatial 1-D coordinate variables are named "lon" and "lat" and are evenly spaced.
The encoding of the grid mapping is done according to CF conventions:
- The CRS is encoded as attributes of a 0-D data variable named by
gm_name - All spatial data variables receive an attribute
grid_mappingthat is set to the value ofgm_name.
-
Added Notebook xcube-viewer-in-jl.ipynb that explains how xcube Viewer can now be utilised in JupyterLab using the new (still experimental) xcube JupyterLab extension xcube-jl-ext. The
xcube-jl-extpackage is also available on PyPI. -
Updated example Notebook for CMEMS data store to reflect changes of parameter names that provide CMEMS API credentials.
-
Included support for Azure Blob Storage filesystem by adding a new data store
abfs. Many thanks to Ed! (#752)These changes will enable access to data cubes (
.zarror.levels) in Azure blob storage as shown here:store = new_data_store( "abfs", # Azure filesystem protocol root="my_blob_container", # Azure blob container name storage_options= {'anon': True, # Alternatively, use 'connection_string': 'xxx' 'account_name': 'xxx', 'account_key':'xxx'} ) store.list_data_ids()
Same configuration for xcube Server:
DataStores: - Identifier: siec StoreId: abfs StoreParams: root: my_blob_container max_depth: 1 storage_options: anon: true account_name: "xxx" account_key': "xxx" # or # connection_string: "xxx" Datasets: - Path: "*.levels" Style: default
-
Added Notebook 8_azure_blob_filesystem.ipynb. This notebook shows how a new data store instance can connect and list Zarr files from Azure bolb storage using the new
abfsdata store. -
xcube's
Dockerfileno longer creates a conda environmentxcube. All dependencies are now installed into thebaseenvironment making it easier to use the container as an executable for xcube applications. We are now also using amicromambabase image instead ofminiconda. The result is a much faster build and smaller image size. -
Added a
new_clusterfunction toxcube.util.dask, which can create Dask clusters with various configuration options. -
The xcube multi-level dataset specification has been enhanced. (#802)
- When writing multi-level datasets (
*.levels/) we now create a new JSON file.zlevelsthat contains the parameters used to create the dataset. - A new class
xcube.core.mldataset.FsMultiLevelDatasetthat represents a multi-level dataset persisted to some filesystem, like "file", "s3", "memory". It can also write datasets to the filesystem.
- When writing multi-level datasets (
-
Changed the behaviour of the class
xcube.core.mldataset.CombinedMultiLevelDatasetto do what we actually expect: If the keyword argumentcombiner_funcis not given orNoneis passed, a copy of the first dataset is made, which is then subsequently updated by the remaining datasets usingxarray.Dataset.update(). The former default was using thexarray.merge(), which for some reason can eagerly load Dask array chunks into memory that won't be released.
-
Tiles of datasets with forward slashes in their identifiers (originated from nested directories) now display again correctly in xcube Viewer. Tile URLs have not been URL-encoded in such cases. (#817)
-
The xcube server configuration parameters
url_prefixandreverse_url_prefixcan now be absolute URLs. This fixes a problem for relative prefixes such as"proxy/8000"used for xcube server running inside JupyterLab. Here, the expected returned self-referencing URL washttps://{host}/users/{user}/proxy/8000/{path}but we gothttp://{host}/proxy/8000/{path}. (#806)
-
xcube Server has been rewritten almost from scratch.
-
Introduced a new endpoint
${server_url}/s3that emulates and AWS S3 object storage for the published datasets. (#717) Thebucketname can be either:s3://datasets- publishes all datasets in Zarr format.s3://pyramids- publishes all datasets in a multi-levellevelsformat (multi-resolution N-D images) that comprises level datasets in Zarr format.
Datasets published through the S3 API are slightly renamed for clarity. For bucket
s3://pyramids:- if a dataset identifier has suffix
.levels, the identifier remains; - if a dataset identifier has suffix
.zarr, it will be replaced by.levelsonly if such a dataset doesn't exist; - otherwise, the suffix
.levelsis appended to the identifier. For buckets3://datasetsthe opposite is true: - if a dataset identifier has suffix
.zarr, the identifier remains; - if a dataset identifier has suffix
.levels, it will be replaced by.zarronly if such a dataset doesn't exist; - otherwise, the suffix
.zarris appended to the identifier.
With the new S3 endpoints in place, xcube Server instances can be used as xcube data stores as follows:
store = new_data_store( "s3", root="datasets", # bucket "datasets", use also "pyramids" max_depth=2, # optional, but we may have nested datasets storage_options=dict( anon=True, client_kwargs=dict( endpoint_url='http://localhost:8080/s3' ) ) )
-
The limited
s3bucketendpoints are no longer available and are replaced bys3endpoints. -
Added new endpoint
/viewerthat serves a self-contained, packaged build of xcube Viewer. The packaged viewer can be overridden by environment variableXCUBE_VIEWER_PATHthat must point to a directory with a build of a compatible viewer. -
The
--showoption ofxcube servehas been renamed to--open-viewer. It now uses the self-contained, packaged build of xcube Viewer. (#750) -
The
--showoption ofxcube servenow outputs various aspects of the server configuration. -
Added experimental endpoint
/volumes. It is used by xcube Viewer to render 3-D volumes.
-
-
xcube Server is now more tolerant with respect to datasets it can not open without errors. Implementation detail: It no longer fails if opening datasets raises any exception other than
DatasetIsNotACubeError. (#789) -
xcube Server's colormap management has been improved in several ways:
- Colormaps are no longer managed globally. E.g., on server configuration change, new custom colormaps are reloaded from files.
- Colormaps are loaded dynamically from underlying matplotlib and cmocean registries, and custom SNAP color palette files. That means, latest matplotlib colormaps are now always available. (#687)
- Colormaps can now be reversed (name suffix
"_r"), can have alpha blending (name suffix"_alpha"), or both (name suffix"_r_alpha"). - Loading of custom colormaps from SNAP
*.cpdhas been rewritten. Now also theisLogScaledproperty of the colormap is recognized. (#661) - The module
xcube.util.cmapshas been redesigned and now offers three new classes for colormap management:Colormap- a colormapColormapCategory- represents a colormap categoryColormapRegistry- manages colormaps and their categories
-
The xcube filesystem data stores such as "file", "s3", "memory" can now filter the data identifiers reported by
get_data_ids(). (#585) For this purpose, the data stores now accept two new optional keywords which both can take the form of a wildcard pattern or a sequence of wildcard patterns:excludes: if given and if any pattern matches the identifier, the identifier is not reported.includes: if not given or if any pattern matches the identifier, the identifier is reported.
-
Added convenience method
DataStore.list_data_ids()that works likeget_data_ids(), but returns a list instead of an iterator. (#776) -
Replaced usages of deprecated numpy dtype
numpy.boolby Python typebool.
-
xcube CLI tools no longer emit warnings when trying to import installed packages named
xcube_*as xcube plugins. -
The
xcube.util.timeindexmodule can now handle 0-dimensionalndarrays as indexers. This effectively avoids the warningCan't determine indexer timezone; leaving it unmodified.which was emitted in such cases. -
xcube servewill now also accept datasets with coordinate nameslongitudeandlatitude, even if the attributelong_nameisn't set. (#763) -
Function
xcube.core.resampling.affine.affine_transform_dataset()now assumes that geographic coordinate systems are equal by default and hence a resampling based on an affine transformation can be performed. -
Fixed a problem with xcube server's WMTS implementation. For multi-level resolution datasets with very coarse low resolution levels, the tile matrix sets
WorldCRS84QuadandWorldWebMercatorQuadhave reported a negative minimum z-level. -
Implementation of function
xcube.core.geom.rasterize_features()has been changed to account for consistent use of a target variable'sfill_valueanddtypefor a given feature. In-memory (decoded) variables now always use dtypefloat64and usenp.nanto represent missing values. Persisted (encoded) variable data will make use of the targetfill_valueanddtype. (#778) -
Relative local filesystem paths to datasets are now correctly resolved against the base directory of the xcube Server's configuration, i.e. configuration parameter
base_dir. (#758) -
Fixed problem with
xcube genraisingFileNotFoundErrorwith Zarr >= 2.13. -
Provided backward compatibility with Python 3.8. (#760)
-
The CLI tool
xcube edithas been deprecated in favour of thexcube patch. (#748) -
Deprecated CLI
xcube tilehas been removed. -
Deprecated modules, classes, methods, and functions have finally been removed:
xcube.core.geom.get_geometry_mask()xcube.core.mldataset.FileStorageMultiLevelDatasetxcube.core.mldataset.open_ml_dataset()xcube.core.mldataset.open_ml_dataset_from_local_fs()xcube.core.mldataset.open_ml_dataset_from_object_storage()xcube.core.subsampling.get_dataset_subsampling_slices()xcube.core.tiledimagexcube.core.tilegrid
-
The following classes, methods, and functions have been deprecated:
xcube.core.xarray.DatasetAccessor.levels()xcube.util.cmaps.get_cmap()xcube.util.cmaps.get_cmaps()
-
A new function
compute_tiles()has been refactored out from functionxcube.core.tile.compute_rgba_tile(). -
Added method
get_level_for_resolution(xy_res)to abstract base classxcube.core.mldataset.MultiLevelDataset. -
Removed outdated example resources from
examples/serve/demo. -
Account for different spatial resolutions in x and y in
xcube.core.geom.get_dataset_bounds(). -
Make code robust against 0-size coordinates in
xcube.core.update._update_dataset_attrs(). -
xcube Server has been enhanced to load multi-module Python code for dynamic cubes both from both directories and zip archives. For example, the following dataset definition computes a dynamic cube from dataset "local" using function "compute_dataset" in Python module "resample_in_time.py":
Path: resample_in_time.py Function: compute_dataset InputDatasets: ["local"]
Users can now pack "resample_in_time.py" among any other modules and packages into a zip archive. Note that the original module name is now a prefix to the function name:
Path: modules.zip Function: resample_in_time:compute_dataset InputDatasets: ["local"]
Implementation note: this has been achieved by using
xcube.core.byoa.CodeConfiginxcube.core.mldataset.ComputedMultiLevelDataset. -
Instead of the
Functionkeyword it is now possible to use theClasskeyword. WhileFunctionreferences a function that receives one or more datasets (typexarray.Dataset) and returns a new one,Classreferences a callable that receives one or more multi-level datasets and returns a new one. The callable is either a class derived from
or a function that returns an instance ofxcube.core.mldataset.MultiLevelDataset. -
Module
xcube.core.mldatasethas been refactored into a sub-package for clarity and maintainability. -
Removed deprecated example
examples/tile.
- The utility function
xcube.util.dask.create_cluster()now also generates the taguserfor the current user's name.
-
Added a new package
xcube.core.zarrstorethat exports a number of useful Zarr store implementations and Zarr store utilities:-
xcube.core.zarrstore.GenericZarrStorecomprises user-defined, generic array definitions. Arrays will compute their chunks either from a function or a static data array. -
xcube.core.zarrstore.LoggingZarrStoreis used to log Zarr store access performance and therefore useful for runtime optimisation and debugging. -
xcube.core.zarrstore.DiagnosticZarrStoreis used for testing Zarr store implementations. -
Added a xarray dataset accessor
xcube.core.zarrstore.ZarrStoreHolderthat enhances instances ofxarray.Datasetby a new propertyzarr_store. It holds a Zarr store instance that represents the datasets as a key-value mapping. This will prepare later versions of xcube Server for publishing all datasets via an emulated S3 API.In turn, the classes of module
xcube.core.chunkstorehave been deprecated.
-
-
Added a new function
xcube.core.select.select_label_subset()that is used to select dataset labels along a given dimension using user-defined predicate functions. -
The xcube Python environment is now requiring
xarray >= 2022.6andzarr >= 2.11to ensure sparse Zarr datasets can be written usingdataset.to_zarr(store). (#688) -
Added new module
xcube.util.jsonencoderthat offers the classNumpyJSONEncoderused to serialize numpy-like scalar values to JSON. It also offers the functionto_json_value()to convert Python objects into JSON-serializable versions. The new functionality is required to ensure dataset attributes that are JSON-serializable. For example, the latest version of therioxarraypackage generates a_FillValueattribute with datatypenp.uint8.
- The filesystem-based data stores for the "s3", "file", and "memory"
protocols can now provide
xr.Datasetinstances from image pyramids formats, i.e. thelevelsandgeotiffformats.
-
Allow xcube Server to work with any OIDC-compliant auth service such as Auth0, Keycloak, or Google. Permissions of the form
"read:dataset:\<dataset\>"and"read:variable:\<dataset\>"can now be passed by two id token claims:permissionsmust be a JSON list of permissions;scopemust be a space-separated character string of permissions.
It is now also possible to include id token claim values into the permissions as template variables. For example, if the currently authenticated user is
demo_user, the permission"read:dataset:$username/*"will effectively be"read:dataset:demo_user/*"and only allow access to datasets with resource identifiers having the prefixdemo_user/.With this change, server configuration has changed:
Please note, there must be a trailing slash in the "Authority" URL.
Authentication: Authority: https://some-demo-service.eu.auth0.com/ Audience: https://some-demo-service/api/
Please note, no trailing slash in the "Authority" URL.
Authentication: Authority: https://kc.some-demo-service.de/auth/realms/some-kc-realm Audience: some-kc-realm-xc-api
-
Filesystem-based data stores like "file" and "s3" support reading GeoTIFF and Cloud Optimized GeoTIFF (COG). (#489)
-
xcube servernow also allows publishing also 2D datasets such as opened from GeoTIFF / COG files. -
Removed all upper version bounds of package dependencies. This increases compatibility with existing Python environments.
-
A new CLI tool
xcube patchhas been added. It allows for in-place metadata patches of Zarr data cubes stored in almost any filesystem supported by fsspec including the protocols "s3" and "file". It also allows patching xcube multi-level datasets (*.levelsformat). -
In the configuration for
xcube server, datasets defined inDataStoresmay now have user-defined identifiers. In case the path does not unambiguously define a dataset (because it contains wildcards), providing a user-defined identifier will raise an error.
- xcube Server did not find any grid mapping if a grid mapping variable (e.g. spatial_ref or crs) encodes a geographic CRS (CF grid mapping name "latitude_longitude") and the related geographical 1-D coordinates were named "x" and "y". (#706)
- Fixed typo in metadata of demo cubes in
examples/serve/demo. Demo cubes now all have consolidated metadata. - When writing multi-level datasets with file data stores, i.e.,
and where
store.write_data(dataset, data_id="test.levels", use_saved_levels=True)
datasethas different spatial resolutions in x and y, an exception was raised. This is no longer the case. - xcube Server can now also compute spatial 2D datasets from users' Python code. In former versions, spatio-temporal 3D cubes were enforced.
- Deprecated all functions and classes defined in
xcube.core.dsioin favor of the xcube data store API defined byxcube.core.store.
-
xcube servenow provides new metadata details of a dataset:- The spatial reference is now given by property
spatialRefand provides a textual representation of the spatial CRS. - The dataset boundary is now given as property
geometryand provides a GeoJSON Polygon in geographic coordinates.
- The spatial reference is now given by property
-
xcube servenow publishes the chunk size of a variable's time dimension for either for an associated time-chunked dataset or the dataset itself (new variable integer propertytimeChunkSize). This helps clients (e.g. xcube Viewer) to improve the server performance for time-series requests. -
The functions
mask_dataset_by_geometry()rasterize_features()of modulexcube.core.geomhave been reimplemented to generate lazy dask arrays. Both should now be applicable to datasets that have arbitrarily large spatial dimensions. The spatial chunk sizes to be used can be specified using keyword argumenttile_size. (#666)
-
Fixed ESA CCI example notebook. (#680)
-
xcube servenow provides datasets after changes of the service configuration while the server is running. Previously, it was necessary to restart the server to load the changes. (#678)
-
xcube.core.resampling.affine_transform_dataset()has a new keyword argumentreuse_coords: bool = False. If set toTruethe returned dataset will reuse the same spatial coordinates as the target. This is a workaround for xarray issue pydata/xarray#6573. -
Deprecated following functions of module
xcube.core.geom:is_dataset_y_axis_inverted()is no longer used;get_geometry_mask()is no longer used;convert_geometry()has been renamed tonormalize_geometry().
- Fixed broken generation of composite RGBA tiles. (#668)
- Fixing broken URLs in xcube viewer documentation, more revision still needed.
-
xcube servecan now serve datasets with arbitrary spatial coordinate reference systems. Before xcube 0.11, datasets where forced to have a geographical CRS such as EPSG:4326 or CRS84. -
xcube servecan now provide image tiles for two popular tile grids:- global geographic grid, with 2 x 1 tiles at level zero (the default);
- global web mercator grid, with 1 x 1 tiles at level zero ("Google projection", OSM tile grid).
The general form of the new xcube tile URL is (currently)
/datasets/{ds_id}/vars/{var_name}/tile2/{z}/{y}/{x}The following query parameters can be used
crs: set toCRS84to use the geographical grid (the default), orEPSG:3857to use the web mercator grid.cbar: color bar name such asviridisorplasma, see color bar names of matplotlib. Defaults tobone.vmin: minimum value to be used for color mapping. Defaults to0.vmax: maximum value to be used for color mapping. Defaults to1.retina: if set to1, tile size will be 512 instead of 256.
-
The WMTS provided by
xcube servehas been reimplemented from scratch. It now provides two common tile matrix sets:WorldCRS84Quadglobal geographic grid, with 2 x 1 tiles at level zero;WorldWebMercatorQuadglobal web mercator grid, with 1 x 1 tiles at level zero.
New RESTful endpoints have been added to reflect this:
/wmts/1.0.0/{TileMatrixSet}/WMTSCapabilities.xml /wmts/1.0.0/tile/{Dataset}/{Variable}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.pngThe existing RESTful endpoints now use tile matrix set
WorldCRS84Quadby default:/wmts/1.0.0/WMTSCapabilities.xml /wmts/1.0.0/tile/{Dataset}/{Variable}/{TileMatrix}/{TileRow}/{TileCol}.pngThe key-value pair (KVP) endpoint
/wmts/kvpnow recognises theTileMatrixSetkey for the two values described above. -
Support for multi-level datasets aka ND image pyramids has been further improved (#655):
- Introduced new parameter
agg_methodsfor writing multi-level datasets with the "file", "s3", and "memory" data stores. The value ofagg_methodsis either a string"first","min","max","mean","median"or a dictionary that maps a variable name to an aggregation method. Variable names can be patterns that may contain wildcard characters '*' and '?'. The special aggregation method"auto"can be used to select"first"for integer variables and"mean"for floating point variables. - The
xcube levelCLI tool now has a new option--agg-methods(or-A) for the same purpose.
- Introduced new parameter
-
The xcube package now consistently makes use of logging. We distinguish general logging and specific xcube logging. General logging refers to the log messages emitted by any Python module while xcube logging only refers to log messages emitted by xcube modules.
-
The output of general logging from xcube CLI tools can now be configured with two new CLI options:
--loglevel LEVEL: Can be one ofCRITICAL,ERROR,WARNING,INFO,DETAIL,DEBUG,TRACE, orOFF(the default).--logfile PATH: Effective only if log level is notOFF. If given, log messages will be written into the file given by PATH. If omitted, log messages will be redirected to standard error (sys.stderr).
The output of general logging from xcube CLI is disabled by default. If enabled, the log message format includes the level, date-time, logger name, and message.
-
All xcube modules use the logger named
xcube(i.e.LOG = logging.getLogger("xcube")) to emit messages regarding progress, debugging, errors. Packages that extend the xcube package should use a dot suffix for their logger names, e.g.xcube.ccifor the xcube plugin packagexcube-cci. -
All xcube CLI tools will output log messages, if any, on standard error (
sys.stderr). Only the actual result, if any, is written to standard out (sys.stdout). -
Some xcube CLI tools have a
--quiet/-qoption to disable output of log messages on the console and a--verbose/-voption to enable it and control the log level. For this purpose the option-vcan be given multiple times and even be combined:-v=INFO,-vv=DETAIL,-vvv=DEBUG,-vvvv=TRACE. Thequietandverbosesettings only affect the logger namedxcubeand its children. If enabled, a simple message format will be used, unless the general logging is redirected to stdout.
-
-
Fixed a problem where the
DataStoresconfiguration ofxcube servedid not recognize multi-level datasets. (#653) -
Opening of multi-level datasets with filesystem data stores now recognizes the
cache_sizeopen parameter. -
It is possible again to build and run docker containers from the docker file in the Github Repository. (#651) For more information, see https://xcube.readthedocs.io/en/latest/installation.html#docker
-
The
xcube tileCLI tool has been deprecated. A new tool is planned that can work concurrently on dask clusters and also supports common tile grids such as global geographic and web mercator. -
The
xcube.util.tiledimagemodule has been deprecated and is no longer used in xcube. It has no replacement. -
The
xcube.util.tilegridmodule has been deprecated and is no longer used in xcube. A new implementation is provided byxcube.core.tilingschemewhich is used instead. -
All existing functions of the
xcube.core.tilemodule have been deprecated and are no longer used in xcube. A newly exported function isxcube.core.tile.compute_rgba_tile()which is used in place of other tile generating functions.
-
Added new module
xcube.core.subsamplingfor functionsubsample_dataset(dataset, step)that is now used by default to generate the datasets level of multi-level datasets. -
Added new setting
Authentication.IsRequiredto thexcube serveconfiguration. If set totrue, xcube Server will reject unauthorized dataset requests by returning HTTP code 401. -
For authorized clients, the xcube Web API provided by
xcube servenow allows granted scopes to contain wildcard characters*,**, and?. This is useful to give access to groups of datasets, e.g. the scoperead:dataset:*/S2-*.zarrpermits access to any Zarr dataset in a subdirectory of the configured data stores and whose name starts with "S2-". (#632) -
xcube serveused to shut down with an error message if it encountered datasets it could not open. New behaviour is to emit a warning and ignore such datasets. (#630) -
Introduced helper function
add_spatial_ref()of packagexcube.core.gridmapping.cfconvthat allows adding a spatial coordinate reference system to an existing
Zarr dataset. (#629) -
Support for multi-level datasets has been improved:
- Introduced new parameters for writing multi-level datasets with the
"file", "s3", and "memory" data stores (#617). They are
base_dataset_id: If given, the base dataset will be linked only with the value ofbase_dataset_id, instead of being copied as-is. This can save large amounts of storage space.tile_size: If given, it forces the spatial dimensions to be chunked accordingly.tile_sizecan be a positive integer or a pair of positive integers.num_levels: If given, restricts the number of resolution levels to the given value. Must be a positive integer to be effective.
- Added a new example notebook 5_multi_level_datasets.ipynb that demonstrates writing and opening multi-level datasets with the xcube filesystem data stores.
- Specified xcube Multi-Resolution Datasets definition and format.
- Introduced new parameters for writing multi-level datasets with the
"file", "s3", and "memory" data stores (#617). They are
-
xcube gen2returns more expressive error messages.
-
Fixed problem where the dataset levels of multi-level datasets were written without spatial coordinate reference system. In fact, only spatial variables were written. (#646)
-
Fixed problem where xcube Server instances that required user authentication published datasets and variables for unauthorised users.
-
Fixed
FsDataAccessor.write_data()implementations, which now always return the passed indata_id. (#623) -
Fixes an issue where some datasets seemed to be shifted in the y-(latitude-) direction and were misplaced on maps whose tiles are served by
xcube serve. Images with ascending y-values are now tiled correctly. (#626)
-
The
xcube levelCLI tool has been rewritten from scratch to make use of xcube filesystem data stores. (#617) -
Deprecated numerous classes and functions around multi-level datasets. The non-deprecated functions and classes of
xcube.core.mldatasetshould be used instead along with the xcube filesystem data stores for multi-level dataset i/o. (#516)- Deprecated all functions of the
xcube.core.levelmodulecompute_levels()read_levels()write_levels()
- Deprecated numerous classes and functions of the
xcube.core.mldatasetmoduleFileStorageMultiLevelDatasetObjectStorageMultiLevelDatasetopen_ml_dataset()open_ml_dataset_from_object_storage()open_ml_dataset_from_local_fs()write_levels()
- Deprecated all functions of the
-
Added packages
python-bloscandlz4to the xcube Python environment for better support of Daskdistributedand the Dask service Coiled. -
Replace the dependency on the
rfc3339-validatorPyPI package with a dependency on its recently created conda-forge package. -
Remove unneeded dependency on the no longer used
strict-rfc3339package.
- Deprecated argument
xy_var_namesin functionGridMapping.from_dataset, thereby preventing a NotImplementedError. (#551)
- For compatibility, now also
xcube.__version__contains the xcube version number.
- The configuration
DataStoresforxcube servechanged in an incompatible way with xcube 0.9.x: The value of formerIdentifiermust now be assigned toPath, which is a mandatory parameter.Pathmay contain wildcard characters **, *, ?.Identifieris now optional, the default is"${store_id}~${data_id}". If given, it should only be used to uniquely identify single datasets within a data store pointed to byPath. (#516)
-
It is now possible to use environment variables in most
xcube configuration files. Unix bash syntax is used, i.e.${ENV_VAR_NAME}or$ENV_VAR_NAME. (#580)Supported tools include
xcube gen --config CONFIGxcube gen2 --stores STORES_CONFIG --service SERVICE_CONFIGxcube serve -c CONFIG
-
Changed the
xcube gentool to extract metadata for pre-sorting inputs from other than NetCDF inputs, e.g. GeoTIFF. -
Optimized function
xcube.core.geom.rasterize_features(). It is now twice as fast while its memory usage dropped to the half. (#593)
-
xcube servenow also serves datasets that are located in subdirectories of filesystem-based data stores such as "file", "s3", "memory". (#579) -
xcube serve now accepts datasets whose spatial resolutions differ up to 1%. (#590) It also no longer rejects datasets with large dimension sizes. (Formerly, an integer-overflow occurred in size computation.)
-
DatasetChunkCacheSizeis now optional inxcube serveconfiguration. (Formerly, when omitted, the server crashed.) -
Fixed bug that would cause that requesting data ids on some s3 stores would fail with a confusing ValueError.
-
Fixed that only last dataset of a directory listing was published via
xcube servewhen using theDataStoresconfiguration with filesystem-based datastores such as "s3" or "file". (#576)
-
Pinned Python version to < 3.10 to avoid import errors caused by a third-party library.
-
Values
obsandlocalfor theFileSystemparameter in xcube configuration files have been replaced bys3andfile, but are kept temporarily for the sake of backwards compatibility.
- A
xcube.core.store.fs.impl.FSDataStoreno longer raises exceptions when root directories in data store configurations do not exist. Instead, they are created when data is written.
-
The
xcube.core.maskset.MaskSetclass no longer allocates static numpy arrays for masks. Instead, it uses lazy dask arrays. (#556) -
Function
xcube.core.geom.mask_dataset_by_geometryhas a new parameterall_touched: IfTrue, all pixels intersected by geometry outlines will be included in the mask. IfFalse, only pixels whose center is within the polygon or that are selected by Bresenham’s line algorithm will be included
in the mask. The default value is set toFalse.
-
Updated
Dockerfile: Removed the usage of a no-longer-maintained base image. Ensured that the version tag 'latest' can be used with installation mode 'release' for xcube plugins. -
The
xcubepackage now requiresxarray >= 0.19,zarr >= 2.8,pandas >= 1.3.
-
The implementations of the default data stores
s3,directory, andmemoryhave been replaced entirely by a new implementation that utilize the fsspec Python package. The preliminary filesystem-based data stores are nows3,file, andmemory. All share a common implementations and tests. Others filesystem-based data stores can be added easily and will follow soon, for examplehdfs. All filesystem-based data stores now support xarray datasets (typexarray.Dataset) in Zarr and NetCDF format as well as image pyramids (typexcube.core.multilevel.MultiLevelDataset) using a Zarr-based multi-level format. (#446) -
Several changes became necessary on the xcube Generator package
xcube.core.gen2and CLIxcube gen2. They are mostly not backward compatible:- The only supported way to instantiate cube generators is the
CubeGenerator.new()factory method. CubeGenerator.generate_cube()andCubeGenerator.get_cube_info()both now receive the request object that has formerly been passed to the generator constructors.- The
CubeGenerator.generate_cube()method now returns aCubeGeneratorResultobject rather than a simple string (the writtendata_id). - Empty cubes are no longer written, a warning status is generated instead.
- The xcube gen2 CLI
xcube gen2has a new option--output RESULTto write the result to a JSON file. If it is omitted, the CLI will dump the result as JSON to stdout.
- The only supported way to instantiate cube generators is the
-
Numerous breaking changes have been applied to this version in order to address generic resampling (#391), to support other CRS than WGS-84 (#112), and to move from the struct data cube specification to a more relaxed cube convention (#488):
- The following components have been removed entirely
- module
xcube.core.imgeomwith classImageGeom - module
xcube.core.geocodingwith classGeoCoding - module
xcube.core.reprojectand all its functions
- module
- The following components have been added
- module
xcube.core.gridmappingwith new classGridMappingis a CF compliant replacement for classesImageGeomandGeoCoding
- module
- The following components have changed in an incompatible way:
- Function
xcube.core.rectify.rectify_dataset()now usessource_gm: GridMappingandtarget_gm: GridMappinginstead ofgeo_coding: GeoCodingandoutput_geom: ImageGeom. - Function
xcube.core.gen.iproc.InputProcessor.process()now usessource_gm: GridMappingandtarget_gm: GridMappinginstead ofgeo_coding: GeoCodingandoutput_geom: ImageGeom.
- Function
- xcube no longer depends on GDAL (at least not directly).
- The following components have been removed entirely
-
Added a new feature to xcube called "BYOA" - Bring your own Algorithm. It is a generic utility that allows for execution of user-supplied Python code in both local and remote contexts. (#467) The new
xcube.core.byoapackage hosts the BYOA implementation and API. The entry point to the functionality is thexcube.core.byoa.CodeConfigclass. It is currently utilized by the xcube Cube Generator that can now deal with an optionalcode_configrequest parameter. If given, the generated data cube will be post-processed by the configured user-code. The xcube Cube Generator with the BYOA feature is made available through the- Generator API
xcube.core.gen2.LocalCubeGeneratorandxcube.core.gen2.service.RemoteCubeGenerator; - Generator CLI
xcube gen2.
- Generator API
-
A dataset's cube subset and its grid mapping can now be accessed through the
xcubeproperty ofxarray.Datasetinstances. This feature requires importing thexcube.core.xarraypackage. Letdatasetbe an instance ofxarray.Dataset, thendataset.xcube.cubeis axarray.Datasetthat contains all cube variables ofdataset, namely the ones with dimensions("time", [...,], y_dim_name, x_dim_name), wherey_dim_name,x_dim_nameare determined by the dataset's grid mapping. May be empty, ifdatasethas no cube variables.dataset.xcube.gmis axcube.core.gridmapping.GridMappingthat describes the CF-compliant grid mapping ofdataset. May beNone, ifdatasetdoes not define a grid mapping.dataset.xcube.non_cubeis axarray.Datasetthat contains all variables ofdatasetthat are not indataset.xcube.cube. May be same asdataset, ifdataset.xcube.cubeis empty.
-
Added a new utility module
xcube.util.tempthat allows for creating temporary files and directories that will be deleted when the current process ends. -
Added function
xcube.util.versions.get_xcube_versions()
that outputs the versions of packages relevant for xcube. Also added a new CLIxcube versionsthat outputs the result of the
new function in JSON or YAML. (#522)
-
The xcube cube generator (API
xcube.core.gen2, CLIxcube gen2) will now write consolidated Zarrs by default. (#500) -
xcube now issues a warning, if a data cube is opened from object storage, and credentials have neither been passed nor can be found, and the object storage has been opened with the default
anon=False. (#412) -
xcube no longer internally caches directory listings, which prevents the situation where a data cube that has recently been written into object storage cannot be found.
-
Removed example notebooks that used hard-coded local file paths. (#400)
-
Added a GitHub action that will run xcube unit tests, and build and push Docker images. The version tag of the image is either
latestwhen the main branch changed, or the same as the release tag. -
Removed warning
module 'xcube_xyz' looks like an xcube-plugin but lacks a callable named 'init_plugin. -
Fixed an issue where
xcube serveprovided wrong layer source options for OpenLayers XYZ when latitude coordinates where increasing with the coordinate index. (#251) -
Function
xcube.core.normalize.adjust_spatial_attrs()no longer removes existing global attributes of the formgeospatial_vertical_<property>. -
Numerous classes and functions became obsolete in the xcube 0.9 code base and have been removed, also because we believe there is quite rare outside use, if at all.
Removed from
xcube.util.tiledimage:- class
DownsamplingImage - class
PilDownsamplingImage - class
NdarrayDownsamplingImage - class
FastNdarrayDownsamplingImage - class
ImagePyramid - function
create_pil_downsampling_image() - function
create_ndarray_downsampling_image() - function
downsample_ndarray() - functions
aggregate_ndarray_xxx()
Removed from
xcube.util.tilegrid:- functions
pow2_2d_subdivision() - functions
pow2_1d_subdivision()
- class
- Fixed the issue that xcube gen2 would not print tracebacks to stderr
when raising errors of type
CubeGeneratorError(#448). - Enhanced
xcube.core.normalize.normalize_dataset()function to also normalize datasets with latitudes given aslatitude_centersand to invert decreasing latitude coordinate values. - Introduced
xcube.core.normalize.cubify_dataset()function to normalize a dataset and finally assert the result complies to the xcube dataset conventions. - Fixed that data stores
directoryands3were not able to handle data identifiers that they had assigned themselves duringwrite_data().
(#450) - The
xcube prunetool is no longer restricted to data cube datasets and should now be able to deal with datasets that comprise very many chunks. (#469) - The
xcube.core.extract.get_cube_values_for_points()function has been enhanced to also accept lists or tuples in the item values of thepointsarguments. (#431) - Fixed exception raised in
xcube extractCLI tool when called with the--refoption. This issue occurred withxarray 0.18.2+.
-
Improved support of datasets with time given as
cftime.DatetimeGregorianorcftime.DatetimeJulian. -
Fixed out-of-memory error raised if spatial subsets were created from cubes with large spatial dimensions. (#442)
-
Fixed example Notebook
compute_dask_arrayand renamed it intocompute_array_from_func. (#385) -
Fixed a problem with the S3 data store that occurred if the store was configured without
bucket_nameand the (Zarr) data was opened withconsolidated=True. -
The functions
xcube.core.compute.compute_cube()andxcube.core.compute.compute_dataset()can now alter the shape of input datasets. (#289)
- Harmonized retrieval of spatial and temporal bounds of a dataset:
To determine spatial bounds, use
xcube.core.geom.get_dataset_bounds(), to determine temporal bounds, usexcube.core.timecoord.get_time_range_from_data(). Both methods will attempt to get the values from associated bounds arrays first. - Fixed broken JSON object serialisation of objects returned by
DataStore.describe_object(). (#432) - Changed behaviour and signature of
xcube.core.store.DataStore.get_dataset_ids(). The keyword argumentinclude_titles: str = Truehas been replaced byinclude_attrs: Sequence[str] = Noneand the return value changes accordingly:- If
include_attrsis None (the default), the method returns an iterator of dataset identifiers data_id of typestr. - If
include_attrsis a sequence of attribute names, the method returns an iterator of tuples (data_id, attrs) of typeTuple[str, Dict]. Henceinclude_attrscan be used to obtain a minimum set of dataset metadata attributes for each returned data_id. However,include_attrsis not yet implemented so far in the "s3", "memory", and "directory" data stores. (#420)
- If
- Directory and S3 Data Store consider format of data denoted by data id when
using
get_opener_ids(). - S3 Data Store will only recognise a
consolidated = Trueparameter setting, if the file{bucket}/{data_id}/.zmetadataexists. xcube gen2will now ensure that temporal subsets can be created. (#430)- Enhance
xcube servefor use in containers: (#437)- In addition to option
--configor-c, dataset configurations can now be passed via environment variableXCUBE_SERVE_CONFIG_FILE. - Added new option
--base-diror-bto pass the base directory to resolve relative paths in dataset configurations. In addition, the value can be passed via environment variableXCUBE_SERVE_BASE_DIR.
- In addition to option
-
xcube gen2now allows for specifying the final data cube's chunk sizes. The newcube_configparameter is namedchunks, is optional and if given, must be a dictionary that maps a dimension name to a chunk size or toNone(= no chunking). The chunk sizes only apply to data variables. Coordinate variables will not be affected, e.g. "time", "lat", "lon" will not be chunked. (#426) -
xcube gen2now creates subsets from datasets returned by data stores that do not recognize cube subset parametersvariable_names,bbox, andtime_range. (#423) -
Fixed a problem where S3 data store returned outdated bucket items. (#422)
- Dataset normalisation no longer includes reordering increasing latitude coordinates, as this creates datasets that are no longer writable to Zarr. (#347)
- Updated package requirements
- Added
s3fsrequirement that has been removed by accident. - Added missing requirements
requestsandurllib3.
- Added
- Introduced abstract base class
xcube.util.jsonschema.JsonObjectwhich is now the super class of many classes that have JSON object representations. In Jupyter notebooks, instances of such classes are automatically rendered as JSON trees. xcube gen2CLI tool can now have multiple-voptions, e.g.-vvvwill now output detailed requests and responses.- Added new Jupyter notebooks in
examples/notebooks/gen2for the data cube generators in the packagexcube.core.gen2. - Fixed a problem in
JsonArraySchemathat occurred if a valid instance wasNone. A TypeErrorTypeError: 'NoneType' object is not iterablewas raised in this case. - The S3 data store
xcube.core.store.stores.s3.S3DataStorenow implements thedescribe_data()method. It therefore can also be used as a data store from which data is queried and read. - The
xcube gen2data cube generator tool has been hidden from the set of "official" xcube tools. It is considered as an internal tool that is subject to change at any time until its interface has stabilized. Please refer toxcube gen2 --helpfor more information. - Added
coordsproperty toDatasetDescriptorclass. Thedata_varsproperty of theDatasetDescriptorclass is now a dictionary. - Added
chunksproperty toVariableDescriptorclass. - Removed function
reproject_crs_to_wgs84()and tests (#375) because- it seemed to be no longer be working with GDAL 3.1+;
- there was no direct use in xcube itself;
- xcube plans to get rid of GDAL dependencies.
- CLI tool
xcube gen2may now also ingest non-cube datasets. - Fixed unit tests broken by accident. (#396)
- Added new context manager
xcube.util.observe_dask_progress()that can be used to observe tasks that known to be dominated by Dask computations:with observe_dask_progress('Writing dataset', 100): dataset.to_zarr(store)
- The xcube normalisation process, which ensures that a dataset meets the requirements of a cube, internally requested a lot of data, causing the process to be slow and expensive in terms of memory consumption. This problem was resolved by avoiding to read in these large amounts of data. (#392)
- Updated developer guide (#382)
Changes relating to maintenance of xcube's Python environment requirements in envrionment.yml:
- Removed explicit
blasdependency (which required MKL as ofblas =*.*=mkl) for better interoperability with existing environments. - Removed restrictions of
fsspec <=0.6.2which was required due to Zarr #650. As #650 has been fixed,zarr=2.6.1has been added as new requirement. (#360)
-
Added four new Jupyter Notebooks about xcube's new Data Store Framework in
examples/notebooks/datastores. -
CLI tool
xcube io dumpnow has new--configand--typeoptions. (#370) -
New function
xcube.core.store.get_data_store()and new classxcube.core.store.DataStorePoolallow for maintaining a set of pre-configured data store instances. This will be used in future xcube tools that utilise multiple data stores, e.g. "xcube gen", "xcube serve". (#364) -
Replaced the concept of
type_idused by severalxcube.core.store.DataStoremethods by a more flexibletype_specifier. Documentation is provided indocs/source/storeconv.md.The
DataStoreinterface changed as follows:- class method
get_type_id()replaced byget_type_specifiers()replacesget_type_id(); - new instance method
get_type_specifiers_for_data(); - replaced keyword-argument in
get_data_ids(); - replaced keyword-argument in
has_data(); - replaced keyword-argument in
describe_data(); - replaced keyword-argument in
get_search_params_schema(); - replaced keyword-argument in
search_data(); - replaced keyword-argument in
get_data_opener_ids().
The
WritableDataStoreinterface changed as follows:- replaced keyword-argument in
get_data_writer_ids().
- class method
-
The JSON Schema classes in
xcube.util.jsonschemahave been extended:dateanddate-timeformats are now validated along with the rest of the schema- the
JsonDateSchemaandJsonDatetimeSchemasubclasses ofJsonStringSchemahave been introduced, including a non-standard extension to specify date and time limits
-
Extended
xcube.core.store.DataStoredocstring to include a basic convention for store open parameters. (#330) -
Added documentation for the use of the open parameters passed to
xcube.core.store.DataOpener.open_data().
-
xcube serveno longer crashes, if configuration is lacking aStylesentry. -
xcube gencan now interpretstart_dateandstop_datefrom NetCDF dataset attributes. This is relevant for usingxcube genfor Sentinel-2 Level 2 data products generated and provided by Brockmann Consult. (#352) -
Fixed both
xcube.core.dsio.open_cube()andopen_dataset()which failed with message"ValueError: group not found at path ''"if called with a bucket URL but no credentials given in case the bucket is not publicly readable. (#337) The fix for that issue now requires an additionals3_kwargsparameter when accessing datasets in public buckets:from xcube.core.dsio import open_cube public_url = "https://s3.eu-central-1.amazonaws.com/xcube-examples/OLCI-SNS-RAW-CUBE-2.zarr" public_cube = open_cube(public_url, s3_kwargs=dict(anon=True))
-
xcube now requires
s3fs >= 0.5which implies using faster async I/O when accessing object storage. -
xcube now requires
gdal >= 3.0. (#348) -
xcube now only requires
matplotlib-basepackage rather thanmatplotlib. (#361)
- Restricted
s3fsversion in envrionment.yml in order to use a version which can handle pruned xcube datasets. This restriction will be removed once changes in zarr PR zarr-developers/zarr-python#650 are merged and released. (#360) - Added a note in the
xcube chunkCLI help, saying that there is a possibly more efficient way to (re-)chunk datasets through the dedicated tool "rechunker", see https://rechunker.readthedocs.io (thanks to Ryan Abernathey for the hint). (#335) - For
xcube servedataset configurations whereFileSystem: obs, users must now also specifyAnonymous: Truefor datasets in public object storage buckets. For example:- Identifier: "OLCI-SNS-RAW-CUBE-2" FileSystem: "obs" Endpoint: "https://s3.eu-central-1.amazonaws.com" Path: "xcube-examples/OLCI-SNS-RAW-CUBE-2.zarr" Anyonymous: true ... - ...
- In
environment.yml, removed unnecessary explicit dependencies onproj4andpyprojand restrictedgdalversion to >=3.0,<3.1.
normalize_datasetnow ensures that latitudes are decreasing.
-
xcube gen2 CONFIGwill generate a cube from a data input store and a user given cube configuration. It will write the resulting cube in a user defined output store.- Input Stores: CCIODP, CDS, SentinelHub
- Output stores: memory, directory, S3
-
xcube serve CUBEwill now use the last path component ofCUBEas dataset title. -
xcube servecan now be run with AWS credentials (#296).- In the form
xcube serve --config CONFIG, aDatasetsentry inCONFIGmay now contain the two new keysAccessKeyId: ...andSecretAccessKey: ...given thatFileSystem: obs. - In the form
xcube serve --aws-prof PROFILE CUBEthe cube stored in bucket with URLCUBEwill be accessed using the credentials found in section[PROFILE]of your~/.aws/credentialsfile. - In the form
xcube serve --aws-env CUBEthe cube stored in bucket with URLCUBEwill be accessed using the credentials found in environment variablesAWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEY.
- In the form
-
xcube has been extended by a new Data Store Framework (#307). It is provided by the
xcube.core.storepackage. It's usage is currently documented only in the form of Jupyter Notebook examples, seeexamples/store/*.ipynb. -
During the development of the new Data Store Framework, some
utility packages have been added:xcube.util.jsonschema- classes that represent JSON Schemas for types null, boolean, number, string, object, and array. Schema instances are used for JSON validation, and object marshalling.xcube.util.assertions- numerousassert_*functions that are used for function parameter validation. All functions raiseValueErrorin case an assertion is not met.xcube.util.ipython- functions that can be called for better integration of objects with Jupyter Notebooks.
-
Added possibility to specify packing of variables within the configuration of
xcube gen(#269). The user now may specify a different packing variables, which might be useful for reducing the storage size of the datacubes. Currently it is only implemented for zarr format. This may be done by passing the parameters for packing as the following:output_writer_params: packing: analysed_sst: scale_factor: 0.07324442274239326 add_offset: -300.0 dtype: 'uint16' _FillValue: 0.65535
-
Example configurations for
xcube gen2were added.
-
From 0.4.1: Fixed time-series performance drop (#299).
-
Fixed
xcube genCLI tool to correctly insert time slices into an existing cube stored as Zarr (#317). -
When creating an ImageGeom from a dataset, correct the height if it would otherwise give a maximum latitude >90°.
-
Disable the display of warnings in the CLI by default, only showing them if a
--warningsflag is given. -
Fixed a regression when running "xcube serve" with cube path as parameter (#314)
-
From 0.4.3: Extended
xcube serveby reverse URL prefix option. -
From 0.4.1: Fixed time-series performance drop (#299).
- Extended
xcube serveby reverse URL prefix option--revprefix REFPREFIX. This can be used in cases where only URLs returned by the service need to be prefixed, e.g. by a web server's proxy pass.
- Fixed a problem during release process. No code changes.
- Fixed time-series performance drop (#299).
-
Added new
/timeseries/{dataset}/{variable}POST operation to xcube web API. It extracts time-series for a given GeoJSON object provided as body. It replaces all of the/ts/{dataset}/{variable}/{geom-type}operations. The latter are still maintained for compatibility with the "VITO viewer". -
The xcube web API provided through
xcube servecan now serve RGBA tiles using thedataset/{dataset}/rgb/tiles/{z}/{y}/{x}operation. The red, green, blue channels are computed from three configurable variables and normalisation ranges, the alpha channel provides transparency for missing values. To specify a default RGB schema for a dataset, a colour mapping for the "pseudo-variable" namedrbgis provided in the configuration ofxcube serve:Datasets: - Identifyer: my_dataset Style: my_style ... ... Styles: - Identifier: my_style ColorMappings: rgb: Red: Variable: rtoa_8 ValueRange: [0., 0.25] Green: Variable: rtoa_6 ValueRange: [0., 0.25] Blue: Variable: rtoa_4 ValueRange: [0., 0.25] ...
Note that this concept works nicely in conjunction with the new
Augmentationfeature (#272) used to compute new variables that could be input to the RGB generation. -
Introduced new (ortho-)rectification algorithm allowing reprojection of satellite images that come with (terrain-corrected) geo-locations for every pixel.
- new CLI tool
xcube rectify - new API function
xcube.core.rectify.rectify_dataset()
- new CLI tool
-
Utilizing the new rectification in
xcube gentool. It is now the default reprojection method inxcube.core.gen.iproc.XYInputProcessorandxcube.core.gen.iproc.DefaultInputProcessor, if ground control points are not specified, i.e. the input processor is configured withxy_gcp_step=None. (#206) -
Tile sizes for rectification in
xcube genare now derived fromoutput_writer_paramsif given in configuration and if it contains achunksizesparameter for 'lat' or 'lon'. This will force the generation of a chunked xcube dataset and will utilize Dask arrays for out-of-core computations. This is very useful for large data cubes whose time slices would otherwise not fit into memory. -
Introduced new function
xcube.core.select.select_spatial_subset(). -
Renamed function
xcube.core.select.select_vars()intoxcube.core.select.select_variables_subset(). -
Now supporting xarray and numpy functions in expressions used by the
xcube.core.evaluate.evaluate_dataset()function and in the configuration of thexcube gentool. You can now usexrandnpcontexts in expressions, e.g.xr.where(CHL >= 0.0, CHL). (#257) -
The performance of the
xcube gentool for the case that expressions or expression parts are reused across multiple variables can now be improved. Such as expressions can now be assigned to intermediate variables and loaded into memory, so they are not recomputed again. For example, let the expressionquality_flags.cloudy and CHL > 25.0occur often in the configuration, then this is how recomputation can be avoided:processed_variables: no_cloud_risk: expression: not (quality_flags.cloudy and CHL_raw > 25.0) load: True CHL: expression: CHL_raw valid_pixel_expression: no_cloud_risk ... -
Added ability to write xcube datasets in Zarr format into object storage bucket using the xcube python api
xcube.core.dsio.write_cube(). (#224) The user needs to pass provide user credentials viaclient_kwargs = {'provider_access_key_id': 'user_id', 'provider_secret_access_key': 'user_secret'}and write to existing bucket by executing
write_cube(ds1, 'https://s3.amazonaws.com/upload_bucket/cube-1-250-250.zarr', 'zarr', client_kwargs=client_kwargs) -
Added new CLI tool
xcube tilewhich is used to generate a tiled RGB image pyramid from any xcube dataset. The format and file organisation of the generated tile sets conforms to the TMS 1.0 Specification (#209). -
The configuration of
xcube servehas been enhanced to support augmentation of data cubes by new variables computed on-the-fly (#272). You can now add a sectionAugmentationinto a dataset descriptor, e.g.:Datasets: - Identifier: abc ... Augmentation: Path: compute_new_vars.py Function: compute_variables InputParameters: ... - ...
where
compute_variablesis a function that receives the parent xcube dataset and is expected to return a new dataset with new variables. -
The
xcube servetool now provides basic access control via OAuth2 bearer tokens (#263). To configure a service instance with access control, add the following to thexcube serveconfiguration file:Authentication: Domain: "<your oauth2 domain>" Audience: "<your audience or API identifier>"Individual datasets can now be protected using the new
AccessControlentry by configuring theRequiredScopesentry whose value is a list of required scopes, e.g. "read:datasets":Datasets: ... - Identifier: <some dataset id> ... AccessControl: RequiredScopes: - "read:datasets"If you want a dataset to disappear for authorized requests, set the
IsSubstituteflag:Datasets: ... - Identifier: <some dataset id> ... AccessControl: IsSubstitute: true
-
The
xcube servetool now also allows for per-dataset configuration of chunk caches for datasets read from remote object storage locations. Chunk caching avoids recurring fetching of remote data chunks for same region of interest. It can be configured as default for all remote datasets at top-level of the configuration file:DatasetChunkCacheSize: 100Mor in individual dataset definitions:
Datasets: - Identifier: ... ChunkCacheSize: 2G ... -
Retrieval of time series in Python API function
xcube.core.timeseries.get_time_series()has been optimized and is now much faster for point geometries. This enhances time-series performance ofxcube serve.- The log-output of
xcube servenow contains some more details time-series request so performance bottlenecks can be identified more easily fromxcube-serve.log, if the server is started together with the flag--traceperf.
- The log-output of
-
CLI command
xcube resamplehas been enhanced by a new value for the frequency option--frequency allWith this value it will be possible to create mean, max , std, ... of the whole dataset, in other words, create an overview of a cube. By Alberto S. Rabaneda. -
The
xcube servetool now also serves dataset attribution information which will be displayed in the xcube-viewer's map. To add attribution information, use theDatasetAttributionin to yourxcube serveconfiguration. It can be used on top-level (for all dataset), or on individual datasets. Its value may be a single text entry or a list of texts: For example:DatasetAttribution: - "© by Brockmann Consult GmbH 2020, contains modified Copernicus Data 2019, processed by ESA." - "Funded by EU H2020 DCS4COP project."
-
The
xcube gentool now always produces consolidated xcube datasets when the output format is zarr. Furthermore when appending to an existing zarr xcube dataset, the output now will be consolidated as well. In addition,xcube gencan now append input time slices to existing optimized (consolidated) zarr xcube datasets. -
The
unchunk_coordskeyword argument of Python API functionxcube.core.optimize.optimize_dataset()can now be a name, or list of names
of the coordinate variable(s) to be consolidated. If booleanTrueis used all variables will be consolidated. -
The
xcube serveAPI operationsdatasets/anddatasets/{ds_id}now also return the metadata attributes of a given dataset and it variables in a property namedattrs. For variables we added a new metadata propertyhtmlReprthat is a string returned by a variable'svar.data._repr_html_()method, if any. -
Renamed default log file for
xcube servecommand toxcube-serve.log. -
xcube gennow immediately flushes logging output to standard out
- Removing false user warning about custom SNAP colormaps when starting
xcube servecommand.
- Added new parameter in
xcube gencalled--no_sort. Using--no_sort, the input file list wont be sorted before creating the xcube dataset. If--no_sortparameter is passed, order the input list will be kept. The parameter--sortis deprecated and the input files will be sorted by default. - xcube now discovers plugin modules by module naming convention and by Setuptools entry points. See new chapter Plugins in xcube's documentation for details. (#211)
- Added new
xcube computeCLI command andxcube.core.compute.compute_cube()API function that can be used to generate an output cube computed from a Python function that is applied to one or more input cubes. Replaces the formerly hiddenxcube applycommand. (#167) - Added new function
xcube.core.geom.rasterize_features()to rasterize vector-data features into a dataset. (#222) - Extended CLI command
xcube verifyand API functionxcube.core.verify.verify_cubeto check whether spatial coordinate variables and their associated bounds variables are equidistant. (#231) - Made xarray version 0.14.1 minimum requirement due to deprecation of xarray's
Dataset.dropmethod and replaced it withdrop_selanddrop_varsaccordingly.
- CLI commands execute much faster now when invoked with the
--helpand--infooptions. - Added
serverPIDproperty to response of web API info handler. - Functions and classes exported by following modules no longer require data cubes to use
the
lonandlatcoordinate variables, i.e. using WGS84 CRS coordinates. Instead, the coordinates' CRS may be a projected coordinate system and coordinate variables may be calledxandy(#112):xcube.core.newxcube.core.geomxcube.core.schemaxcube.core.verify
- Sometimes the cell bounds coordinate variables of a given coordinate variables are not in a proper,
CF compliant
order, e.g. for decreasing latitudes
latthe respective bounds coordinatelat_bndsis decreasing forlat_bnds[:, 0]andlat_bnds[:, 1], butlat_bnds[i, 0] < lat_bnds[i, 1]for alli. xcube is now more tolerant w.r.t. to such wrong ordering of cell boundaries and will compute the correct spatial extent. (#233) - For
xcube serve, any undefined color bar name will default to"viridis". (#238)
xcube resamplenow correctly re-chunks its output. By default, chunking of thetimedimension is set to one. (#212)
The following changes introduce incompatibilities with former xcube 0.2.x versions.
-
The function specified by
xcube_pluginsentry points now receives an single argument of typexcube.api.ExtensionRegistry. Plugins are asked to add their extensions to this registry. As an example, have a look at the defaultxcube_pluginsentry points in./setup.py. -
xcube.api.compute_dataset()function has been renamed toxcube.api.evaluate_dataset(). This has been done in order avoid confusion with new API functionxcube.api.compute_cube(). -
xcube's package structure has been drastically changed:
- all of xcube's
__init__.pyfiles are now empty and no longer have side effects such as sub-module aggregations. Therefore, components need to be imported from individual modules. - renamed
xcube.apiintoxcube.core - moved several modules from
xcube.utilintoxcube.core - the new
xcube.constantsmodule contains package level constants - the new
xcube.pluginmodule now registers all standard extensions - moved contents of module
xcube.api.readwriteintoxcube.core.dsio. - removed functions
read_cubeandread_datasetasopen_cubeandopen_datasetare sufficient - all internal module imports are now absolute, rather than relative
- all of xcube's
- Added new CLI tool
xcube editand API functionxcube.api.edit_metadatawhich allows editing the metadata of an existing xcube dataset. (#170) xcube servenow recognises xcube datasets with metadata consolidated by thexcube opmimizecommand. (#141)
xcube gennow parses time stamps correcly from input data. (#207)- Dataset multi-resolution pyramids (
*.levelsdirectories) can be stored in cloud object storage and are now usable withxcube serve(#179) xcube optimizenow consolidates metadata only after consolidating coordinate variables. (#194)- Removed broken links from
./README.md(#197) - Removed obsolete entry points from
./setup.py.
- Added first version of the xcube documentation generated from
./docsfolder.
-
Reorganisation of the Documentation and Examples Section (partly addressing #106)
-
Loosened python conda environment to satisfy conda-forge requirements
-
xcube is now available as a conda package on the conda-forge channel. To install latest xcube package, you can now type:
conda install -c conda-forge xcube -
Changed the unittesting code to minimize warnings reported by 3rd-party packages
-
Making CLI parameters consistent and removing or changing parameter abbreviations in case they were used twice for different params. (partly addressing #91) For every CLI command which is generating an output a path must be provided by the option
-o,--output. If not provided by the user, a default output_path is generated. The following CLI parameter have changed and their abbreviation is not enabled anymore :xcube gen -vis now onlyxcube gen --varsorxcube gen --variablesxcube gen -pis nowxcube gen -Pxcube gen -iis nowxcube gen -Ixcube gen -ris nowxcube gen -Rxcube gen -sis nowxcube gen -Sxcube chunk -cis nowxcube chunk -Cxcube level -lis nowxcube level -Lxcube dump -vis nowxcube dump --variableorxcube dump --varxcube dump -eis nowxcube dump -Excube vars2dim -vis nowxcube vars2dim --variableorxcube vars2dim --varxcube vars2dim --var_nameis nowxcube vars2dim --variableorxcube vars2dim --varxcube vars2dim -dis nowxcube vars2dim -Dxcube grid res -dis nowxcube grid res -Dxcube grid res -cis nowxcube grid res --covorxcube grid res --coveragexcube grid res -nis nowxcube grid res -Norxcube grid res --num_resultsxcube serve -pis nowxcube serve -Pxcube serve -ais nowxcube serve -A
-
Added option
inclStDevandinclCountquery parameters tots/{dataset}/{variable}/geometryand derivates. If used withinclStDev=1, Xcube Viewer will show error bars for each time series point. -
xcube.api.new_cubefunction now accepts callables as values for variables. This allows to compute variable values depending on the (t, y, x) position in the cube. Useful for testing. -
xcube.apinow exports theMaskSetclass which is useful for decoding flag values encoding following the CF conventions. -
Added new CLI tool
xcube optimizeand API functionxcube.api.optimize_datasetoptimizes data cubes for cloud object storage deployment. (#141) -
Added two new spatial dataset operations to Python API
xcube.api(#148):mask_dataset_by_geometry(dataset, geometry)clip and mask a dataset by geometryclip_dataset_by_geometry(dataset, geometry)just clip a dataset by geometry
-
Changed the dev version tag from 0.2.0.dev3 to 0.2.0.dev
-
The behavior of web API
/datasets?details=1has changed. The call no longer includes associated vector data as GeoJSON. Instead new API has beed added to fetch new vector data on demand:/datasets/{dataset}/placesand/datasets/{dataset}/places/{place}(#130) -
xcube serveaccepts custom SNAP colormaps. The path to a SAP .cpd file can be passed via the server configuration file with the paramter [ColorFile] instead of [ColorBar]. (#84) -
xcube servecan now be configured to serve cubes that are associated with another cube with same data but different chunking (#115). E.g. using chunks such astime=512,lat=1,lon=1can drastically improve time-series extractions. Have a look at the demo config inxube/webapi/res/demo/config.yml. -
xcube servedoes now offer a AWS S3 compatible data access API (#97): -
xcube servenow verifies that a configured cube is valid once it is opened. (#107) -
Added new CLI command
xcube verifyperforming xcube dataset verification. (#19) -
Reworked
xcube extractto be finally useful and effective for point data extraction. (#102) -
xcube servercan now filter datasets by point coordinate, e.g./datasets?point=12.5,52.8. (#50) -
xcube servercan now limit time series to a maximum number of valid (not NaN) values. To activate, pass optional query parametermaxValidsto the various/tsfunctions. The special value-1will restrict the result to contain only valid values. (#113) -
Reworked
xcube gento be more user-friendly and more consistent with other tools. The changes are- Removed
--dirand--nameoptions and replaced it by single--outputoption, whose default value isout.zarr. (#45) - The
--formatoption no longer has a default value. If not given, format is guessed from--outputoption. - Renamed following parameters in the configuration file:
input_filesintoinput_paths, also because paths may point into object storage locations (buckets);output_fileintooutput_path, to be consistent withinput_paths.
- Removed
-
Added new CLI command
xcube prune. The tool deletes all block files associated with empty (NaN- only) chunks in given INPUT cube, which must have ZARR format. This can drastically reduce files in sparse cubes and improve cube reading performance. (#92) -
xcube servehas a newprefixoption which is a path appended to the server's host. Theprefixoption replaces thenameoption which is now deprecated but kept for backward compatibility. (#79) -
Added new CLI command
xcube resamplethat is used to generate temporarily up- or downsampled data cubes from other data cubes. -
xcube servecan now be run with xcube dataset paths and styling information given via the CLI rather than a configuration file. For examplexcube serve --styles conc_chl=(0,20,"viridis") /path/to/my/chl-cube.zarr. This allows for quick inspection of newly generated cubes viaxcube gen. Also added option--showthat starts the Xcube viewer on desktop environments in a browser. -
Added new
xcube applycommand that can be used to generate an output cube computed from a Python function that is applied to one or more input cubes. The command is still in development and therefore hidden. -
Added new
xcube timeitcommand that can be used to measure the time required for parameterized command invocations. The command is still in development and therefore hidden. -
Added global
xcube --scheduler SCHEDULERoption for Dask distributed computing (#58) -
Added global
xcube --tracebackoption, removed localxcube gen --tracebackoption -
Completed version 1 of an xcube developer guide.
-
Added
xcube servecommand (#43) -
xcube serve: Time-series web API now also returns "uncertainty" (#48) -
Added
xcube levelcommand to allow for creating spatial pyramid levels (#38) -
xcube genaccepts multiple configuration files that will be merged in order (#21) -
Added
xcube genoption--sortwhen input data list should be sorted (#33) -
Added
xcube vars2dimcommand to make variables a cube dimension (#31) -
Added
xcube serveoption--traceperfthat allows switching on performance diagnostics. -
Included possibility to read the input file paths from a text file. (#47)
-
Restructured and clarified code base (#27)
-
Moved to Python 3.7 (#25)
-
Excluding all input processors except for the default one. They are now plugins and have own repositories within the xcube's organisation. (#49)
xcube genCLI now updates metadata correctly. (#181)- It was no longer possible to use the
xcube genCLI with--procoption. (#120) totalCountattribute of time series returned by Web APIts/{dataset}/{variable}/{geom-type}now contains the correct number of possible observations. Was always1before.- Renamed Web API function
ts/{dataset}/{variable}/placesintots/{dataset}/{variable}/features. xcube genis now taking care that when new time slices are added to an existing cube, this is done by maintaining the chronological order. New time slices are either appended, inserted, or replaced. (#64) (#139)- Fixed
xcube serveissue with WMTS KVP methodGetTilewith query parametertimewhose value can now also have the two forms<start-date>/<end-date>and just<date>. (#132) - Fixed
xcube extractregression that stopped working after Pandas update (#95) - Fixed problem where CTRL+C didn't function anymore with
xcube serve. (#87) - Fixed error
indexes along dimension 'y' are not equaloccurred when usingxcube genwith processed variables that used flag values (#86) - Fixed
xcube serveWMTS KVP API to allow for case-insensitive query parameters. (#77) - Fixed error in plugins when importing
xcube.api.gen(#62) - Fixed import of plugins only when executing
xcube.cli(#66)
- Respecting chunk sizes when computing tile sizes #44
- The RESTful tile operations now have a query parameter
debug=1which toggles tile computation performance diagnostics. - Can now associate place groups with datasets.
- Major revision of API. URLs are now more consistent.
- Request for obtaining a legend for a layer of given by a variable of a data set was added.
- Added a Dockerfile to build an xcube docker image and to run the demo
- The RESTful time-series API now returns ISO-formatted UTC dates #26