---
name: "grdclip"
section: "1"
platform: "linux"
package: "gmt-manpages"
version: "3.4-1"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/grdclip"
---

# grdclip(1)

Clipping of range in grdfiles.

## NAME

grdclip - Clipping of range in grdfiles.

## SYNOPSIS

**grdclip** *input\_file.grd* **-G***output\_file.grd* \[ **-Sa***high/above* \] \[ **-Sb***low/below* \] \[ **-V** \]

## DESCRIPTION

**grdclip** will set values \< *low* to *below* and/or values \> *high* to *above*. Useful when you want all of a continent or an ocean to fall into one color or grayshade in image processing, or clipping of the range of data values is required. *above/below* can be any number or NaN (Not a Number). You must choose at least one of **-Sa** or **-Sb**.

- *input\_file.grd*

  The input 2-D binary grdfile.

- **-G**

  *output\_file.grd* is the modified output grdfile.

## OPTIONS

- **-Sa**

  Set all data\[i\] \> *high* to *above*.

- **-Sb**

  Set all data\[i\] \< *low* to *below*.

- **-V**

  Selects verbose mode, which will send progress reports to stderr \[Default runs "silently"\].

## EXAMPLES

To set all values \> 70 to NaN and all values \< 0 to 0 in file data.grd, try:

grdclip data.grd **-G**new\_data.grd **-Sa**70/NaN **-Sb**0/0 **-V**

## SEE ALSO

*gmt*(l), *grdlandmask*(l), *grdmask*(l), *grdmath*(l), *grd2xyz*(l), *xyz2grd*(l)
