Skip to content

Fix CDS and MARS date parameter normalization and validation - #565

Open
ksic8 wants to merge 1 commit into
mainfrom
fix-year-month-and-no-cache
Open

ksic8 wants to merge 1 commit into
mainfrom
fix-year-month-and-no-cache

Conversation

@ksic8

@ksic8 ksic8 commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

Normalizes and validates [selection] date and cache parameters across weather-dl and weather-dl-v2 so requests sent to standard CDS, MARS-brokered CDS, and direct MARS all use supported syntax:

  • year-month: Expand each partitioned YYYY-MM into explicit YYYY-MM-DD dates (accepted by both CDS and MARS, since standard CDS rejects start/to/end syntax) and enforce year-month in partition_keys.
  • date_range: Expand D1/to/D2[/by/N] into explicit YYYY-MM-DD dates for standard CDS requests, while preserving compact D1/to/D2 syntax for MARS and MARS-brokered CDS datasets.
  • year, month, day: Normalize explicit day values (in addition to day=all) into explicit valid calendar YYYY-MM-DD dates when targeting MARS or MARS-brokered CDS datasets (skipping out-of-month dates such as Feb 30/31), while keeping native year/month/day untouched for standard CDS datasets.
  • hdate: Reject hdate early on standard CDS and ERA5 reanalysis (class=ea) configs where it is unsupported or silently ignored.
  • no_cache: Fix case-insensitive handling (no_cache == "true") and update Configuration.md.
  • Tests & Versions: Add unit tests in config_test.py and parsers_test.py, and bump package/service versions.

@ksic8
ksic8 requested a review from DarshanSP19 November 23, 2026 16:44
@ksic8
ksic8 requested a review from mahrsee1997 November 30, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant