wind pattern is wrong
조회 수: 2 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (1개)
Chad Greene
2014년 5월 22일
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
Chad Greene
2014년 7월 29일
참고 항목
카테고리
Help Center 및 File Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!