You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Input grid file. Optionally, append =ID for reading a specific file format [Default is =nf] or ?varname for a specific netCDF variable [Default is the first 2-D grid found by GMT] (See full description). The following modifiers are supported:
+b - Select a band (for images only) [Default is 0].
+d - Divide data values by the given divisor [Default is 1].
+n - Replace data values matching invalid with NaN.
+o - Offset data values by the given offset [Default is 0].
+s - Scale data values by the given scale [Default is 1].
Give the name of the output grid file. Optionally, append =ID for writing a specific file format (See full description). The following modifiers are supported:
+d - Divide data values by given divisor [Default is 1].
+n - Replace data values matching invalid with a NaN.
+o - Offset data values by the given offset, or append a for automatic range offset to preserve precision for integer grids [Default is 0].
+s - Scale data values by the given scale, or append a for automatic scaling to preserve precision for integer grids [Default is 1].
Note: Any offset is added before any scaling. +sa also sets +oa (unless overridden). To write specific formats via GDAL, use =gd and supply driver (and optionally dataType) and/or one or more concatenated GDAL -co options using +c. See the “Writing grids and images” cookbook section for more details.
I'll take the current
grdcut
documentation (https://www.pygmt.org/v0.10.0/api/generated/pygmt.grdcut.html) as an example.Currently, the docstring says:
When
grid
oroutgrid
is a netCDF file, it can actually have more modifiers (http:https://docs.generic-mapping-tools.org/latest/grdcut.html):I think we should improve the docstrings to have a complete description about grids. Since the same description will be used in many different function docstrings, we can define new docstring placeholders in
COMMON_DOCSTRINGS
(https://github.com/GenericMappingTools/pygmt/blob/1e4845432cd3d0c575cc12c711c10735bbd5f289/pygmt/helpers/decorators.py#L17C1-L17C18).The text was updated successfully, but these errors were encountered: