characterise_flows | R Documentation |
This function checks whether the transects created to sample the boundaries of model compartments lie on a lat-lon grid. If they do, then we know that when sampling meridional and zonal currents only one is needed per transect.
characterise_flows(lines, domain, precision = 1000)
lines |
An sfc object of lines representing transects along the perimeter of a model domain polygon. |
domain |
An sfc polygon object of the model domain, used to make the transects. |
precision |
How far apart should sampling points be (1/x degrees, larger numbers bring the points closer). |
segment |
An SF line object representing a transect along the perimeter of a model domain polygon. |
The function takes a boundary segment (transect) and reprojects it on a lat-lon grid. The coordinates are extracted, and checked for identical latitudes or longitudes.
The function returns a dataframe detailing whether laitudues are the same and longitudes are the same along a segment.
The function returns a dataframe detailing which two model compartments are either side of the transect, and the direction of the exchange.
The function returns the lines object with added columns. If transects are ambiguosly labelled, a list is returned of the transects and the failed sampling locations.
Other Boundary sampling functions:
boundaries()
,
to_segments()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.