| 1 |
heimbach |
1.1 |
function [etopo2,lon,lat]=get_etopo2(lon,lat) |
| 2 |
|
|
% Function [etopo2,lon,lat]=get_etopo2(lon,lat) |
| 3 |
|
|
% get etopo2 bathymetry |
| 4 |
|
|
% etopo2 is decimated on grid defined by input lon/lat; |
| 5 |
|
|
% if input lon/lat is not specified, full resolution etopo2 |
| 6 |
|
|
% is returned. etopo2 bathymetry file obtained from |
| 7 |
|
|
% http://www.ngdc.noaa.gov/mgg/global/relief/ETOPO2/ETOPO2.raw.bin |
| 8 |
|
|
% |
| 9 |
|
|
% INPUTS |
| 10 |
|
|
% lon longitude East (deg) |
| 11 |
|
|
% lat latitude North (deg) |
| 12 |
|
|
% |
| 13 |
|
|
% OUTPUTS |
| 14 |
|
|
% lon longitude East (deg) |
| 15 |
|
|
% lat latitude North (deg) |
| 16 |
|
|
% etopo2 2-D array containing bathymetry (m) |
| 17 |
|
|
|
| 18 |
|
|
elon=0:1/30:(360-1/30); |
| 19 |
|
|
elat=(-90+1/30):1/30:90; |
| 20 |
|
|
|
| 21 |
|
|
etopo2=rot90(readbin('ETOPO2.raw.bin',[10800 5400],1,'int16'))'; |
| 22 |
|
|
etopo2=etopo2([5401:10800 1:5400],:); |
| 23 |
|
|
|
| 24 |
|
|
if nargin < 2 |
| 25 |
|
|
lon=elon; |
| 26 |
|
|
lat=elat; |
| 27 |
|
|
else |
| 28 |
|
|
etopo2=decim2(elon,elat,etopo2,lon,lat); |
| 29 |
|
|
end |