From 5747b975aa813cc949d8d5d0d45563f4a2e481b0 Mon Sep 17 00:00:00 2001 From: Austin Raney Date: Tue, 21 Nov 2023 15:07:43 -0500 Subject: [PATCH 1/3] add SoilFreezeThaw model; WIP --- .../src/ngen/config/soil_freeze_thaw.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 python/ngen_conf/src/ngen/config/soil_freeze_thaw.py diff --git a/python/ngen_conf/src/ngen/config/soil_freeze_thaw.py b/python/ngen_conf/src/ngen/config/soil_freeze_thaw.py new file mode 100644 index 00000000..adce7074 --- /dev/null +++ b/python/ngen_conf/src/ngen/config/soil_freeze_thaw.py @@ -0,0 +1,16 @@ +from typing import Literal, Optional, Mapping +from pydantic import Field + +from .bmi_formulation import BMICxx + + +class SoilFreezeThaw(BMICxx): + """A BMICXX implementation for the Soil Freeze Thaw ngen module""" + + model_params: Optional[Mapping[str, str]] + # FIXME this isn't required for CXX bmi in ngen? + registration_function: str = "none" + # NOTE aliases don't propagate to subclasses, so we have to repeat the alias + model_name: Literal["SoilFreezeThaw"] = Field( + "SoilFreezeThaw", const=True, alias="model_type_name" + ) From 516d478d450d49c2fa76f5eadbda9669eb4548d6 Mon Sep 17 00:00:00 2001 From: Austin Raney Date: Tue, 21 Nov 2023 16:50:24 -0500 Subject: [PATCH 2/3] add SoilMoistureProfile model; WIP --- .../src/ngen/config/soil_moisture_profile.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 python/ngen_conf/src/ngen/config/soil_moisture_profile.py diff --git a/python/ngen_conf/src/ngen/config/soil_moisture_profile.py b/python/ngen_conf/src/ngen/config/soil_moisture_profile.py new file mode 100644 index 00000000..4a427510 --- /dev/null +++ b/python/ngen_conf/src/ngen/config/soil_moisture_profile.py @@ -0,0 +1,16 @@ +from typing import Literal, Optional, Mapping +from pydantic import Field + +from .bmi_formulation import BMICxx + + +class SoilMoistureProfile(BMICxx): + """A BMICXX implementation for the Soil Moisture Profile ngen module""" + + model_params: Optional[Mapping[str, str]] + # FIXME this isn't required for CXX bmi in ngen? + registration_function: str = "none" + # NOTE aliases don't propagate to subclasses, so we have to repeat the alias + model_name: Literal["SoilMoistureProfile"] = Field( + "SoilMoistureProfile", const=True, alias="model_type_name" + ) From b6523a1930994b4ebf21189413ee2c696d5de2fb Mon Sep 17 00:00:00 2001 From: Austin Raney Date: Tue, 21 Nov 2023 16:54:15 -0500 Subject: [PATCH 3/3] add LGAR model; WIP --- python/ngen_conf/src/ngen/config/lgar.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 python/ngen_conf/src/ngen/config/lgar.py diff --git a/python/ngen_conf/src/ngen/config/lgar.py b/python/ngen_conf/src/ngen/config/lgar.py new file mode 100644 index 00000000..48875827 --- /dev/null +++ b/python/ngen_conf/src/ngen/config/lgar.py @@ -0,0 +1,16 @@ +from typing import Literal, Optional, Mapping +from pydantic import Field + +from .bmi_formulation import BMICxx + + +class LGAR(BMICxx): + """A BMICXX implementation for the LGAR ngen module""" + + model_params: Optional[Mapping[str, str]] + # FIXME this isn't required for CXX bmi in ngen? + registration_function: str = "none" + # NOTE aliases don't propagate to subclasses, so we have to repeat the alias + model_name: Literal["LGAR"] = Field( + "LGAR", const=True, alias="model_type_name" + )