EnglishFrenchSpanish

OnWorks favicon

grdeditgmt - Online in the Cloud

Run grdeditgmt in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command grdeditgmt that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


grdedit - Modify header or content of a grid

SYNOPSIS


grdedit grid [ ] [ xname/yname/zname/scale/offset/invalid/title/remark ] [ [a|h|l|r|t|v]
] [ outgrid ] [ parameters ] [ table ] [ region ] [ ] [ ] [ [level] ] [ -bi<binary> ] [
-di<nodata> ] [ -f<flags> ] [ -i<flags> ] [ -:[i|o] ]

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

DESCRIPTION


grdedit reads the header information in a binary 2-D grid file and replaces the
information with values provided on the command line [if any]. As an option, global,
geographical grids (with 360 degrees longitude range) can be rotated in the east-west
direction, and individual nodal values can be replaced from a table of x, y, z values.
grdedit only operates on files containing a grid header. Note: If it is important to
retain the original data you should use -G to save the modified grid to a new file.

REQUIRED ARGUMENTS


grid Name of the 2-D grid file to modify. (See GRID FILE FORMATS below).

OPTIONAL ARGUMENTS


-A If necessary, adjust the file's x_inc, y_inc to be compatible with its domain (or a
new domain set with -R). Older grid files (i.e., created prior to GMT 3.1) often
had excessive slop in x_inc, y_inc and an adjustment is necessary. Newer files are
created correctly.

-Dxname/yname/zname/scale/offset/invalid/title/remark
Give values for xname, yname, zname (give the names of those variables and in
square bracket their units, e.g., "distance [km]"), scale (to multiply grid values
after read [normally 1]), offset (to add to grid after scaling [normally 0]),
invalid (a value to represent missing data [NaN]), title (anything you like), and
remark (anything you like). To leave some of these values untouched, leave field
blank. Empty fields in the end may be skipped. Alternatively, to allow "/" to be
part of one of the values, use any non-alphanumeric character (and not the equal
sign) as separator by both starting and ending with it. For example:
-D:xname:yname:zname:scale:offset:invalid:title:remark: Use quotes to group texts
with more than one word. Note that for geographic grids (-fg) xname and yname are
set automatically.

-E[a|h|l|r|t|v]
Transform the grid in one of six ways and (for l|r|t) interchange the x and y
information: -Ea will rotate the grid around 180 degrees, -Eh will flip the grid
horizontally (left-to-right), -El will rotate the grid 90 degrees counter-clockwise
(left), -Er will rotate the grid 90 degrees clockwise (right), -Et will transpose
the grid [Default], -Ev will flip the grid vertically (top-to-bottom).
Incompatible with the other options (except -G).

-Goutgrid
Normally, grdedit will overwrite the existing grid with the modified grid. Use -G
to write the modified grid to the file outgrid instead.

-Jparameters (more ...)
Select map projection. Use the -J syntax to save the georeferencing info as CF-1
compliant metadata in netCDF grids. This metadata will be recognized by GDAL.

-Ntable
Read the ASCII (or binary; see -bi) file table and replace the corresponding nodal
values in the grid with these x,y,z values.

-R[unit]xmin/xmax/ymin/ymax[r] (more ...)
Specify the region of interest. The new w/e/s/n values will replace those in the
grid, and the x_inc, y_inc values are adjusted, if necessary.

-S For global, geographical grids only. Grid values will be shifted longitudinally
according to the new borders given in -R.

-T Make necessary changes in the header to convert a gridline-registered grid to a
pixel-registered grid, or vice-versa. Basically, gridline-registered grids will
have their domain extended by half the x- and y-increments whereas pixel-registered
grids will have their domain shrunk by the same amount.

-V[level] (more ...)
Select verbosity level [c].

-bi[ncols][t] (more ...)
Select native binary input. [Default is 3 input columns].

-dinodata (more ...)
Replace input columns that equal nodata with NaN.

-f[i|o]colinfo (more ...)
Specify data types of input and/or output columns.

-h[i|o][n][+c][+d][+rremark][+rtitle] (more ...)
Skip or produce header record(s).

-icols[l][sscale][ooffset][,...] (more ...)
Select input columns (0 is first column).

-^ or just -
Print a short message about the syntax of the command, then exits (NOTE: on Windows
use just -).

-+ 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 options, then
exits.

--version
Print GMT version and exit.

--show-datadir
Print full path to GMT share directory and exit.

GRID FILE FORMATS


By default GMT writes out grid as single precision floats in a COARDS-complaint netCDF
file format. However, GMT is able to produce grid files in many other commonly used grid
file formats and also facilitates so called "packing" of grids, writing out floating point
data as 1- or 2-byte integers. To specify the precision, scale and offset, the user should
add the suffix =id[/scale/offset[/nan]], where id is a two-letter identifier of the grid
type and precision, and scale and offset are optional scale factor and offset to be
applied to all grid values, and nan is the value used to indicate missing data. In case
the two characters id is not provided, as in =/scale than a id=nf is assumed. When
reading grids, the format is generally automatically recognized. If not, the same suffix
can be added to input grid file names. See grdconvert and Section grid-file-format of the
GMT Technical Reference and Cookbook for more information.

When reading a netCDF file that contains multiple grids, GMT will read, by default, the
first 2-dimensional grid that can find in that file. To coax GMT into reading another
multi-dimensional variable in the grid file, append ?varname to the file name, where
varname is the name of the variable. Note that you may need to escape the special meaning
of ? in your shell program by putting a backslash in front of it, or by placing the
filename and suffix between quotes or double quotes. The ?varname suffix can also be used
for output grids to specify a variable name different from the default: "z". See
grdconvert and Sections modifiers-for-CF and grid-file-format of the GMT Technical
Reference and Cookbook for more information, particularly on how to read splices of 3-,
4-, or 5-dimensional grids.

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


Let us assume the file data.nc covers the area 300/310/10/30. We want to change the
boundaries from geodetic longitudes to geographic and put a new title in the header. We
accomplish this by

gmt grdedit data.nc -R-60/-50/10/30 -D//////"Gravity Anomalies"

The grid world.nc has the limits 0/360/-72/72. To shift the data so that the limits would
be -180/180/-72/72, use

gmt grdedit world.nc -R-180/180/-72/72 -S

The file junk.nc was created prior to GMT 3.1 with incompatible -R and -I arguments. To
reset the x- and y-increments we run

gmt grdedit junk.nc -A

The file junk.nc was created prior to GMT 4.1.3 and does not contain the required
information to indicate that the grid is geographic. To add this information, run

gmt grdedit junk.nc -fg

To rotate the grid oblique.nc 90 degrees counter-clockwise and write out the rotated grid
to a new file, run

gmt grdedit oblique.nc -El -Goblique_rot.nc

Use grdeditgmt online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    KDiff3
    KDiff3
    This repository is no longer maintained
    and is kept for archival purposes. See
    https://invent.kde.org/sdk/kdiff3 for
    the newest code and
    https://download.kde.o...
    Download KDiff3
  • 2
    USBLoaderGX
    USBLoaderGX
    USBLoaderGX is a GUI for
    Waninkoko's USB Loader, based on
    libwiigui. It allows listing and
    launching Wii games, Gamecube games and
    homebrew on Wii and WiiU...
    Download USBLoaderGX
  • 3
    Firebird
    Firebird
    Firebird RDBMS offers ANSI SQL features
    & runs on Linux, Windows &
    several Unix platforms. Features
    excellent concurrency & performance
    & power...
    Download Firebird
  • 4
    KompoZer
    KompoZer
    KompoZer is a wysiwyg HTML editor using
    the Mozilla Composer codebase. As
    Nvu's development has been stopped
    in 2005, KompoZer fixes many bugs and
    adds a f...
    Download KompoZer
  • 5
    Free Manga Downloader
    Free Manga Downloader
    The Free Manga Downloader (FMD) is an
    open source application written in
    Object-Pascal for managing and
    downloading manga from various websites.
    This is a mirr...
    Download Free Manga Downloader
  • 6
    UNetbootin
    UNetbootin
    UNetbootin allows you to create bootable
    Live USB drives for Ubuntu, Fedora, and
    other Linux distributions without
    burning a CD. It runs on Windows, Linux,
    and ...
    Download UNetbootin
  • More »

Linux commands

  • 1
    abc2abc
    abc2abc
    abc2abc - a simple abc
    checker/re-formatter/transposer ...
    Run abc2abc
  • 2
    abc2ly
    abc2ly
    abc2ly - manual page for abc2ly
    (LilyPond) 2.18.2 ...
    Run abc2ly
  • 3
    coqdoc
    coqdoc
    coqdoc - A documentation tool for the
    Coq proof assistant ...
    Run coqdoc
  • 4
    coqide
    coqide
    coqide - The Coq Proof Assistant
    graphical interface ...
    Run coqide
  • 5
    g.gui.vdigitgrass
    g.gui.vdigitgrass
    g.gui.vdigit - Interactive editing and
    digitization of vector maps. KEYWORDS:
    general, user interface, GUI, vector,
    editing, digitizer ...
    Run g.gui.vdigitgrass
  • 6
    g.listgrass
    g.listgrass
    g.list - Lists available GRASS data
    base files of the user-specified data
    type optionally using the search
    pattern. KEYWORDS: general, map
    management, list ...
    Run g.listgrass
  • More »

Ad