pywatershed.PRMSHydraulicGeometryFull#
- class pywatershed.PRMSHydraulicGeometryFull(control, discretization, parameters, seg_outflow, input_aliases=None, verbose=False)[source]#
PRMS hydraulic geometry.
Computes flow-dependent hydraulic geometry (width, depth, area, velocity, residence time) for stream segments using power-law relationships. This implementation is based on the strmflow_character module from PRMS 5.2.1.
Hydraulic geometry relationships: - width = width_alpha * flow^width_m - depth = depth_alpha * flow^depth_m - area = width * depth - velocity = flow / area - residence_time = (area * length) / flow
- 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 a tuple of parameter names for this Process.
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()[source]#
Get a dictionary of initialization values for each public variable.
- Return type:
- static get_variables()[source]#
Get a tuple of (public) variable names for this Process.
- 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?