Skip to content

xcube gen2 CLI doesn't append to the datacube when using multiple nc files as a source #1158

@pierostz

Description

@pierostz

Hello,

I am trying to create datacubes from multiple netCDF4 files, based on this config and xcube gen2 CLI command. The dataset I am using is netCDF4 files downloaded from CAMS (Copernicus).
xcube gen2 config/no2/no2_l50.yml

The config is like this:

input_config:
  store_id: file
  data_id: l50.nc
  store_params:
    root: /app/data/no2

cube_config:
  variable_names: ["no2"]
  crs: "WGS84"
  bbox: [-24.95, 30.05, 44.95, 71.95]
  spatial_res: 0.1

output_config:
  store_id: file
  data_id: no2_l50.zarr
  store_params:
    root: /app/data/cubes
  replace: false

With the replace: true this command works fine but is not what I try to achieve. When I use replace: false I get this error: ERROR: Failed to write dataset '/app/data/cubes/no2_l50.zarr': path '' contains a group

The endgoal is:

  1. Download netCDF4 datasets from CAMS.
  2. Append the new datatsets to the datacube

I have also tried the xcube gen command, which I can see from the docs is deprecated, therefore the focus on the gen2 command. On that case though, what I experienced is that the netCDF files should be slices per time dimension and then use the -a parameter of the command to append. As I can see the time slicing needs to be done with the python API also.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions