How can I change the data in lat lon and time format so that I can make a spatial map

1 回表示 (過去 30 日間)
Joydeb Saha
Joydeb Saha 2022 年 8 月 25 日
コメント済み: Mikhil 2022 年 9 月 22 日
Usually we make spatial plots by : h=pcolor(LON,LAT,Data); in this format. But in the new data, they have XC and YC, the projections in the x axis and the y axis. I want to plot the ice_conc variable here from the attached datafile. But I cannot use the present code or the pcolor function as the ice_conc has the form XC x YC x time format, not the lat x lon x time format.
How can I change the ice_conc in lat lon and time format so that I can make a spatial map

回答 (1 件)

KSSV
KSSV 2022 年 8 月 26 日
The ncfile has lon and lat information.
ncfile = 'ice_conc_nh_ease2-250_icdr-v2p0_202108011200.nc';
lon = ncread(ncfile,'lon') ;
lat = ncread(ncfile,'lat') ;
xc = ncread(ncfile,'xc') ;
yc = ncread(ncfile,'yc') ;
ice_conc = ncread(ncfile,'ice_conc');
pcolor(lon,lat,ice_conc');
shading interp
colorbar
  7 件のコメント
Joydeb Saha
Joydeb Saha 2022 年 8 月 26 日
And, I am using R2017a
Mikhil
Mikhil 2022 年 9 月 22 日
You can try out the function km2deg to resolve this issue:
https://in.mathworks.com/help/map/ref/km2deg.html

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

カテゴリ

Help Center および File ExchangeClimate Science and Analysis についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by