wind pattern is wrong

2 vues (au cours des 30 derniers jours)
ahmed shaaban
ahmed shaaban le 31 Mar 2014
Commenté : Chad Greene le 29 Juil 2014
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

Réponses (1)

Chad Greene
Chad Greene le 22 Mai 2014
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 commentaire
Chad Greene
Chad Greene le 29 Juil 2014
Alternatively, quivermc is an adapted version of ncquiverref with different plotting options.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by