How can I plot polar stereographic projection?

Hello, I have concentration, latitude and longitude data as [m x n] matrices from NSIDC (<http://nsidc.org/data/docs/daac/nsidc0079_bootstrap_seaice.gd.html)>. The data are gridded over polar stereographic grid. Can someone help me to plot sea ice concentration over the Arctic?
Thanks very much, BD

 Accepted Answer

I did this for the Antarctic in a function called seaice.
You'll want to download psn25lats_v3.dat and pss25lats_v3.dat, which contain lat,lon grid information. The seaice function imports lat,lon grids for the southern hemisphere like this:
fid = fopen('pss25lons_v3.dat');
lon = fread(fid,[316 332],'long','ieee-le')/100000;
fclose(fid);
fid = fopen('pss25lats_v3.dat');
lat = fread(fid,[316 332],'long','ieee-le')/100000;
fclose(fid);
You can then use Andrew Bliss' polarstereo_fwd to convert lat,lon to x,y and plot with pcolor or imagesc.
Hope this helps.

3 Comments

Hi Chad, Thank you for replying! I tried those steps upto: [x,y]=polarstereo_fwd(lat,lon,6378388.0,0.0819919,-71,-100);
But as I try to plot the data using pcolor(x,y,data) it does not give any plot for Arctic. And for imagesc(x,y,data), it gives the following error: "Error using image Image XData and YData must be vectors. Error in imagesc (line 20) hh = image(varargin{:},'CDataMapping','scaled')"
I need to plot something like your seaice but for the Arctic region. Thanks very much!
What are the values in x and y after they're defined by polarstereo_fwd? They should be on the order of 10^6 meters.
I have now written a function for the arctic as well. It's called arcticseaice.

Sign in to comment.

More Answers (1)

One option is to use Arctic Mapping Tools for Matlab, which includes functions to transform between geo coordinates and polar stereographic coordinates. Also includes many functions such as plotpsn and pcolorpsn which plot lat,lon data in polar stereographic (north) coordinates.

3 Comments

How would I go about if I have a [m x n] matrix of 'lat' 'lon' values and a 'Z' value at each point? (I first have the 'lat 'lon' values as individual vectors). The function ll2pn and pcolorpsn require that the 'lat' 'lon' vectors are of equal length. Would I have to regrid the data first to apply the stereographic projection?
You'll need to turn your vectors into grids, and you can do that with one step. It will probably be either:
[Lat,Lon] = meshgrid(lat,lon);
pcolorpsn(Lat,Lon,Z)
or possibly
[Lon,Lat] = meshgrid(lon,lat);
pcolorps(Lat,Lon,Z);
That should be all you need. If you try one of this and it seems to work except that the results are upside down, you might need to do fliplr(lon) or flipud(lon) or fliplr(lat) or flipud(lat) inside the call to meshgrid.
Thank you! I also saw your comment at the same time (both upvoted).

Sign in to comment.

Asked:

BD
on 26 Feb 2016

Commented:

on 17 Jun 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!