Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding caravan forcing #407

Merged
merged 55 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
549879d
adding caravan forcing class.
Daafip Apr 9, 2024
a9edeea
forgot to pass basin_id correctly
Daafip Apr 9, 2024
3c9639d
wrong path
Daafip Apr 9, 2024
27ed1d0
specifiy output path for extraction
Daafip Apr 9, 2024
290460b
wrong var_name path
Daafip Apr 9, 2024
ad13709
replacing geopandas and wget
Daafip Apr 10, 2024
2f1e225
adding lat/lon to dimensions based on shape
Daafip Apr 10, 2024
e339a81
issue with to_array(), should be to_numpy()
Daafip Apr 10, 2024
a0fd925
wrong dataset
Daafip Apr 10, 2024
693d2c6
wrong dataset ref
Daafip Apr 10, 2024
add464c
move basin properties to coordinates
Daafip Apr 10, 2024
5903b6c
Visual tweaks based on sonarcloud feedback
Daafip Apr 10, 2024
765bd94
change intersection to union
Daafip Apr 10, 2024
5abb673
back to intersection, change order
Daafip Apr 10, 2024
711c5a6
add rename era5 dict for now
Daafip Apr 10, 2024
7087f09
also rename variables tuple
Daafip Apr 10, 2024
1968ff4
add example
Daafip Apr 10, 2024
6eade11
running pre-commit & refactoring accoring to suggestions
Daafip Apr 11, 2024
e889298
refactor name, calling `generate` throws exception
Daafip Apr 12, 2024
982dd2c
Fix CI problems
Daafip Apr 12, 2024
9bad2e0
Debug failing test
Daafip Apr 16, 2024
c7bc51d
Couldn't get temp file to work ('only' 30mb)
Daafip Apr 16, 2024
dc01ebd
change config, remove old test file
Daafip Apr 18, 2024
21d33d0
re-add files
Daafip Apr 18, 2024
0975961
should be `types-requests`
Daafip Apr 18, 2024
639b98c
swap requests with urllib3
Daafip Apr 18, 2024
9b9c0b0
pre-commit changes
Daafip Apr 18, 2024
64ad794
recheck tests
Apr 19, 2024
6f91b17
readd failing line
Apr 19, 2024
c0059cd
Check if both pass without failing test
Apr 19, 2024
f6cf841
Adding test & test data
Apr 22, 2024
eb24d8d
Run pre-commit, fix formatting
Apr 22, 2024
3fc069e
still failing black-jupyter linter
Apr 22, 2024
4ee6157
Fix import sorting, formatting
BSchilperoort Apr 26, 2024
aac3095
Remove "end-of-file" hook: unconfigurable to ignore shapefiles
BSchilperoort Apr 26, 2024
115cc4d
Pin sonar workflow instead of using master
BSchilperoort Apr 26, 2024
09cd6da
mocking get_dataset correctly
Apr 26, 2024
e0b9116
Re adding failing test test_util.test_merge_esmvaltool_datasets
Apr 26, 2024
db8ff02
adjust & run pre-commit
Daafip Apr 29, 2024
fa8cfd5
fixing indent in .pre-commit
Apr 29, 2024
7c8d7d3
test new generate object
Daafip May 2, 2024
e794b74
change path in test
Daafip May 2, 2024
21dd522
add link to example notebook
Daafip May 2, 2024
db621ed
Merge pull request #1 from Daafip/dev
Daafip May 2, 2024
f598631
fix failing pre-commit tests
Daafip May 2, 2024
515e50c
Merge branch 'dev'
Daafip May 2, 2024
84a5058
issues with tests/setting variables correctly aftere refactor
Daafip May 2, 2024
b9914e3
re-add failing test
Daafip May 2, 2024
771d360
ensure history is also copied
Daafip May 2, 2024
bd77de2
final tweaks & changelog
Daafip May 2, 2024
d4d4eec
Merge branch 'eWaterCycle:main' into main
Daafip May 2, 2024
36d1036
Update CHANGELOG.md
Daafip May 2, 2024
3889784
catch missing basin_id correctly
Daafip May 2, 2024
922d856
make basin_ids more findable
Daafip May 2, 2024
bffaa63
Merge branch 'main' of github.com:Daafip/ewatercycle
Daafip May 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Formatted as described on [https://keepachangelog.com](https://keepachangelog.co
- Added the `input_var_names` property to the eWaterCycle model class, to accompany the existing `output_var_names` property ([#403](https://github.com/eWaterCycle/ewatercycle/pull/403)).
- Added the `var_units` method to the eWaterCycle model class, to mirror PyMT ([#403](https://github.com/eWaterCycle/ewatercycle/pull/403)).
- Added a note on the time units that eWaterCycle expects models to provide to the documentation ([#403](https://github.com/eWaterCycle/ewatercycle/pull/403)).
- Added LumpedCaravan forcing, allows retrival of single basin from 4tu.nl rather than downloading the whole dataset. ([#407](https://github.com/eWaterCycle/ewatercycle/pull/407))
Daafip marked this conversation as resolved.
Show resolved Hide resolved

### Changed
- If a model plugin raises an exception during the loading of the model entry points, a more clear exception is raised which guides the users on how to solve the error ([#404](https://github.com/eWaterCycle/ewatercycle/pull/404)).
Expand Down
1 change: 0 additions & 1 deletion src/ewatercycle/_forcings/caravan.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ def generate( # type: ignore[override]
basin_id: str containing the wanted basin_id.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add where the user can lookup the basin ID?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

See this is where geopandas would be nice :p, but will add a function which lets the user explore the dataset(ids).

Copy link
Contributor

Choose a reason for hiding this comment

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

I was hoping more for something like a webpage listing the basin_id's together with river/basin names, country, etc. I guess that doesn't exist?

Copy link
Collaborator Author

@Daafip Daafip May 2, 2024

Choose a reason for hiding this comment

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

Nope, but what i do now is list the datasets in a seperate function. That way the user can get the dataset as netcdf and a list of basin ID's

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For advanced users this will do, for more novice users choosing a single catchment: likely they will have to download the combinedshapefile, load this into GIS and pick one

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was hoping more for something like a webpage listing the basin_id's together with river/basin names, country, etc. I guess that doesn't exist?

would be pretty easy to make an interactive folium/leaflet map out of this actually! Similar to this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Lets continue this discussion in issues: #398


"""
assert type(dataset) == str
basin_id = kwargs["basin_id"]
BSchilperoort marked this conversation as resolved.
Show resolved Hide resolved
Daafip marked this conversation as resolved.
Show resolved Hide resolved

dataset = basin_id.split("_")[0]
Expand Down
Loading