mbm_grdcut
Section: MB-System 5.0 (1)
Updated: 3 June 2013
Index
NAME
mbm_grdcut - Macro to extract a specified subarea of a GMT GRD grid file as another GRD file.VERSION
Version 5.0SYNOPSIS
mbm_grdcut -Iinfile -Ooutfile -Rw/e/s/n [-H -V]DESCRIPTION
mbm_grdcut is a macro to painlessly cut out a region from a GMT GRD grid file. The GMT program grdcut requires that one specify bounds which exactly match grid cell boundaries. Frequently, one just wants to extract an approximate region quickly, without calculating grid cell sizes and boundary locations. This macro does the the calculations and extracts the subregion closest to that specified by the user.AUTHORSHIP
David W. Caress (caress@mbari.org)
Monterey Bay Aquarium Research Institute
Dale N. Chayes (dale@ldeo.columbia.edu)
Lamont-Doherty Earth ObservatoryOPTIONS
To obtain the desired sub-grid, the following will suffice:
mbm_grdcut -I KohalaA_bath.grd -O Kohala_plunge -R-155:31/-155:26/20:13/20:18 -V
The resulting output is:
Program mbm_grdcut status:
Input GRD file: kohalaa.grd
Output GRD file: z.grd
Input Grid bounds: -155.72855 -155.3192906 20.09488 20.47628103
Input grid dimensions: 1426 1329
Grid cell sizes: 0.0002871995719 0.0002871995719
Requested Grid bounds: -155.516667 -155.433333 20.216667 20.3
Output Grid bounds: -155.516884 -155.433596 20.216653 20.299940
Output grid dimensions: 291 291
Running grdcut...
grdcut kohalaa.grd -Gz.grd -R-155.516884/-155.433596/20.216653/20.299940 -V
grdcut: File spec: W E S N dx dy nx ny:
grdcut: Old: -155.729 -155.319 20.0949 20.4763 0.0002872 0.0002872 1426 1329
grdcut: New: -155.517 -155.434 20.2167 20.2999 0.0002872 0.0002872 291 291
Last Updated: 3 June 2013