MGH_BAND_EDGE
Name
MGH_BAND_EDGE
Purpose
Given a 2D array as input, return a copy in which there is a band
adjacent to the edge with zero gradient normal to the edge
Positional Parameters
data (input, 2D array)
The input array, can be any data type
Keyword Parameters
WIDTH (input, integer scalar)
The width of the band in which values are changed. Default is 1.
If WIDTH is less than 1, the result is just a copy of the input.
Return Value
The function returns an array of the same type and dimensions as
the input.
Procedure
Copy interior values into the band.
KEYWORD ARGUMENTS:
WIDTH (input, integer with one or 4 elements)
The width of the nudging band: if WIDTH is a scalar or 1-element
vector, the same value is used on all boundaries. If WIDTH is
a 4-element vector, the values are applied to the south, east, north
and west boundaries in turn.
Modification History
Mark Hadfield, 2006-03:
Written to replace mgh_moma_top_smoothedge and similar.
Mark Hadfield, 2013-02:
WIDTH can now be a 4-element vector, allowing each edge
to be "banded" individually. The 4 elements are mapped onto
the south, east, north and west boundaries in turn.
Mark Hadfield, 2014-06:
Reformatted.