pywatershed.PRMSHydraulicGeometryWidthOnly#
- class pywatershed.PRMSHydraulicGeometryWidthOnly(control, discretization, parameters, seg_outflow, input_aliases=None, verbose=False)[source]#
PRMS hydraulic geometry with default depth parameters.
This subclass uses PRMS default values for depth_alpha and depth_m when those parameters are not provided in the parameter file. This matches the PRMS 5.2.1 behavior where missing parameters fall back to defaults.
Default values from strmflow_character.f90: - depth_alpha = 0.27 (range: 0.12 - 0.63 meters) - depth_m = 0.39 (range: 0.38 - 0.40)
Width parameters (width_alpha, width_m) are still required.
- Parameters:
control (
Control) – a Control objectdiscretization (
Parameters) – a discretization of class Parametersparameters (
Parameters) – a parameter object of class Parametersseg_outflow (
Union[str,Path,ndarray,Adapter,PrmsDynamicParameter]) – Streamflow leaving each segment (cfs)verbose (
bool) – Print extra information or not?
- __init__(control, discretization, parameters, seg_outflow, input_aliases=None, verbose=False)[source]#
Methods
__init__(control, discretization, ...[, ...])advance()Advance the Process in time.
calculate(time_length, **kwargs)Calculate Process terms for a time step
A dictionary description of this Process.
finalize()Finalize the Process, output methods, and close input adapters.
Get a tuple of dimension names for this Process.
Get a dictionary of initialization values for each public variable.
Get a tuple of input variable names for this Process.
Get required parameters (only width, depth uses defaults).
A list of restart varible names.
Get a tuple of (public) variable names for this Process.
initialize_netcdf([output_dir, ...])Initialize NetCDF output.
output()Output data to previously initialized output types.
output_to_csv(pth)Save each output variable to separate csv file in specified path
set_input_to_adapter(input_variable_name, ...)Set input variables to adapter.current and manage the adapter.
Attributes
A tuple of parameter names.
A dictionary of initial values for each public variable.
A tuple of input variable names.
A tuple of parameter names.
previous.
A tuple of public variable names.
- advance()#
Advance the Process in time.
- Returns:
None
- calculate(time_length, **kwargs)#
Calculate Process terms for a time step
- Parameters:
simulation_time – current simulation time
- Return type:
- Returns:
None
- classmethod description()#
A dictionary description of this Process.
- Return type:
- Returns:
All metadata for all variables in inputs, variables, and parameters.
- finalize()#
Finalize the Process, output methods, and close input adapters.
- Return type:
- Returns:
None
- static get_init_values()#
Get a dictionary of initialization values for each public variable.
- Return type:
- static get_parameters()[source]#
Get required parameters (only width, depth uses defaults).
- Return type:
- initialize_netcdf(output_dir=None, separate_files=None, output_vars=None, extra_coords=None, addtl_output_vars=None, **kwargs)#
Initialize NetCDF output.
- Parameters:
output_dir ([<class ‘str’>, <class ‘pathlib.Path’>]) – base directory path or NetCDF file path if separate_files is True
separate_files (
bool) – boolean indicating if storage component output variables should be written to a separate file for each variableoutput_vars (
list) – list of variable names to output.
- Return type:
- Returns:
None
- output_to_csv(pth)#
Save each output variable to separate csv file in specified path
- set_input_to_adapter(input_variable_name, adapter)#
Set input variables to adapter.current and manage the adapter.
TODO: make this private?