Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
a rough bug fix, see code
  • Loading branch information
davidnbresch committed Oct 22, 2014
1 parent e0d2716 commit 181a930
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions code/etopo_get.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
% sourcefile: the source file (.../ETOPO1.nc)
% MODIFICATION HISTORY:
% David N. Bresch, david.bresch@gmail.com, 20140422
% David N. Bresch, david.bresch@gmail.com, 20141022, small fix if requested area ourside limits (just a FIX, not a nice one, see below)
%-

ETOPO=[]; % init output
Expand Down Expand Up @@ -115,6 +116,8 @@
% z = ncread(file,'z',[1 3000], [Inf Inf]); % the full dataset

% read the required subset of the global dataset
if isnan(startx),startx=1;end % 20141022, david_bresch@gmail.com
if isnan(countx),countx=1;end % 20141022, david_bresch@gmail.com
ETOPO.h = ncread(etopo_data_file,'z',[startx starty], [countx+1 county+1]);
ETOPO.h=ETOPO.h'; % transpose to fit meshgrid definition (see next line)

Expand Down

0 comments on commit 181a930

Please sign in to comment.