Skip to content

error loading datacube, time dimension mismatched time coordinate #5

@erikduijm

Description

@erikduijm

While working on part 1 of the fundamentals, under explore more, I tried to load the ERA5 precipitation data to compare with the CEH precipitation data.

image

All I do is query the ERA5 collection, and save it as a datacube. Then save the datacube as a .nc file and then read it as in the practical tutorial.

`collection_id_era5 = "Global weather (ERA5)"

Define the start and end time for the data query

start = "2007-01-01T11:00:00Z"
end = "2007-12-31T11:00:00Z"

Define the bounding box for the data query

west = -0.48
south = 53.709
east = -0.22
north = 53.812

Define the bands for the data query

bands = ["Total precipitation"]

data_cube = geodn_discovery.query(
collection_id = collection_id_era5,
bands = bands,
temporal_extent = {"start": start, "end": end},
spatial_extent = {"west": west, "south": south, "east": east, "north": north},
)

filename = "total_precip.nc"
geodn_discovery.save(data_cube, filename, force=True)`

This works but I can't then read the file

# the loading fails: path = "data/" + filename x_data_era5 = geodn_discovery.open_datacube(path) x_data_era5

Gives the error:
ValueError: conflicting sizes for dimension 'time': length 17474 on the data but length 8737 on coordinate 'time'

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