How can I draw NSIDC's Polar Stereographic Projection use M_Map
28 views (last 30 days)
Show older comments
When I use the m_map toolkit to draw polar stereographic projections, how do I set up the projection information to get NSIDC's Polar Stereographic Projection(EPSG:3411)。
This is how I currently have it set up, but it's not clear if there is a bias:
m_proj('azimuthal equal-area','latitude',90,'longitude',-45,'radius',45,'rectbox','on');
Can m_map be used in conjunction with PROJ4?
For example using PROJ4:+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 +x_0=0 +y_0=0 +a=6378273 +b=6356889.449 +units=m +no_defs
1 Comment
ailvyou joe
on 17 Feb 2024
Have you solved this problem ? How did you plot a region not centered at lat 90N? I have the same probelm.
Answers (1)
Jakob Weis
on 6 Jun 2024
Edited: Jakob Weis
on 6 Jun 2024
If you have access to the Mapping Toolbox, you can use projcrs and projinv to convert x/y to lat/lon corrdinates. Here's an example:
filepath = '/path/to/file/asi-AMSR2-s6250-20240101-v5.4.nc';
x = ncread(filepath,'x');
y = ncread(filepath,'y');
[X,Y] = meshgrid(x,y);
proj = projcrs(3412,"Authority","EPSG");
[SIC_lat,SIC_lon] = projinv(proj,X,Y);
SIC = ncread(filepath,'z');
SIC(SIC == 0) = NaN;
Note that I'm using Antarctic sea ice data, so you'll have to change the projection code from 3412 to 3411. Also the netCDF file structure of whichever product you're using might differ from the one I used (Bremen ASI-AMSR2 v5.4).
Now you can plot your sea ice concentration using m_map with any projection you want:
figure(1);clf
m_proj('Satellite','latitude',-70,'longitude',-93,'altitude',1);
m_gshhs_l('patch',[.9 .9 .9]);
m_gshhs_l('line','Color',[.5 .5 .5],'LineWidth',1);
m_grid(...
'rectbox','on',...
'ticklen',.005,...
'linewidth', 1,...
'fontsize',fs_m,...
'tickstyle','dd',...
'xaxislocation','top',...
'yaxislocation','right',...
'ytick',-90:15:90,...
'xtick',-180:45:180,...
'xticklabels',[],...
'yticklabels',[],...
'ticklength',0.0000001,...
'GridColor',[.8 .8 .8],...
'LineStyle','-',...
'Color',[0 0 0],...
'FontName',fontname);
hold on
m_pcolor(SIC_lon,SIC_lat,SIC')
hold off
cmocean('ice')
0 Comments
See Also
Categories
Find more on Map Display 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!