SO503, Spring 2013

Matlab TS Plots

 

You are to produce four figures for the following data set, which is a single profile from the NODC site below.

  1. Temperature versus depth
  2. Salinity versus depth
  3. A TS plot with the station profile, and contours of sigma-tee.
  4. A map showing the location of the station.  You should look up the commands geoshow and scatterm

You will have a writeup which correctly references the source of the data, correctly refers to the two figures, and briefly interprets what the TS diagram shows. This should be short and concise.

Your program should be able to handle a second data set with the same format, but a different number of points, solely by changing the name of the file to read.  You will be given that data file at a later time. In addition, we will work on two additional  modifications for the data, which you should consider as you design the code: (1) plotting a 3D visualization of the temperature and salinity, and (2) exporting the data to a simple text file.

Resources:

This will be due Friday 29 March at 1630.


Hints:

File manipulation:

id=fopen('C:\mydocs\Courses\SO503\Labs\matlab_sigma_t\profile2.txt');
while ~feof(id)
   readin = fgetl(id);
end;
fclose(id);
 

 

This will work to read into a string:

    param1=readin(133:136);

Trying to make param(1) is very hard.  I would use an if statement:

if i==1

   param1=readin(133:136);

else

   param2=readin(133+17:136+17);

end

As a starting point for the map:

worldmap world

geoshow('landareas.shp', 'FaceColor', [0.5 1.0 0.5]);

axesm('MapProjection','robinson','Frame','off','Grid','off')

scatterm(lat,long);