Refactor Dataset Module - #101
Draft
xiqiangliu wants to merge 54 commits into
Draft
Conversation
… daily frequency handling
…coordinate handling
HRRR 3D Wind dataset now contains 10/80m AGL and 4 hybrid levels.
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the dataset modules by reorganizing the structure and standardizing download/preprocessing methods for MERRA2, HRRR, and ERA5 datasets while updating dependencies in the build configuration.
- Introduces new init.py and _base.py modules across the dataset providers
- Implements consistent download and preprocessing routines using external libraries (FastHerbie, cdsapi)
- Updates dependency versions and optional dependency sets in pyproject.toml
Reviewed Changes
Copilot reviewed 28 out of 30 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/geodata/datasets/merra2/hourly/init.py | Adds module exports for hourly MERRA2 datasets |
| src/geodata/datasets/merra2/_base.py | Introduces dataset base functions for MERRA2 support |
| src/geodata/datasets/hrrr/hourly/wind_solar.py | Implements hourly download and preprocessing for HRRR wind/solar |
| src/geodata/datasets/hrrr/hourly/wind_3d.py | Implements HRRR 3D wind download with level handling |
| src/geodata/datasets/hrrr/_base.py | Establishes HRRR base dataset functionality and temp file cleanup |
| src/geodata/datasets/hrrr/hourly/init.py | Consolidates HRRR hourly exports |
| src/geodata/datasets/era5/monthly/wind_solar.py | Adds monthly download logic for ERA5 wind/solar datasets |
| src/geodata/datasets/era5/monthly/init.py | Exports monthly ERA5 wind/solar dataset |
| src/geodata/datasets/era5/hourly/wind_solar.py | Provides hourly download logic for ERA5 wind/solar datasets |
| src/geodata/datasets/era5/hourly/wind_3d.py | Provides hourly download logic for ERA5 3D wind datasets |
| src/geodata/datasets/era5/hourly/init.py | Consolidates ERA5 hourly dataset exports |
| src/geodata/datasets/era5/_base.py | Establishes ERA5 base dataset functionality and preprocessing |
| src/geodata/datasets/era5/init.py | Exports ERA5 datasets (both hourly and monthly) |
| pyproject.toml | Updates dependency versions and optional dependency groups |
Files not reviewed (2)
- .devcontainer/Dockerfile: Language not supported
- .devcontainer/devcontainer.json: Language not supported
| ).astype("float32") | ||
| ds = ds.rename({"hybrid": "level"}).sortby("level") | ||
|
|
||
| ds["level"].values[-2:] = [-1, -2] |
There was a problem hiding this comment.
Hard-coded assignment of negative level values may lead to unexpected results if the dataset structure changes. Consider computing the level values dynamically or adding a comment that clearly explains the rationale behind this transformation.
Suggested change
| ds["level"].values[-2:] = [-1, -2] | |
| min_level = ds["level"].min().item() | |
| ds["level"].values[-2:] = [min_level - 1, min_level - 2] |
xiqiangliu
force-pushed
the
dataset-refactor
branch
from
April 9, 2025 23:44
a549a71 to
fa53f56
Compare
xiqiangliu
force-pushed
the
dataset-refactor
branch
from
April 16, 2025 17:40
8d70dd8 to
44408bc
Compare
xiqiangliu
force-pushed
the
dataset-refactor
branch
from
April 16, 2025 17:58
44408bc to
aa38c44
Compare
xiqiangliu
force-pushed
the
dataset-refactor
branch
from
April 17, 2025 17:52
52d5c4c to
0ebd54e
Compare
xiqiangliu
force-pushed
the
dataset-refactor
branch
from
April 17, 2025 17:59
0ebd54e to
bbac2c4
Compare
xiqiangliu
force-pushed
the
dataset-refactor
branch
from
April 17, 2025 18:19
f2cb5ed to
3c19d2c
Compare
refactor: update dataset validation in AtomicDataset and BaseModel fix: enhance wind interpolation logic and dataset rechunking utility
1. support quick check of model results 2. prevent estimation when model is not prepared 3. proper max_workers parsing
- adding 2m dew point temperature for relative humidity calculation
xiqiangliu
force-pushed
the
dataset-refactor
branch
from
June 12, 2025 05:21
ab9e6ba to
edf8601
Compare
Fixed typo with variable "d2m". Now reads 2m_dewpoint_temperature instead of 2m_dew_point_temperature
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.