Code covered by the BSD License  

Highlights from
grdwrite2

4.0

4.0 | 1 rating Rate this file 8 Downloads (last 30 days) File Size: 2.69 KB File ID: #26290

grdwrite2

by Kelsey Jordahl

 

06 Jan 2010 (Updated 19 Jul 2011)

Uses built-in netCDF capability to write a grid file to be read by GMT (Generic Mapping Tools).

| Watch this File

File Information
Description

GRDWRITE2(X,Y,Z,'file.grd') will create a grid file containing the data in the matrix Z. X and Y should be either vectors with dimensions that match the size of Z or two-component vectors containing the max and min values for each. The file will be a COARDS-compliant NetCDF file, the standard format for GMT version 4 and later.
 
Based on the compiled mexfile-based function grdwrite, part of the GMT supplemental packages.

For more information on GMT grid file formats, see:
http://www.soest.hawaii.edu/gmt/gmt/doc/gmt/html/GMT_Docs/node70.html

GMT (Generic Mapping Tools) was developed by Paul Wessel and Walter H. F. Smith (http://gmt.soest.hawaii.edu)

See also GRDREAD2, GRDINFO2

MATLAB release MATLAB 7.9 (2009b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
17 Dec 2010 Donglai Gong

Need to update netcdf.create line in grdwrite2.m to work with R2010b. (i.e. the mode should be 'NC_SHARE' instead of 'NC_WRITE'). Otherwise work as advertised. Thanks!

Please login to add a comment or rating.
Updates
19 Jul 2011

Change netcdf.create to use NC_SHARE option

Tag Activity for this File
Tag Applied By Date/Time
data export Kelsey Jordahl 07 Jan 2010 09:27:48
netcdf Kelsey Jordahl 07 Jan 2010 09:27:48
map Kelsey Jordahl 07 Jan 2010 09:27:48
earth science Kelsey Jordahl 07 Jan 2010 10:11:55

Contact us at files@mathworks.com