Geoscience Reference
In-Depth Information
NCOLS 1801
NROWS 2401
XLLCENTER 30.0000000000
YLLCENTER -20.0000000000
CELLSIZE 0.016666666667
NODATA_VALUE -32768
294 299 293 288 285 282 ...
294 294 289 291 281 276 ...
288 285 285 283 280 272 ...
280 276 277 277 283 279 ...
271 272 271 274 280 283 ...
267 270 268 272 272 276 ...
(cont'd)
h e headers document the size of the data matrix (e.g., 1801 columns and
2401 rows in our example), the coordinates of the lower-let corner (e.g., x =30
and y =-20), the cell size (e.g., ~0.0167=1/60 degree latitude and longitude),
and the -32768 l ag for data voids. We comment the header by typing % at the
beginning of the i rst six lines
%NCOLS 1801
%NROWS 2401
%XLLCENTER 30.0000000000
%YLLCENTER -20.0000000000
%CELLSIZE 0.016666666667
%NODATA_VALUE -32768
294 299 293 288 285 282 ...
294 294 289 291 281 276 ...
288 285 285 283 280 272 ...
280 276 277 277 283 279 ...
271 272 271 274 280 283 ...
267 270 268 272 272 276 ...
(cont'd)
and load the data into the workspace.
clear
ETOPO1 = load('grid01-258.asc');
We l ip the matrix up and down. h e -32768 l ag for data voids must then be
replaced by the MATLAB representation for Not-a-Number NaN .
ETOPO1 = flipud(ETOPO1);
ETOPO1(find(ETOPO1 == -32768)) = NaN;
Finally, we check whether the data are now correctly stored in the workspace
by printing the minimum and maximum elevations for the area.
max(ETOPO1(:))
min(ETOPO1(:))
Search WWH ::




Custom Search