From 8056e3947a749953a1b620a6c68fc34448e244ba Mon Sep 17 00:00:00 2001 From: James McCreight Date: Fri, 3 Nov 2023 12:08:43 -0600 Subject: [PATCH] lint --- pywatershed/atmosphere/prms_atmosphere.py | 2 +- pywatershed/hydrology/prms_canopy.py | 4 ++-- pywatershed/hydrology/prms_runoff.py | 2 +- pywatershed/hydrology/prms_snow.py | 2 +- pywatershed/hydrology/prms_soilzone.py | 9 ++++++++- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/pywatershed/atmosphere/prms_atmosphere.py b/pywatershed/atmosphere/prms_atmosphere.py index 325c6564..ea065964 100644 --- a/pywatershed/atmosphere/prms_atmosphere.py +++ b/pywatershed/atmosphere/prms_atmosphere.py @@ -8,7 +8,7 @@ from ..base.adapter import adaptable from ..base.control import Control -from ..constants import nearzero, inch2cm, nan, one, zero +from ..constants import inch2cm, nan, nearzero, one, zero from ..parameters import Parameters from ..utils.time_utils import datetime_doy, datetime_month from .solar_constants import solf diff --git a/pywatershed/hydrology/prms_canopy.py b/pywatershed/hydrology/prms_canopy.py index 8628f633..91e2fe08 100644 --- a/pywatershed/hydrology/prms_canopy.py +++ b/pywatershed/hydrology/prms_canopy.py @@ -10,11 +10,11 @@ from ..constants import ( CovType, HruType, + dnearzero, nan, + nearzero, numba_num_threads, zero, - dnearzero, - nearzero, ) from ..parameters import Parameters diff --git a/pywatershed/hydrology/prms_runoff.py b/pywatershed/hydrology/prms_runoff.py index 89aae040..73f7b9d3 100644 --- a/pywatershed/hydrology/prms_runoff.py +++ b/pywatershed/hydrology/prms_runoff.py @@ -10,8 +10,8 @@ from ..constants import ( HruType, dnearzero, - nearzero, nan, + nearzero, numba_num_threads, zero, ) diff --git a/pywatershed/hydrology/prms_snow.py b/pywatershed/hydrology/prms_snow.py index c5e29aed..5eaa3432 100644 --- a/pywatershed/hydrology/prms_snow.py +++ b/pywatershed/hydrology/prms_snow.py @@ -11,9 +11,9 @@ HruType, closezero, dnearzero, - nearzero, inch2cm, nan, + nearzero, numba_num_threads, one, zero, diff --git a/pywatershed/hydrology/prms_soilzone.py b/pywatershed/hydrology/prms_soilzone.py index 8db0b99a..4c98f1a8 100644 --- a/pywatershed/hydrology/prms_soilzone.py +++ b/pywatershed/hydrology/prms_soilzone.py @@ -12,9 +12,9 @@ HruType, SoilType, nan, + nearzero, numba_num_threads, one, - nearzero, zero, ) from ..parameters import Parameters @@ -89,6 +89,9 @@ def __init__( self._set_inputs(locals()) self._set_options(locals()) + # This uses options + self._initialize_soilzone_data() + self._set_budget() self._init_calc_method() @@ -214,6 +217,10 @@ def get_mass_budget_terms(): } def _set_initial_conditions(self): + # this is called in the super before options are set on self + pass + + def _initialize_soilzone_data(self): # Derived parameters # JLM: is this awkward here? # JLM: it's definitely awkward to edit a parameter. maybe