Skip to content

Commit

Permalink
Fix GFS time limit (#4)
Browse files Browse the repository at this point in the history
* Updating GFS limit

* Change log
  • Loading branch information
NickGeneva authored Apr 10, 2024
1 parent c752937 commit 5bf3b9a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
12 changes: 8 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
<!-- markdownlint-disable MD024 -->
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.0] - 2024-04-XX
## [0.2.0] - 2024-xx-xx

### Added

- Initial Release of earth2studio
- SFNO model `sfno_73ch_small`.

### Changed

### Deprecated
Expand All @@ -23,3 +21,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Security

### Dependencies

## [0.1.0] - 2024-04-22

### Added

- Initial Release of earth2studio
4 changes: 2 additions & 2 deletions earth2studio/data/gfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ def _validate_time(self, times: list[datetime]) -> None:
f"Requested date time {time} needs to be 6 hour interval for GFS"
)
# To update search "gfs." at https://noaa-gfs-bdp-pds.s3.amazonaws.com/index.html
if time < datetime(year=2021, month=2, day=20):
if time < datetime(year=2021, month=2, day=17):
raise ValueError(
f"Requested date time {time} needs to be after February 20th, 2021 for GFS"
f"Requested date time {time} needs to be after February 17th, 2021 for GFS"
)

if not self.available(time):
Expand Down
2 changes: 1 addition & 1 deletion test/data/test_gfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def test_gfs_cache(time, variable, cache):
@pytest.mark.parametrize(
"time",
[
datetime.datetime(year=2021, month=2, day=19),
datetime.datetime(year=2021, month=2, day=16),
datetime.datetime(year=2023, month=1, day=1, hour=13),
datetime.datetime.now(),
],
Expand Down

0 comments on commit 5bf3b9a

Please sign in to comment.