I have 4 types data sets, Daily global maps of Earth’s surface temperature and near-surface air temperature, precipitable water and cloud water path for the whole year 2004. Map covers whole globe at 2.5 degree intervals = 72 x 144 array. How can I make a global map?

Réponses (2)

KSSV
KSSV le 27 Sep 2016

1 vote

You may have a look on this:
https://www.eoas.ubc.ca/~rich/map.html
Kelly Kearney
Kelly Kearney le 28 Sep 2016

1 vote

If you have the Mapping Toolbox, geoshow with worldmap is usually good for a first pass:
data = rand(72,144);
rv = [0.4 90 0];
worldmap('world');
geoshow(data, rv, 'displaytype', 'texturemap');
C = load('coast');
plotm(C.lat, C.long, 'k');
Note that here I'm georeferencing using a reference vector, rv, which defines your grid resolution (0.4 cells/degree) and corner (upper left corner at 90N, 0E).
Alternatively, if you want more control over the projection, plotting details, etc., look into axesm, pcolorm, surfm, etc.

5 commentaires

I inserted it into my code, but it does not work following my code;
for i = 1:12
if (i == 1||i == 3||i == 5||i == 7||i == 1||i == 10||i == 12)
for j = 1:31
filename = sprintf('TA2004%02d%02d.txt',i,j);
x = load(filename);
rv = [0.4 90 0];
worldmap('world');
geoshow(x, rv, 'displaytype', 'texturemap');
C = load('coast');
plotm(C.lat, C.long, 'k');
end
elseif i == 2
for j = 1:29
filename = sprintf('TA2004%02d%02d.txt',i,j);
x = load(filename);
rv = [0.4 90 0];
worldmap('world');
geoshow(x, rv, 'displaytype', 'texturemap');
C = load('coast');
end
else
for j = 1:30
filename = sprintf('TA2004%02d%02d.txt',i,j);
x = load(filename);
rv = [0.4 90 0];
worldmap('world');
geoshow(x, rv, 'displaytype', 'texturemap');
C = load('coast');
end
end
end
Kelly Kearney
Kelly Kearney le 7 Oct 2016
Define "does not work"... Error message? Incorrect plot?
Does each file include a 72 x 144 grid of data points, already in a 2D array? And do you want 300+ maps, one for each i/j combo? If not, then please explain your data in more detail.
Naoki Ishibashi
Naoki Ishibashi le 7 Oct 2016
Sorry, simply i misunderstood about data sets.i can gate good global temperature map, but if i want to gate precipitable water and cloud water path map, should i change some parts?
Kelly Kearney
Kelly Kearney le 10 Oct 2016
The plotting parts of the code would stay the same; the only difference would be the data that you pass to the plotting functions (i.e. the x variable in the examples above).
Naoki Ishibashi
Naoki Ishibashi le 12 Oct 2016
Thank you so much. I can do.

Connectez-vous pour commenter.

Catégories

Produits

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by