Home Research CV Students Computing Tools Pictures


National Oceanography Centre
Southampton Waterfront Campus
European Way, Southampton, SO14 3ZH
E.Frajka-Williams@noc.soton.ac.uk
564/16 National Oceanography Centre
Tel: +44 (0)23 8059 6044

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.

Along track gridded - Altimetry track data

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.

URL:http://podaac.jpl.nasa.gov/DATA_CATALOG/topGravity.html

  1. Get the software to read the files
    • Download the software to read this dataset from ftp://podaac.jpl.nasa.gov/pub/sea_surface_height/topex_poseidon/tp_atg/software/c I.e., open the above address in your browser, right click each filename, and choose "save target as..". Select a dedicated directory on your computer. I use /home/eleanor/Data/ssh/
    • 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".
    • Compile the code
      % make
  2. Download data files to test the software.
    • Location: ftp://podaac.jpl.nasa.gov/pub/sea_surface_height/topex_poseidon/tp_atg/data/ Find file tpatgssha22.369 and do a right-click and save-target-as. Save it to the same directory as your software. This particular cycle is used in the test file example.
    • 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.
  3. Run the test files as shown in SAMPLE_DUMP.PRT
    • The software is invoked as:
      % ./atgdmp_v2 filename mission cycle pass begin_rec end_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:
      1. 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>".
      2. Recompile the code as before
        % make
      3. Run the code on the first sample again. Compare the files. If it matches, then repeat for the next sample.
      4. 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]);".
      5. To divide by 256, change that snippet to "ssh[i-1]>>8);" which does a bit shift, effectively dividing by 2^8 or 256.
      6. 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.
  4. Your code works! You can now get the files you want for your research, run them and output these text files of the SSHA

Back to the full list of dataset instructions available