Skip to content

Refactor Dataset Module - #101

Draft
xiqiangliu wants to merge 54 commits into
masterfrom
dataset-refactor
Draft

Refactor Dataset Module#101
xiqiangliu wants to merge 54 commits into
masterfrom
dataset-refactor

Conversation

@xiqiangliu

Copy link
Copy Markdown
Collaborator

No description provided.

HRRR 3D Wind dataset now contains 10/80m AGL
and 4 hybrid levels.
@xiqiangliu
xiqiangliu requested a review from Copilot April 1, 2025 23:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]

Copilot AI Apr 1, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]

Copilot uses AI. Check for mistakes.
Fixed typo with variable "d2m". Now reads 2m_dewpoint_temperature instead of 2m_dew_point_temperature
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.

3 participants