%% Open netcdf ncid = netcdf.open('C:\Users\Owner\Desktop\t\tasmax_AFR-44_MOHC-HadGEM2-ES_historical_r1i1p1_SMHI-RCA4_v1_day_19510101-19551230.nc','NC_NOWRITE'); %% Get all information about the netcdf file fileinfo = ncinfo('C:\Users\Owner\Desktop\t\tasmax_AFR-44_MOHC-HadGEM2-ES_historical_r1i1p1_SMHI-RCA4_v1_day_19510101-19551230.nc'); disp(fileinfo); %% get info on a dimension dim_0=netcdf.inqVar(ncid,0); dim_1=netcdf.inqVar(ncid,1); dim_X=netcdf.inqVar(ncid,X); (with X==max number dimension in the file) %% get values corresponding to a dimension var_0 = netcdf.getVar(ncid,0); (e.g. var_0 = latitude) var_1 = netcdf.getVar(ncid,1); (e.g. var_1=longitude) var_X= netcdf.getVar(ncid,X); (e.g. var_X=SST)