grdread2

버전 1.2.0.0 (2.69 KB) 작성자: Kelsey Jordahl
Uses built-in netCDF capability to load a grid file created by GMT (Generic Mapping Tools) v3 or v4
다운로드 수: 7.1K
업데이트 날짜: 2010/1/6

라이선스 보기

Z=GRDREAD2('filename.grd') will return the data as a matrix in Z

[X,Y,Z]=GRDREAD2('filename.grd') will also return X and Y vectors suitable for use in Matlab commands such as IMAGE or CONTOUR.
e.g., imagesc(X,Y,Z); axis xy

This function will load COARDS compliant netCDF grdfiles, the standard format in GMT 4 and later, as well as GMT v3 netCDF formats. The data matrix Z will have a MATLAB data type appropriate to the data type used in the netCDF file. Although both gridline and pixel registered grids can be read, pixel registration will be converted to gridline registration for the x- and y-vectors in MATLAB.

This program currently does little error checking and makes some assumptions about the content and structure of netCDF files that may not always be valid (especially in grids created in other software, even if they can be read by GMT). It has been tested on grid files created in a number of GMT versions since 3.1, using MATLAB R2009b in OS X, Linux and Windows, and in R2008b in OS X. It will not work with any binary grid file formats. It is the responsibility of the user to determine whether this program is appropriate for any given task.

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 GRDWRITE2, GRDINFO2

인용 양식

Kelsey Jordahl (2024). grdread2 (https://www.mathworks.com/matlabcentral/fileexchange/25683-grdread2), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2008b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
도움

도움 준 파일: grdinfo2, grdwrite2

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.2.0.0

Minor documentation changes to indicate the related files grdwrite2 and grdinfo2.

1.1.0.0

now supports all GMT netCDF grids, including those created by GMT v3.x.

1.0.0.0