Creating a selective meshgrid

조회 수: 2 (최근 30일)
jack kostick
jack kostick 2019년 6월 17일
댓글: Matt J 2019년 6월 17일
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
Matt J
Matt J 2019년 6월 17일
Why not just start with the smaller destination grid?

댓글을 달려면 로그인하십시오.

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by