Downloading ETOPO Bathymetry and Loading it into Matlab
Online Oceanographic Datasets and Data products
If the code or instructions below are helpful to you, I'd love to hear
it. Always nice to know whether it's worthwhile to put these kinds of
instructions online. (Send me an e-mail at the address above.)
Even better, if you encounter and fix a relevant data-access issue that
isn't
in the "troubleshooting" below, let me know so I can add it to the
page.
How to download and parse into matlab the along-track gridded
altimetry product from the PODAAC website. This is one step up from
"along track" in that it's gridded to approximately 6 km spacing along
the track.
Edit the paths for supporting files (reftrk.ascending, reftrk.descending, eqxl_tp_then_j1.dat
and eqxl_new_tp.dat) in atgdmp_v2.c to be nothing, or /home/eleanor/Data/ssh/ (the dedicated directory you
chose above). These lines are approximate (L146, 164, 183, 187, 189) or you can search for "pgsa".
The filename structure is tpatgssha22.XXX, where tp=topex poseidon, atg=along track gridded, ssha=sea
surface height anomaly and XXX is the cycle number, ranging from 11-481. Each file contains 254 passes (each
orbit is 2 passes). More information can be found at
ftp://podaac.jpl.nasa.gov/pub/sea_surface_height/topex_poseidon/tp_atg/doc or the URL above.
Later you'll download the files you actually want for your work. If you don't know which cycles and passes
you want, I will include some matlab files later that will help
you pick them using latitude and longitude boxes.
Run the test files as shown in SAMPLE_DUMP.PRT
The software is invoked as:
% ./atgdmp_v2 filenamemissioncyclepassbegin_recend_rec
where filename is the filename, mission is either tp for TOPEX/Poseidon or j1 for Jason-1, cycle is the cycle
number (11-481 for T/P), pass is the pass number (1-254) and begin_rec and end_rec are the starting and
ending records of the file.
Run the first sample: % ./atgdmp_v2 tpatgssha22.369 tp 369 1 1000 1100
Compare the output with that in SAMPLE_DUMP.PRT. The line of code in the above step will print to
screen. If you want to dump the data to a file, do instead % ./atgdmp_v2 tpatgssha22.369 tp 369 1 1000 1100 > firstexample.txt
Troubleshooting:
When you compare your results to the SAMPLE_DUMP.PRT, if the second printing of "deltat is not 1.0786" then
you probably are missing a few libraries from your c-code. Edit atgdmp_v2.c where you see "#include
<stdio.h>" and below it add the lines "#include <stdlib.h>" and "#include
<string.h>".
Recompile the code as before % make
Run the code on the first sample again. Compare the files. If it matches, then repeat for the next
sample.
If your SSHA is off by a factor of 256.. mine was, I don't know why, then you can fix this by changing
line 250 or 252 in the code, where you see "ssh[i-1]);".
To divide by 256, change that snippet to "ssh[i-1]>>8);" which does a bit shift, effectively dividing by
2^8 or 256.
Recompile, rerun and test. If things still don't match, then I don't know what the problem is.
Sorry! Note (10/30/08): The software for jason is slightly
different--notably, there is another c file called "swapbyte.c". You need this
one, if you find you're getting errors for sea surface height anomalies higher than
128.
Your code works! You can now get the files you want for your research, run them and output these text
files of the SSHA