grdpaste

grdpaste(cmd0::String="", arg1=nothing, arg2=nothing, kwargs...)

Join two grids along their common edge

Description

Combines ingrid_a and ingrid_b into outgrid by pasting them together along their common edge. Files ingrid_a and ingrid_b must have the same grid spacings and registration, and must have one edge in common. If in doubt, check with grdinfo and use grdcut and/or grdsample if necessary to prepare the edge joint. Note: For geographical grids, you may have to use colinfo to handle periodic longitudes unless the input grids are properly recognized as such via their meta-data. For stitching multiple grids, see grdblend instead.

Required Arguments

ingrid_a : – A grid file name or a Grid type

ingrid_a : – The other of two grids to be pasted together.

Optional Arguments

  • G or save or outgrid or outfile : – outgrid=[=ID][+ddivisor][+ninvalid][+ooffset|a][+sscale|a][:driver[dataType][+coptions]]
    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].

    Note1: 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.

    Note2: This is optional and to be used only when saving the result directly on disk. Otherwise, just use the G = modulename(...) form.

  • V or verbose : – verbose=true | verbose=level
    Select verbosity level. More at verbose

  • f or colinfo : – colinfo=??
    Specify the data types of input and/or output columns (time or geographical data). More at

Examples

Suppose filea.nc is 150E - 180E and 0 - 30N, and fileb.nc is 150E - 180E, -30S - 0, then you can make outfile.nc which will be 150 - 180 and -30S - 30N by:

G = grdpaste("file_a.nc", "file_b.nc", colinfo=:g);

See Also

grdblend, grdclip, grdcut, grdinfo, grdsample