Project Week 3 Exercise 1
M Mitchell, P Noble - 01/03/2024
Schedule:
All week, Week 23 .

Plotting Geophysical Data


For this first exercise we have pre-downloaded two files onto all the hard drives in the room for you. Please work through this exercise in 2s or 3s within your group 

1. Find the data location in your file explorer

ESACCI-SEAICE-L4-SICONC-AMSR_25.0kmEASE2-NH-20160101-fv2.1.nc.  

2. Download the function getnet.m

3. Download the script Exercise1.m

4. Edit the script Exercise1.m to make a plot of the data 

% Example 1
clear all % clears all variables in your workspace

% ***** THIS SECTION IS WHAT YOU NEED TO EDIT FIRST! **********************************
% change the data location and file name to match your data
data_location = 'C:\Users\pn399\OneDrive - University of Bath\Teaching\CT\Exercise1\'; 
data_file_name = 'ESACCI-SEAICE-L4-SICONC-AMSR_25.0kmEASE2-NH-20160801-fv2.1.nc';      
% *************************************************************************************


% this line joins together the data location and filename to make a path
% for the data
data_path = strcat(data_location,data_file_name);

% This line uses the function getnet to read in the netcdf (.nc) files
% into matlab
sea_ice = getnet(data_path);

% sea_ice is our structure of data which contains all the data from the
% data file

% Here we extract the data we want from the structure called sea_ice
ice_concentration = sea_ice.Data.ice_conc;
x = sea_ice.Data.xc;
y = sea_ice.Data.yc;

% Plotting
figure()
pcolor(x,y,ice_concentration'); shading flat; % the shading flat here gets rid of the black grid lines
title('Put title here')
c = colorbar();
c.Label.String = 'put colorbar label here';
xlabel('x label here');
ylabel('y label here');
Code snippet

5. What does the plot show?

Hint, the white areas are land

6. Give the plot appropriate colourbar labels, axis labels and titles 

Hint, look at the structure called sea_ice, the attributes section will tell you information about all the different variables in this datafile, such as units and scale factor

7. Repeat for another other data file

‘ESACCI-SEAICE-L4-SICONC-AMSR_25.0kmEASE2-NH-20160801-fv2.1.nc’ 

8. Think about the two plots.

What is a possible reason for their difference?  

(Hint, explore the time variable in the sea_ice structure or look at the file names)