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

Updated model API #354

Merged
merged 27 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e63e7d2
Core proposal for new model interface
Peter9192 Jun 13, 2023
08da73d
Move concept to replace the original api
Peter9192 Jun 14, 2023
0336861
Add class for dealing with container image names and verisons
Peter9192 Jun 14, 2023
20de9df
wip - use new interface for pcrglobwb
Peter9192 Jun 14, 2023
e58c3d5
Use new api in pcrglob and provide default implementation for coords …
Peter9192 Jun 15, 2023
56f8c1a
use optionaldestbmi wrapper
Peter9192 Jun 15, 2023
6541406
fix flake8 and type issues in base/model.py
Peter9192 Jun 15, 2023
ff84bbc
Make ContainerImage subclass of str and add validation to it
Peter9192 Jun 15, 2023
40b80e4
Fix types and flakes in container and pcrglob model
Peter9192 Jun 15, 2023
16b7eb7
add tests for containerimage
Peter9192 Jun 16, 2023
a384061
Use validators to process received parametersets and forcing; pcrglob…
Peter9192 Jun 16, 2023
faf4b07
Move wflow to new model interface
BSchilperoort Jul 24, 2023
ee6352f
Fix typing issues, improve wflow implementation
BSchilperoort Jul 24, 2023
b336979
Move hype to new model api, fix hype tests
BSchilperoort Jul 24, 2023
4cda895
Make cfg dir and file pydantic privateattrs
BSchilperoort Jul 25, 2023
54a7b80
Add type assertion, pydantic (v1) seems unreliable
BSchilperoort Jul 25, 2023
156ad1b
Fix wflow tests
BSchilperoort Jul 25, 2023
b9fae33
Make _make_cfg_dir reusable
BSchilperoort Jul 25, 2023
054a011
Move marrmot to new api, fix tests
BSchilperoort Jul 25, 2023
f9d490a
Improve _make_cfg_dir, fix tests
BSchilperoort Jul 26, 2023
380979c
Add version nrs, start move to post_init
BSchilperoort Jul 26, 2023
2928b59
Add preliminary parameter set version check
BSchilperoort Jul 27, 2023
6bc3cee
Move lisflood to new API, fix tests
BSchilperoort Jul 27, 2023
73e4fee
Merge remote-tracking branch 'origin/main' into defaultmodels
Peter9192 Jul 27, 2023
422550b
fix some tests
Peter9192 Jul 27, 2023
9baf4de
fix setup of pcrglobwb (failing test)
Peter9192 Jul 27, 2023
11617db
fix more tests
Peter9192 Jul 27, 2023
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
4 changes: 2 additions & 2 deletions src/ewatercycle/base/model.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Base classes for eWaterCycle models."""

import abc
import logging
import datetime
import logging
from datetime import timezone
from pathlib import Path
from typing import Any, Iterable, Optional, Type, cast
Expand Down Expand Up @@ -353,7 +353,7 @@ def get_latlon_grid(self, name) -> tuple[Any, Any, Any]:
name: Name of the variable
"""
grid_id = self._bmi.get_var_grid(name)
shape = self._bmi.get_grid_shape(name)
shape = self._bmi.get_grid_shape(grid_id)
grid_lon = self._bmi.get_grid_x(grid_id)
grid_lat = self._bmi.get_grid_y(grid_id)
return grid_lat, grid_lon, shape
Expand Down
Loading
Loading