GeoEco.Datasets.Virtual.WindFetchGrid.ComputeFetch

classmethod WindFetchGrid.ComputeFetch(array, landValue, cellSize, directions)

Compute mean wind fetch distance to for a 2D numpy.ndarray representing land and water.

Requires: Python scipy module.

Parameters:
  • array (instance of <class 'object'>) – numpy.ndarray representing land and water. Must have 2 dimensions. This array must have 2 dimensions. The shape of this array must not be less than [1, 1]. This array must have one of the following dtypes꞉ 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64', 'float32', 'float64', 'float128'.

  • landValue (object) – Value of array that represents land. May be numpy.nan. All other cells are assumed to be water.

  • cellSize (float) – Cell size of array. Cells are assumed to be square. The cell size is the length or width of the cell. Must be greater than 0.0.

  • directions (list of float) – Directions, in degrees, for which wind fetch distance should be computed and averaged. Typically these range from 0 to 360 by a small (but not too small) increment such as 15 degrees, e.g. list(range(0, 360, 15)). Minimum length꞉ 1.

Returns:

A float32 numpy.ndarray representing the mean distance to land cells in grid in the given directions.

Return type:

instance of <class ‘object’>