Creating a selective meshgrid

4 Ansichten (letzte 30 Tage)
jack kostick
jack kostick am 17 Jun. 2019
Kommentiert: Matt J am 17 Jun. 2019
I am trying to create a meshgrid of lat/lon coordinates, but because the resolution of the points is so fine, my computer runs out of memory and MATLAB aborts the process (see below):
nc=ncgeodataset(['CMC_reg_TMP_TGL_2_ps10km_',yyyymmdd,'00_P',...
chhh,'.grib2']);
nc.variables
dirvar=nc.geovariable(nc.variables(2));
dir=dirvar.data(1,:,:);
g=dirvar.grid_interop(1,:,:);
[glon,glat]=meshgrid(g.lon',g.lat);
Out of memory. Type HELP MEMORY for your options.
My end goal is to be able to extract a smaller grid of points from this giant meshgrid, can anyone think of a way to bypass that and just create the meshgrid to the specifications I need. The lat/ lon boundaries are: Lat: 45.37 to 53.07, Lon: -108.73 to -93.98.
I am on MATLAB R2011b FYI.
  1 Kommentar
Matt J
Matt J am 17 Jun. 2019
Why not just start with the smaller destination grid?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by