필터 지우기
필터 지우기

Plotting Wind magnitude and direction

조회 수: 24 (최근 30일)
shravani banerjee
shravani banerjee 2018년 10월 24일
댓글: KSSV 2020년 1월 20일
Hello, I need to plot hourly wind maps with magnitude as its background and direction arrows above it. I have 2 nc file which contains hourly data of wind magnitude i.e., u component and Wind direction i.e., v component for a month. how can I plot these based on different time interval. hereby i am attaching my both nc file named uwnd and vwnd. Please help me out. Thanks in advance. netcdf file

답변 (2개)

KSSV
KSSV 2018년 10월 24일
YOu can read the data from ncfile using ncread.
Let u, v be your wind matrices. And X, Y be your locations.
M = sqrt(u.^2+v.^2) ; % magnitude
figure
hold on
pcolor(X,Y,M) ;
shading interp
quiver(X,Y,u,v)
  댓글 수: 9
shravani banerjee
shravani banerjee 2018년 11월 9일
편집: shravani banerjee 2018년 11월 9일
is this command correct? %
thedates = datetime(datestr((double(t)/24+pivot))) ;
as i am getting an error in this line.
Error using date2time (line 55)
Not enough input arguments
KSSV
KSSV 2018년 11월 9일
편집: KSSV 2018년 11월 9일
It is working fine in my version......YOu can comment that line and title line...and check.

댓글을 달려면 로그인하십시오.


Bijay Guha
Bijay Guha 2020년 1월 20일
This kind of wind vector plots are possible in MATLAB?? Kindly help!
The attached image shows the wind vector plots in the vertical axis. I need the help regarding the arrows only!
Thanks in Advance
Regards
  댓글 수: 1
KSSV
KSSV 2020년 1월 20일
Read about quiver. It should help you.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by