How can I plot a map of T2 of WRF output?

5 ビュー (過去 30 日間)
Abdus Samie
Abdus Samie 2019 年 5 月 26 日
コメント済み: Abdus Samie 2019 年 6 月 2 日
I am new to Matlab. I want to creat a map of temperature (T2) produced y WRF model having dimensions x=48, y=66 and Times=12. I applied following command but showed error.
filename=('D:\Tces_ctl.nc');
temp=ncread(filename,'T2');
longitude=ncread(filename,'XLONG');
latitude=ncread(filename,'XLAT');
mymap=pcolor(longitude,latitude,temp);
Error using pcolor (line 61) Matrix dimensions must agree. Anyone could please me guide about it or share me email so that I could send that file via email.

採用された回答

KSSV
KSSV 2019 年 5 月 26 日
mymap=pcolor(longitude,latitude,temp');
You transpose the matrix and plot.
  7 件のコメント
KSSV
KSSV 2019 年 5 月 31 日
filename=('D:Tces_ctl.nc');
longitude=ncread(filename,'XLONG');
latitude=ncread(filename,'XLAT');
temp=ncread(filename,'T2');
for i = 1:size(temp,3)
mymap=pcolor(longitude,latitude,temp(:,:,i));
shading interp
end
Abdus Samie
Abdus Samie 2019 年 6 月 2 日
Thank you so much. It works now.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Performance についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by