Readme:
1) The Matlab functions in this package are for reading out the topographic data from two global topographic data sets GEBCO and ETOPO2v2g. The output formats are of [LON LAT HH] with LON and LAT as vectors and HH as matrix, ready for you to visualize them by contour(LON, LAT, HH).
2) You can freely download from the internet the GEBCO (General Bathymetric Chart of the Oceans, http://www.bodc.ac.uk/data/online_delivery/gebco/) and ETOPO2v2g (http://www.ngdc.noaa.gov/mgg/global/ or more directly http://www.ngdc.noaa.gov/mgg/global/relief/ETOPO2/ETOPO2v2-2006/ETOPO2v2g/netCDF/). With GEBCO, however, you need to register yourself first in their web page.
3) Both data set start with longitude -180 and end up with longitude 180, which are for the same meridian line on the globe. Therefore I expect to see that the first and last column of HH should be identical to each other. For the data set of GridOne.grd, this is the case, except for the two points where the data differ by 1 meter. For the ETOPO2v2g_f4.nc, the situation is puzzling: out of 5401 total points, there are 4774 points where the topographic data differ and the differences rang from 1 meter to 2328 meters. I will refer this problem as the 180 meridian disagreement problem. Please also see my notes inside of the functions *_v2.m.
4) The read_GridOne_v1 and read_GridOne_v2 are two different versions for reading out the data from GridOne.grd. The version 1, read_GridOne_v1, reads out the data as it is, i.e., with the 180 meridian data disagreement problem. With it, you may also run into "Out of memory" if your computer does not have enough RAM; the HH matrix in double precision alone would require 1.74 GB. The version 2, read_GridOne_v2, is designed for computers without large RAM; it also takes care of the 180 meridian disagreement problem by discarding HH(:, end) in the original data set.
5) The read_etopo2v2g_f4_nc_v1 reads out the data from ETOPO2v2g_f4.nc as it is, i.e., with the problem of 180-meridian disagreement. The read_etopo2v2g_f4_nc_v2 takes care of the disagreement problem by discarding HH(:,end) in the original data set.
6) Because of the 180-meridian disagreement problem, I trust in GEBCO more than in ETOPO2v2 now. Your comments on this will be welcome! I can be reached by xuz@dfo-mpo.gc.ca