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

3 vues (au cours des 30 derniers jours)
Oliver
Oliver le 16 Jan 2015
Modifié(e) : xiehl11 le 5 Mai 2022
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 :)

Réponses (1)

Chad Greene
Chad Greene le 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 commentaire
xiehl11
xiehl11 le 5 Mai 2022
Modifié(e) : xiehl11 le 5 Mai 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.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Weather and Atmospheric Science dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by