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

3 views (last 30 days)
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

Answers (1)

KSSV on 26 Aug 2022
The ncfile has lon and lat information.
ncfile = '';
lon = ncread(ncfile,'lon') ;
lat = ncread(ncfile,'lat') ;
xc = ncread(ncfile,'xc') ;
yc = ncread(ncfile,'yc') ;
ice_conc = ncread(ncfile,'ice_conc');
shading interp
Mikhil on 22 Sep 2022
You can try out the function km2deg to resolve this issue:

Sign in to comment.


Find more on Earth, Ocean, and Atmospheric Sciences in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!