How to plot contourf data on m-map polar stereographic projection?

19 views (last 30 days)
I have a code which plots the coastlines, with a stereographic projection over the north pole: see http://postimg.org/image/voc1cpygv/
This is the code which produces it:
m_proj('stereo','lat',90,'rad',70,'lon',0)
figure(1)
m_gshhs_i('patch',[.3 .6 .4]);
hold on
m_grid('XAxisLocation','bottom')
I have wind data for the northern hemisphere at 2.5 x 2.5 degree grid points. i.e
wind = [0 0 0 3 4 2 0
4 0 0 2 2 0 0
0 0 0 0 1 0 0
0 0 0 0 0 1 0
0 4 0 0 0 0 0]; (except a size of [36:144])
How do I produce a plot like this one:
Thanks for any help :)

Answers (1)

Chad Greene
Chad Greene on 17 Jan 2015
I have not used M-Map, but you can easily transform your lat/lon coordinates to polar stereographic coordinates with polarstereo_fwd, then plot using standard Matlab commands like plot, patch, contourf, etc. Given lat/lon arrays of coastlines and gridded lat/lon for the wind data,
[coastx,coasty] = polarstereo_fwd(coastlat,coastlon);
[gridx,gridy] = polarstereo_fwd(gridlat,gridlon);
imagesc(gridx,gridy,wind)
hold on
plot(coastx,coasty)
  1 Comment
xiehl11
xiehl11 on 5 May 2022
Edited: xiehl11 on 5 May 2022
[coastx,coasty] = polarstereo_fwd(coastlat,coastlon);
[gridx,gridy] = polarstereo_fwd(gridlat,gridlon);
Hi Chad, What should be like for the variables: coastlat,coastlon and coastlat,coastlon. Thanks.

Sign in to comment.

Categories

Find more on Polar Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!