How to plot humidity data on a world map?

5 次查看(过去 30 天)
Hi there,
I have average humidity data as well as longitude and latitude data from the corresponding weather stations. I'm relatively new to MatLab and would like to know how would I go about creating a colour map of this data?
Best regards,
Frank

回答(1 个)

Nathan Hardenberg
Nathan Hardenberg 2023-7-20
An easy way would be to use geoscatter(). This does not interpolate but just plots the points with color according to the value.
lon = -1*[165, 155, 155, 140, 132, 140, 145, 180, 165]; % data
lat = [55, 60, 70, 67, 62, 60, 70, 52, 65];
data = [3, 1, 5, 2, 0.5, 3, 4, 0, 1];
figure(1);
markerSize=1000;
geoscatter(lat, lon, markerSize, data, '.') % plot points
colormap(jet) % choose colormap
colorbar % show colorbar in figure
If you want to interpolate the data (get values in between), the problem gets quite a bit harder. There are ways to interpolate which are for example shown here:
and I also gave it a shot here:
The problem is that this interpolates in 2D and not on the earth (a spherical surface). For smaller regions that is good enough, but if you have the whole world for example this does not work anymore.
Sadly I did not find any easy solution for this problem

类别

Help CenterFile Exchange 中查找有关 Weather and Atmospheric Science 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by