MATLAB: Can Matlab open Grib2 files to extract data grib2 filesMATLAB I work with scientific data from NOAA. The files are GRIB2 type. Can Matlab open these. Best Answer Possibly http://www.mathworks.com/matlabcentral/fileexchange/21579-netcdf-grib-reader Related SolutionsMATLAB: Downloading GRIB files directly into Matlab I would download nctoolbox from:https://github.com/nctoolbox/nctoolboxBelow is some example code to get data using toolbox.fullURL = ['https://nomads.ncep.noaa.gov/cgi-bin/filter_gfs_0p25_1hr.pl?file=gfs.t06z.pgrb2.0p25.f011&lev_surface=on&var_CAPE=on&leftlon=0&rightlon=360&toplat=90&bottomlat=-90&dir=%2Fgfs.2019053006'];filename = 'cape_test.anl';urlwrite(fullURL,filename);addpath('nctoolbox-1.1.3');setup_nctoolbox;grib = ncgeodataset(filename);variables = grib.variables;data = grib.geovariable('Convective_available_potential_energy_surface');grib_data = double(data.data(:));lat = grib.geovariable('lat');grib_lat = double(lat.data(:));lon = grib.geovariable('lon');grib_lon = double(lon.data(:));time = grib.geovariable('time');grib_time = double(time.data(:)); MATLAB: Lat and lon from GEOTIFF when the matrix is not square I found it after a day:info = geotiffinfo(path11);function [lat,lon] = geo_coordinate(info) AX = info.Width; AY = info.Height; [x1,y1] = pix2map(info.RefMatrix, 1:AY, ones(AY,1)'); [lat1,lon1] = projinv(info, x1,y1); [x2,y2] = pix2map(info.RefMatrix, ones(AX,1)',1:AX); [lat2,lon2] = projinv(info, x2,y2); [lat,lon] = ndgrid(lat1,lon2); 1; Related QuestionExtract Lon/lat fron Raster data
Best Answer