mbm_arc2grd
Section: MB-System 5.0 (1)
Updated: 11 April 2017
Index
NAME
mbm_arc2grd - Macro to convert an ArcGIS ASCII grid to a GMT grid file in the GMT NetCDF grid format.VERSION
Version 5.0SYNOPSIS
mbm_arc2grd -Iarcfile -Ogrdfile [-H -Jprojection -Nnodata -Ttitle -V -Xxname -Yyname -Zzname]DESCRIPTION
mbm_arc2grd is a macro to convert a ArcGIS ASCII grid to an GMT grid file in the GMT NetCDF grid format. This allows users to import the grid into GMT. If the grid is not in geographic coordinates (longitude and latitude), then the projected coordinate system must be specified using the -J option.This macro was substantially rewritten in 2017 to use the GMT modules grdconvert and grdedit.
MB-SYSTEM AUTHORSHIP
David W. Caress
Monterey Bay Aquarium Research Institute
Dale N. Chayes
Center for Coastal and Ocean Mapping
University of New Hampshire
Christian do Santos Ferreira
MARUM - Center for Marine Environmental Sciences
University of BremenOPTIONS
ArcGIS ASCII grid files do not internally specify the coordinate system used. GMT grids also do not necessarily include information about the coordinate system. However, MB-System generates GMT grids that do have a coordinate system definition embedded in the GMT grid header remark field, and then uses that information when displaying the gridded data, either interactively with mbgrdviz or in plots or GeoTiffs generated using the plotting macros mbm_grdplot, mbm_grd3dplot, and mbm_grdtiff. By default, mbgrid and mbmosaic generate grids in Geographic coordinates, meaning that position is defined in longitude and latitude using the WGS84 geographic coordinate system. In both programs, the -J option can be used to specify an alternate, projected coordinate system (PCS). When a PCS is used, position will be defined in eastings and northings (meters) relative to the origin of the particular PCS. Universal Transverse Mercator is the most commonly used PCS in the oceanographic community, but MB-System supports a large number of other PCS's as well. The underlying projection functions derive from the PROJ.4 library originated by Gerald Evenden, then of the U.S. Geological Survey.
If the ArcGIS grid that is to be translated for use with MB-System is in geographic components, then no special arguments to mbm_arc2grd are required. However, if the grid is in a projected coordinate system, then that coordinate system must be specified with the -Jprojection option using a PCS identifier from the projection definition list provided at the end of the mbgrid manualbpage.
For instance, to fully specify a particular northern UTM zone, set projection = UTMXXN where XX gives the UTM zone (defined from 01 to 60). As an example, a northern UTM zone 12 projection can be specifiedb using -JUTM12N. Southern UTM zones are specified as UTMXXS. The European Petroleum Survey Group (EPSG) has defined a large number of PCS's used worldwide and assigned number id's to each; one can also specify the northern UTM zone 12 projection using its EPSG designation, or -Jepsg32612.
To convert the geographic grid, no special arguments are required:
mbm_arc2grd -I PatchTopoGeoSq.asc -O PatchTopoGeoSqTr.grd -V
with the following output to the shell:
mbm_arc2grd:
Version: : mbm_grd2arc 2296 2017-04-01 01:48:27Z caress mbm_arc2grd
Input Arc ASCII grid file: PatchTopoGeoSq.asc
Output GMT grd (netcdf COARDS) grid file: PatchTopoGeoSqTr.grd
No data value:
Projection: Geographic
X name:
Y name:
Z name:
Title:
Verbose: 1
Running gmt grdconvert...
gmt grdconvert PatchTopoGeoSq.asc=ef PatchTopoGeoSqTr.grd -V
grdconvert: Translating file PatchTopoGeoSq.asc (format ef = ESRI Arc/Info ASCII Grid Interchange format (ASCII float)) to file PatchTopoGeoSqTr.grd (format nf = GMT netCDF format (32-bit float), COARDS, CF-1.5)
Running gmt grdedit on PatchTopoGeoSqTr.grd...
gmt grdedit PatchTopoGeoSqTr.grd -V -D"Longitude [degrees]/Latitude [degrees]//1/0///__Projection: Geographic"
grdedit: Editing parameters for grid PatchTopoGeoSqTr.grd:
grdedit: Decode and change attributes in file PatchTopoGeoSqTr.grd
grdedit: File PatchTopoGeoSqTr.grd updated.
To convert the UTM grid, the projection must be defined:
mbm_arc2grd -I PatchTopoUTM.asc -O PatchTopoUTMTr.grd -JUTM10N -V
with the following output to the shell:
mbm_arc2grd:
Version: : mbm_grd2arc 2296 2017-04-01 01:48:27Z caress mbm_arc2grd
Input Arc ASCII grid file: PatchTopoUTM.asc
Output GMT grd (netcdf COARDS) grid file: PatchTopoUTMTr.grd
No data value:
Projection: UTM10N
X name:
Y name:
Z name:
Title:
Verbose: 1
Running gmt grdconvert...
gmt grdconvert PatchTopoUTM.asc=ef PatchTopoUTMTr.grd -V
grdconvert: Translating file PatchTopoUTM.asc (format ef = ESRI Arc/Info ASCII Grid Interchange format (ASCII float)) to file PatchTopoUTMTr.grd (format nf = GMT netCDF format (32-bit float), COARDS, CF-1.5)
Running gmt grdedit on PatchTopoUTMTr.grd...
gmt grdedit PatchTopoUTMTr.grd -V -D"Longitude [degrees]/Latitude [degrees]//1/0///__Projection: UTM10N"
grdedit: Editing parameters for grid PatchTopoUTMTr.grd:
grdedit: Decode and change attributes in file PatchTopoUTMTr.grd
grdedit: File PatchTopoUTMTr.grd updated.
In both cases, additional options could have been used to specify the name strings or the nodata value.
Last Updated: 11 April 2017
<< Manual page for the MB-System package | MB-System website >>