Skip to content

WindFetchGrid: add "maximum distance per direction" and "report progress" parameters #33

@jjrob

Description

@jjrob

Currently, WindFetchGrid has a maxDist parameter, described as:

Maximum allowed mean wind fetch distance. If provided, after the mean distance in all directions is computed, it is compared against this maximum. Wherever the mean is larger, it is rounded down to the maximum.

This parameter was originally intended for species habitat modeling situations in which you wanted to distinguish enclosed inshore areas from the open ocean, but didn't care about how far from shore you were once you got to the open ocean. The problem is that if your input land/water grid encompasses a large geography and some cells have a straight line view to a large ocean basin, the fetch values in those directions will be very large and they will dominate the mean. Thus the maxDist parameter, as currently defined, cannot tell the difference between a cell right next to land in a narrow estuary that has a small view of the open ocean, and a cell that is fairly far from shore and surrounded on all sides by land with no view of the open ocean.

To fix this, we should add a maxDistPerDir parameter:

Maximum allowed wind fetch distance in each direction. If provided, then each time fetch distance is calculated for a specific direction, it is compared against this maximum value. Wherever fetch in the calculated direction is larger, it will be rounded down to the maximum value. This will be done for each direction in turn, prior to averaging all of the directions into a mean. Use this parameter to prevent a few extremely long distances from dominating the mean.

That way, if some directions have a view of the open ocean, they get rounded down before they're included in the mean, preventing them from overwhelming the distances from the other directions. In this situation, the cell in a narrow estuary with a few views of the open ocean would get a smaller value than the cell fairly far from shore with no view of the open ocean.

Also, because fetch can take a long time to calculate, we should add a reportProgress parameter. If True, progress messages will be logged periodically as the computation proceeds.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions