8.5.3. Hydrology Module

hydrology module

Helper functions to calculate standard hydrology measures

parflow.tools.hydrology.calculate_evapotranspiration(et, dx, dy, dz, mask=None)

Calculate gridded evapotranspiration across several layers.

Parameters:
  • et – A nz-by-ny-by-nx ndarray of evapotranspiration flux values with units 1/T (bottom layer to top layer)

  • dx – Length of a grid element in the x direction

  • dy – Length of a grid element in the y direction

  • dz – Thickness of a grid element in the z direction (bottom layer to top layer)

  • mask – A nz-by-ny-by-nx ndarray of mask values (bottom layer to top layer) If None, assumed to be an nz-by-ny-by-nx ndarray of 1s.

Returns:

A nz-by-ny-by-nx ndarray of evapotranspiration values (units L^3/T), spanning all layers (bottom to top)

parflow.tools.hydrology.calculate_overland_flow(pressure, slopex, slopey, mannings, dx, dy, flow_method='OverlandKinematic', epsilon=1e-05, mask=None)

Calculate overland outflow out of a domain

Parameters:
  • pressure – A nz-by-ny-by-nx ndarray of pressure values (bottom layer to top layer)

  • slopex – ny-by-nx

  • slopey – ny-by-nx

  • mannings – a scalar value, or a ny-by-nx ndarray

  • dx – Length of a grid element in the x direction

  • dy – Length of a grid element in the y direction

  • flow_method – Either ‘OverlandFlow’ or ‘OverlandKinematic’ ‘OverlandKinematic’ by default.

  • epsilon – Minimum slope magnitude for solver. Only applicable if flow_method=’OverlandKinematic’. This is set using the Solver.OverlandKinematic.Epsilon key in Parflow.

  • mask – A nz-by-ny-by-nx ndarray of mask values (bottom layer to top layer) If None, assumed to be an nz-by-ny-by-nx ndarray of 1s.

Returns:

A float value representing the total overland flow over the domain.

parflow.tools.hydrology.calculate_overland_flow_grid(pressure, slopex, slopey, mannings, dx, dy, flow_method='OverlandKinematic', epsilon=1e-05, mask=None)

Calculate overland outflow per grid cell of a domain

Parameters:
  • pressure – A nz-by-ny-by-nx ndarray of pressure values (bottom layer to top layer)

  • slopex – ny-by-nx

  • slopey – ny-by-nx

  • mannings – a scalar value, or a ny-by-nx ndarray

  • dx – Length of a grid element in the x direction

  • dy – Length of a grid element in the y direction

  • flow_method – Either ‘OverlandFlow’ or ‘OverlandKinematic’ ‘OverlandKinematic’ by default.

  • epsilon – Minimum slope magnitude for solver. Only applicable if kinematic=True. This is set using the Solver.OverlandKinematic.Epsilon key in Parflow.

  • mask – A nz-by-ny-by-nx ndarray of mask values (bottom layer to top layer) If None, assumed to be an nz-by-ny-by-nx ndarray of 1s.

Returns:

A ny-by-nx ndarray of overland flow values

parflow.tools.hydrology.calculate_overland_fluxes(pressure, slopex, slopey, mannings, dx, dy, flow_method='OverlandKinematic', epsilon=1e-05, mask=None)

Calculate overland fluxes across grid faces

Parameters:
  • pressure – A nz-by-ny-by-nx ndarray of pressure values (bottom layer to top layer)

  • slopex – ny-by-nx

  • slopey – ny-by-nx

  • mannings – a scalar value, or a ny-by-nx ndarray

  • dx – Length of a grid element in the x direction

  • dy – Length of a grid element in the y direction

  • flow_method – Either ‘OverlandFlow’ or ‘OverlandKinematic’ ‘OverlandKinematic’ by default.

  • epsilon – Minimum slope magnitude for solver. Only applicable if flow_method=’OverlandKinematic’. This is set using the Solver.OverlandKinematic.Epsilon key in Parflow.

  • mask – A nz-by-ny-by-nx ndarray of mask values (bottom layer to top layer) If None, assumed to be an nz-by-ny-by-nx ndarray of 1s.

Returns:

A 2-tuple: qeast - A ny-by-(nx+1) ndarray of overland flux values qnorth - A (ny+1)-by-nx ndarray of overland flux values

parflow.tools.hydrology.calculate_subsurface_storage(porosity, pressure, saturation, specific_storage, dx, dy, dz, mask=None)

Calculate gridded subsurface storage across several layers.

For each layer in the subsurface, storage consists of two parts
  • incompressible subsurface storage (porosity * saturation * depth of this layer) * dx * dy

  • compressible subsurface storage (pressure * saturation * specific storage * depth of this layer) * dx * dy

Parameters:
  • porosity – A nz-by-ny-by-nx ndarray of porosity values (bottom layer to top layer)

  • pressure – A nz-by-ny-by-nx ndarray of pressure values (bottom layer to top layer)

  • saturation – A nz-by-ny-by-nx ndarray of saturation values (bottom layer to top layer)

  • specific_storage – A nz-by-ny-by-nx ndarray of specific storage values (bottom layer to top layer)

  • dx – Length of a grid element in the x direction

  • dy – Length of a grid element in the y direction

  • dz – Thickness of a grid element in the z direction (bottom layer to top layer)

  • mask – A nz-by-ny-by-nx ndarray of mask values (bottom layer to top layer) If None, assumed to be an nz-by-ny-by-nx ndarray of 1s.

Returns:

A nz-by-ny-by-nx ndarray of subsurface storage values, spanning all layers (bottom to top)

parflow.tools.hydrology.calculate_surface_storage(pressure, dx, dy, mask=None)

Calculate gridded surface storage on the top layer.

Surface storage is given by:

Pressure at the top layer * dx * dy (for pressure values > 0)

Parameters:
  • pressure – A nz-by-ny-by-nx ndarray of pressure values (bottom layer to top layer)

  • dx – Length of a grid element in the x direction

  • dy – Length of a grid element in the y direction

  • mask – A nz-by-ny-by-nx ndarray of mask values (bottom layer to top layer) If None, assumed to be an nz-by-ny-by-nx ndarray of 1s.

Returns:

An ny-by-nx ndarray of surface storage values

parflow.tools.hydrology.calculate_water_table_depth(pressure, saturation, dz)

Calculate water table depth from the land surface :param pressure: A nz-by-ny-by-nx ndarray of pressure values (bottom layer to top layer) :param saturation: A nz-by-ny-by-nx ndarray of saturation values (bottom layer to top layer) :param dz: An ndarray of shape (nz,) of thickness values (bottom layer to top layer) :return: A ny-by-nx ndarray of water table depth values (measured from the top)

parflow.tools.hydrology.compute_hydraulic_head(pressure, z_0, dz)

Compute hydraulic head from a 3D pressure ndarray considering elevation.

This function uses the formula hh = hp + hz, where hh is the hydraulic head, hp the pressure head, and hz the elevation head.

Parameters:
  • pressure (numpy.ndarray) – 3D array of pressure values.

  • z_0 (float) – Elevation of the top layer.

  • dz (float) – Distance between z-layers.

Returns:

3D array of hydraulic head values.

Return type:

numpy.ndarray

parflow.tools.hydrology.compute_water_table_depth(saturation, top, dz)

Computes the water table depth as the first cell with a saturation=1 starting from top.

Depth is depth below the top surface. Negative values indicate the water table was not found, either below domain or the column at (i,j) is outside of domain.

Parameters:
  • saturation – ndarray of shape (nz, nx, ny)

  • top – ndarray of shape (1, nx, ny)

  • dz – distance between grid points in the z direction

Returns:

A new ndarray water_table_depth of shape (1, nx, ny) with depth values at each (i,j) location.