Downloading World Ocean Atlas 2009 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.
Choose the resolution you want (1 degree), data field (temperature), then in the "Available file types" choose "All fields in csv format" at the bottom. In the right hand box, choose "climatology_csv.tar". If you don't choose the "all fields" option, the scripts below may not be able to parse the data format.
After downloading, move the file to the directory where you want to store the data, and extract the data.
% tar -xvf climatology_csv.tar
% gunzip *gz
% tar -xvf *tar
Step 1 creates a bunch of t_TT_1d.tar.gz files where TT ranges from 00 to 16 for the time period (annual, 4 seasons, 12 months).
Step 2, if applied to a single file as "gunzip t_00_1d.tar.gz" will unzip this file, leaving t_00_1d.tar
Step 3, if applied to a single file as "tar -xvf t_00_1d.tar" will untar this packet of files, resulting in t_00_DD_1d.csv where DD ranges from 01 to 40, the standard depth levels (see Table 2 in woa09documentation.pdf).
Use the scripts rcwm_scr.m and read_csv_write_mat to parse the csv files into Matlab. You will need to update the variable names at the top of rcwm_scr.m to match the directories you'd like to use, and the data fields and resolutions you've downloaded.