Scroll to navigation

GRDFILL(1gmt) GMT GRDFILL(1gmt)

NAME

grdfill - Interpolate across holes in a grid

SYNOPSIS

gmt grdfill ingrid
-Amode[arg]
-Goutgrid [ -Rregion ] [ -L[p] ] [ -V[level] ] [ -fflags ] [ --PAR=value ]

Note: No space is allowed between the option flag and the associated arguments.

DESCRIPTION

grdfill reads a grid that presumably has unfilled holes that the user wants to fill in some fashion. Holes are identified by NaN values but this criteria can be changed. There are several different algorithms that can be used to replace the hole values.

REQUIRED ARGUMENTS

This is the input grid file.

Specify the hole-filling algorithm to use. Choose from c for constant fill and append the constant value, n for nearest neighbor and optionally append a search radius in pixels, or s for bicubic spline [NOT IMPLEMENTED YET].

This is the output grid file.

OPTIONAL ARGUMENTS

Sets the node value that identifies a point as a member of a hole [Default is NaN].

Specify the region of interest. This defines the subregion to be cut out.

Just list the rectangular subregions west east south north of each hole. No grid fill takes place and -G is ignored. Optionally, append p to instead write closed polygons for all subregions.

Select verbosity level [c].

Specify data types of input and/or output columns.

-^ or just -
Print a short message about the syntax of the command, then exits (NOTE: on Windows just use -).
-+ or just +
Print an extensive usage (help) message, including the explanation of any module-specific option (but not the GMT common options), then exits.
-? or no arguments
Print a complete usage (help) message, including the explanation of all options, then exits.
Temporarily override a GMT default setting; repeatable. See /gmt.conf for parameters.

GEOGRAPHICAL AND TIME COORDINATES

When the output grid type is netCDF, the coordinates will be labeled "longitude", "latitude", or "time" based on the attributes of the input data or grid (if any) or on the -f or -R options. For example, both -f0x -f1t and -R90w/90e/0t/3t will result in a longitude/time grid. When the x, y, or z coordinate is time, it will be stored in the grid as relative time since epoch as specified by TIME_UNIT and TIME_EPOCH in the gmt.conf file or on the command line. In addition, the unit attribute of the time variable will indicate both this unit and epoch.

EXAMPLES

To identify all regions with NaNs in the grid data.grd and create a listing of the bounding coordinates of rectangular regions that would cover these NaN areas, try

gmt grdfill data.grd -L > wesn_listing.txt




To identify the same areas but this time write a multisegment file with polygons corresponding to the rectangular subregions, use

gmt grdfill data.grd -Lp > NaN_regions.txt




To replace all NaN values in the file data.grd with the value 999.0, use

gmt grdfill data.grd -Ac999 -Gno_NaNs_data.grd




To replace all NaN values in the file data.grd with the values at the nearest non-NaN neighbor, try

gmt grdfill data.grd -An -Gno_NaNs_NN_data.grd




SEE ALSO

gmt, grdcut, grdclip, grdedit, grdinfo

COPYRIGHT

2019, The GMT Team

September 7, 2019 6.0.0rc4