0

I have prepared a catalog.yml with this content:

metadata:
  description: Sample catalog
    information.
  version: 1
plugins:
  source:
    - module: intake_xarray
sources:
  this_source:
    args:
      storage_options:
        client_kwargs:
          endpoint_url: https://mys3
          verify: false
        key: mykey
        secret: mysecret
      urlpath: s3://thispath/{{ date.strftime('%Y/%m/%Y%m%d') }}.nc
      chunks: {}
      xarray_kwargs:
        engine: h5netcdf
    description: CREATE sample
    driver: netcdf
    metadata: {}
    parameters:
      date:
        default: '2025-01-01T00:00:00'
        description: Date and hour of data.
        min: '2020-01-01T00:00:00'
        type: datetime

then I tried to open the dataset in this way:

from datetime import datetime
import intake

cat = intake.open_catalog('catalog.yml')
ds = cat.this_source(date=datetime(2024, 1, 1)).read()

My problem is that the output data is related to default date value (2025-01-01) whatever value I pass to the reader.

Indeed, it seems that the input parameter value is not used by the reader. I verified the same approach/syntax with an Intake csv source and it works perfectly.

How can I fix this issue?

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.