pywatershed.PRMSAtmosphereTranspFrost#

class pywatershed.PRMSAtmosphereTranspFrost(control, discretization, parameters, prcp, tmax, tmin, soltab_potsw, soltab_horad_potsw, input_aliases=None, verbose=False, restart_read=False, restart_write=False, restart_write_freq=False)[source]#

PRMS atmospheric boundary layer model with a frost transpiration model.

In this subclass, the PRMSAtmosphere transpiration model using temperature index is replaced by a specified active period between the parameteres of (last) spring_frost and (first, killing) fall frost. This is as implemented in the PRMS module transp_frost.f90.

See also

PRMSAtmosphere

__init__(control, discretization, parameters, prcp, tmax, tmin, soltab_potsw, soltab_horad_potsw, input_aliases=None, verbose=False, restart_read=False, restart_write=False, restart_write_freq=False)[source]#

Methods

__init__(control, discretization, ...[, ...])

adjust_precip()

Input precipitation adjustments using calibrated parameters.

adjust_temperature()

Input temperature adjustments using calibrated parameters.

advance()

Advance the Process in time.

calc_transp_frost()

rtype:

None

calc_transp_tindex()

calculate(time_length, **kwargs)

Calculate Process terms for a time step

calculate_potential_et_jh()

Calculate potential evapotranspiration following Jensen and Haise

calculate_sw_rad_degree_day()

Calculate shortwave radiation using the degree day method.

description()

A dictionary description of this Process.

finalize()

Finalize the Process, output methods, and close input adapters.

get_dimensions()

Get a tuple of dimension names for this Process.

get_init_values()

Get a dictionary of initialization values for each public variable.

get_inputs()

Get a tuple of input variable names for this Process.

get_parameters()

Get a tuple of parameter names for this Process.

get_restart_variables()

A list of restart varible names.

get_variables()

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

dimensions

A tuple of parameter names.

init_values

A dictionary of initial values for each public variable.

inputs

A tuple of input variable names.

parameters

A tuple of parameter names.

restart_variables

previous.

variables

A tuple of public variable names.

adjust_precip()#

Input precipitation adjustments using calibrated parameters.

Snow/rain partitioning of total precip depends on adjusted temperature in addition to depending on additonal parameters.

Returns:

None

adjust_temperature()#

Input temperature adjustments using calibrated parameters.

advance()#

Advance the Process in time.

Returns:

None

calc_transp_frost()[source]#
Return type:

None

calc_transp_tindex()#
calculate(time_length, **kwargs)#

Calculate Process terms for a time step

Parameters:

simulation_time – current simulation time

Return type:

None

Returns:

None

calculate_potential_et_jh()#

Calculate potential evapotranspiration following Jensen and Haise

Jensen and Haise (1963)

Return type:

None

Returns:

None

calculate_sw_rad_degree_day()#

Calculate shortwave radiation using the degree day method.

Return type:

None

Returns:

None

classmethod description()#

A dictionary description of this Process.

Return type:

dict

Returns:

All metadata for all variables in inputs, variables, and parameters.

property dimensions: tuple#

A tuple of parameter names.

finalize()#

Finalize the Process, output methods, and close input adapters.

Return type:

None

Returns:

None

static get_dimensions()#

Get a tuple of dimension names for this Process.

static get_init_values()#

Get a dictionary of initialization values for each public variable.

Return type:

dict

static get_inputs()#

Get a tuple of input variable names for this Process.

Return type:

tuple

static get_parameters()[source]#

Get a tuple of parameter names for this Process.

static get_restart_variables()#

A list of restart varible names.

Return type:

list

classmethod get_variables()#

Get a tuple of (public) variable names for this Process.

Return type:

tuple

property init_values: dict#

A dictionary of initial values for each public variable.

initialize_netcdf(output_dir=None, separate_files=None, 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 variable

  • output_vars (list) – list of variable names to output.

Returns:

None

property inputs: tuple#

A tuple of input variable names.

output()#

Output data to previously initialized output types. :returns: None

output_to_csv(pth)#

Save each output variable to separate csv file in specified path

property parameters: tuple#

A tuple of parameter names.

property restart_variables: dict#

previous.

Type:

A dict of restart variable names mapping current

set_input_to_adapter(input_variable_name, adapter)#

Set input variables to adapter.current and manage the adapter.

TODO: make this private?

Parameters:
  • input_variable_name (str) – key of input variable

  • adapter (Adapter) – the Adapter for the input.

property variables: tuple#

A tuple of public variable names.