From 99d85571c7698944d47c86afb710ac3854dd3e43 Mon Sep 17 00:00:00 2001 From: David Huard Date: Wed, 10 Jan 2024 17:17:37 -0500 Subject: [PATCH] add support for new processes and methods added in v3.8 --- HISTORY.rst | 4 ++++ ravenpy/config/options.py | 17 +++++++++++++++++ ravenpy/config/processes.py | 5 +++++ ravenpy/config/rvs.py | 8 ++++++++ 4 files changed, 34 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index c3ae05f8..aad39f3e 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,10 @@ History ======= +0.14 (unreleased) +----------------- +* Add support for new processes and methods added in Raven v3.8. + 0.13 (2023-01-10) ----------------- * Fixed problem with scalar elevation in netCDF files parsed with `nc_specs` (issue #279, PR #323) diff --git a/ravenpy/config/options.py b/ravenpy/config/options.py index 3b4bd963..ceca1dc1 100644 --- a/ravenpy/config/options.py +++ b/ravenpy/config/options.py @@ -223,6 +223,8 @@ "TFSNOW", "RELATIVE_HT", "RELATIVE_LAI", + "CAP_LAI_RATIO", + "SNOCAP_LAI_RATIO", ] @@ -276,6 +278,7 @@ class EvaluationMetrics(Enum): RCOEFF = "RCOEFF" NSC = "NSC" KLING_GUPTA = "KLING_GUPTA" + DIAG_SPEARMAN = "DIAG_SPEARMAN" evaluation_metrics_multiplier = dict( @@ -290,6 +293,7 @@ class EvaluationMetrics(Enum): RCOEFF=-1, NSC=1, KLING_GUPTA=1, + DIAG_SPEARMAN=1, ) @@ -308,6 +312,15 @@ class Evaporation(Enum): MONTHLY_FACTOR = "PET_MONTHLY_FACTOR" MOHYSE = "PET_MOHYSE" OUDIN = "PET_OUDIN" + VAP_DEFICIT = "PET_VAPDEFICIT" + + +class LWIncomingMethod(Enum): + DATA = "LW_INC_DATA" + DEFAULT = "LW_INC_DEFAULT" + SICART = "LW_INC_SICART" + SKYVIEW = "LW_INC_SKYVIEW" + DINGMAN = "LW_INC_DINGMAN" class LWRadiationMethod(Enum): @@ -379,12 +392,16 @@ class RainSnowFraction(Enum): HBV = "RAINSNOW_HBV" HARDER = "RAINSNOW_HARDER" HSPF = "RAINSNOW_HSPF" + WANG = "RAINSNOW_WANG" + SNTHERM89 = "RAINSNOW_SNTHERM89" class RelativeHumidityMethod(Enum): CONSTANT = "RELHUM_CONSTANT" DATA = "RELHUM_DATA" MINDEWPT = "RELHUM_MINDEWPT" + CORR = "RELHUM_CORR" + WINDVEL = "WINDVEL_CORR" class Routing(Enum): diff --git a/ravenpy/config/processes.py b/ravenpy/config/processes.py index 8876db2b..c7d8e96a 100644 --- a/ravenpy/config/processes.py +++ b/ravenpy/config/processes.py @@ -50,6 +50,7 @@ class SoilEvaporation(Process): "SOILEVAP_ALL", "SOILEVAP_LINEAR", "SOILEVAP_SACSMA", + "SOILEVAP_HYMOD2", ] @@ -57,6 +58,10 @@ class LakeEvaporation(Process): algo: Literal["LAKE_EVAP_BASIC"] +class LakeFreeze(Process): + algo: Literal["LFREEZE_BASIC", "LFREEZE_THERMAL"] + + class OpenWaterEvaporation(Process): algo: Literal["OPEN_WATER_EVAP", "OPEN_WATER_RIPARIAN"] diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index 60851535..cbd807e6 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -66,6 +66,10 @@ class RVI(RV): alias="MonthlyInterpolationMethod" ) soil_model: Optional[rc.SoilModel] = optfield(alias="SoilModel") + temperature_correction: Optional[bool] = optfield( + alias="TemperatureCorrection", + description="Gridded or gauged temperature bias correction.", + ) lake_storage: Optional[o.StateVariables] = optfield(alias="LakeStorage") define_hru_groups: Optional[Sequence[str]] = optfield(alias="DefineHRUGroups") @@ -108,6 +112,10 @@ class RVI(RV): write_subbasin_file: Optional[bool] = optfield( alias="WriteSubbasinFile" ) # Undocumented + write_local_flows: Optional[bool] = optfield( + alias="WriteLocalFlows", + description="Write local contribution to hydrograph in hydrograph.csv", + ) @field_validator("soil_model", mode="before") @classmethod