How to read and plot nc4 files?

14 ビュー (過去 30 日間)
kk1991
kk1991 2017 年 5 月 8 日
コメント済み: KSSV 2017 年 5 月 8 日
I have downloaded huge nc4-files from NASA through matlab. Just wondering if someone know how to read spesific things in these files and then plot them?

採用された回答

KSSV
KSSV 2017 年 5 月 8 日
Read about ncdisp, ncread
These two should be enough to read the data.
  2 件のコメント
KSSV
KSSV 2017 年 5 月 8 日
kk1991 commented: Thank you. But how can I get this spesific values out from the file?
KSSV
KSSV 2017 年 5 月 8 日
ncdisp('my nc file')
displays all the information of the file.....using that information, you can read your required variable using ncread

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

その他の回答 (1 件)

kk1991
kk1991 2017 年 5 月 8 日
So, if i use this one: ncdisp('myfile.nc4', 'T'); the information about temperature is coming out.
But I want to take out some values with [lat, long and time] values and plot it. Is that possible?
  1 件のコメント
KSSV
KSSV 2017 年 5 月 8 日
It is very much possible.....Read the documentation....
lon = ncread('myfile.nc','lon') ;
lat = ncread('myfile.nc','lat') ;
data = ncread('myfile.nc','data') ;
% plot here
And please don't type your comment sin answer box. You comment under the answer/ comment.

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

カテゴリ

Help Center および File ExchangeStandard File Formats についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by