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

7 ビュー (過去 30 日間)
Oliver
Oliver 2015 年 1 月 16 日
編集済み: xiehl11 2022 年 5 月 5 日
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 :)

回答 (1 件)

Chad Greene
Chad Greene 2015 年 1 月 17 日
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 件のコメント
xiehl11
xiehl11 2022 年 5 月 5 日
編集済み: xiehl11 2022 年 5 月 5 日
[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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeWeather and Atmospheric Science についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by