wind pattern is wrong

Hello All I am trying to plot wind from era interim data , I compare my plot with plot by NCL and Grads and I found that the pattern plotted by the MatLab is wrong. here is the code . I have attached the file data and output. thanks in advance
if true
file2='era_interim_0.5_uv.nc'
lat2 =ncread(file2,'latitude')
long2 =ncread(file2,'longitude')
time2 =double(ncread(file2,'time'))
ncdisp(file2)
u10 = ncread(file2,'u10',...
[1 1 1],[length(long2) length(lat2) length(time2)],[1 1 1]);
v10 = ncread(file2,'v10',...
[1 1 1],[length(long2) length(lat2) length(time2)],[1 1 1]);
%%drawing wind
a_lat2=21.5
a_lat1=-11.5
a_lon1=1.5
a_lon2=51.5
lat1i=find(lat2 == a_lat1)
lat2i=find(lat2 == a_lat2)
lon1i=find(long2 == a_lon1)
lon2i=find(long2 == a_lon2)
lats = [a_lat1 a_lat2];
lons = [a_lon1 a_lon2];
f1=figure;
H1 = worldmap(lats,lons);
coast = load('coast');
geoshow(coast.lat,coast.long);
states = shaperead('cntry02.shp','UseGeoCoords', true);
geoshow(states,'DisplayType', 'polygon', 'FaceColor', 'none','edgecolor','black','LineWidth',2)
a=double(squeeze(lat2(lat2i:lat1i)));
b=double(squeeze(long2(lon1i:lon2i)));
[b1 a1]=meshgrid(b,a);
u100=u10(lon1i:lon2i,lat2i:lat1i,1);
v100=v10(lon1i:lon2i,lat2i:lat1i,1);
quiverm(a1,b1,u100',v100',2)
geoshow(states,'DisplayType', 'polygon', 'FaceColor', 'none','edgecolor','black','LineWidth',2)
end

Risposte (1)

Chad Greene
Chad Greene il 22 Mag 2014

0 voti

Read the quiverm documentation carefully. It confoundingly defines u as the meridional component and v as the zonal component. Further, it wants u and v to be in units of degrees, not distance or speed. This effectively shrinks the zonal component of the vectors close to the poles. You can try to fix the second issue with the reckon function, or you can use ncquiverref instead of quiverm to fix both issues.

1 Commento

Chad Greene
Chad Greene il 29 Lug 2014
Alternatively, quivermc is an adapted version of ncquiverref with different plotting options.

Accedi per commentare.

Richiesto:

il 31 Mar 2014

Commentato:

il 29 Lug 2014

Community Treasure Hunt

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

Start Hunting!

Translated by