- Load all the data into work space using ncread. And use slice. Read about slice function.
- Find out in which row/ column the 32.5 E lies using knnsearch and extract the entire row data.
How does I extract data from netcdf on given lat lon?
11 views (last 30 days)
I have a .NC file of 'uwnd' with 4 dimensions that includes lon, lat, level, time. I would like to extract uwnd data time seris from the netcdf file on this given lat (10 to 70 N) lon (only 32.5 E) position and all time. Is there any way to do that? My netcdf file name is "uwnd.1972.nc".
I wrote an incomplete code in MATLAB for this purpose, which is as follows
u=ncread(file,'uwnd',[14 9 8 1],[14 33 8 inf],[1 1 1 1]);
KSSV on 19 Jan 2022
You have multiple ways to do it.