when i creat the grid file by EASYGRID, it report a error!

In the easygrid.m files, I set

% Geographical and Grid parameters --------

lat = 0.86; % Latitude (degrees) of the bottom-left corner of the grid.

lon = 99; % Longitude (degrees) of the bottom-left corner of the grid.

X = 3120000; % Width of domain (meters) 26.33

Y = 2800000; % Length of domain (meters)

rotangle = 0; % Angle (degrees) to rotate the grid conterclock-wise

resol = 11000; % Cell width and height (i.e. Resolution)in meters. Grid cells are forced to be (almost) square.

N = 10; % Number of vertical levels

And the *_bathy.mat file is created by myself, and the area is 0.8~26.5N 98.5~131 E,resolution is 2 minutes.

??? Error using ==> qhullmx

qhull precision warning:

The initial hull is narrow (cosine of min. angle is 1.0000000000000002).

A coplanar point may lead to a wide facet. Options 'QbB' (scale to unit box)

or 'Qbb' (scale last coordinate) may remove this warning. Use 'Pp' to skip

this warning. See 'Limitations' in http://www.qhull.org/html/qh-impre.htm

qhull precision error: initial simplex is not convex. Distance=1.2e-014

While executing: | qhull d Qt Qbb Qc

Options selected for Qhull 2003.1 2003/12/30:

delaunay Qtriangulate Qbbound-last Qcoplanar-keep _pre-merge

_zero-centrum Pgood Qinterior-keep _max-width 35 Error-roundoff 1.6e-013

_one-merge 1.2e-012 Visible-distance 3.3e-013 U-coplanar-distance 3.3e-013

Width-outside 6.6e-013 _wide-facet 2e-012 _narrow-hull -2.2e-016

precision problems (corrected unless 'Q0' or an error)

1

flipped facets

The input to qhull appears to be less than 3 dimensional, or a

computation has overflowed.

Qhull could not construct a clearly convex simplex from points:

The center point is coplanar with a facet, or a vertex is coplanar

with a neighboring facet. The maximum round off error for

computing distances is 1.6e-013. The center point, facets and distances

to the center point are as follows:

facet

p160696

p378

p0

distance= -8.9e-015

facet

p161074

p378

p0

distance= -1.8e-015

facet

p161074

p160696

p0

distance= -1.8e-015

facet

p161074

p160696

p378

distance= -3.6e-015

These points either have a maximum or minimum x-coordinate, or

they maximize the determinant for k coordinates. Trial points

are first selected from points that maximize a coordinate.

The min and max coordinates for each dimension are:

0: 99 130.5 difference= 31.5

1: 0.8333 36.17 difference= 35.33

2: 0 35.33 difference= 35.33

If the input should be full dimensional, you have several options that

may determine an initial simplex:

- use 'QJ' to joggle the input and make it full dimensional

- use 'QbB' to scale the points to the unit cube

- use 'QR0' to randomly rotate the input for different maximum points

- use 'Qs' to search all points for the initial simplex

- use 'En' to specify a maximum roundoff error less than 1.6e-013.

- trace execution with 'T3' to see the determinant for each point.

If the input is lower dimensional:

- use 'QJ' to joggle the input and make it full dimensional

- use 'Qbk:0Bk:0' to delete coordinate k from the input. You should

pick the coordinate with the least range. The hull will have the

correct topology.

- determine the flat containing the points, rotate the points

into a coordinate plane, and delete the other coordinates.

- add one or more points to make the input full dimensional.

This is a Delaunay triangulation and the input is co-circular or co-spherical:

- use 'Qz' to add a point "at infinity" (i.e., above the paraboloid)

- or use 'QJ' to joggle the input and avoid co-circular data

Error in ==> delaunayn at 117

t = qhullmx(x', 'd ', opt);

Error in ==> griddata>linear at 151

tri = delaunayn([x y]);

Error in ==> griddata at 120

zi = linear(x,y,z,xi,yi,opt);

Error in ==> south_sea_easygrid at 281

h = griddata(xbathy,ybathy,zbathy,lon_rho,lat_rho,'linear');

But when I run easygrid.m and use the depth from ETOPO5 by

[xbathy,ybathy,zbathy]=read_srtm30plus(lon_range+1,lat_range,300);

%This reads in worldwide bathymetry at 60 second (1 minute) resolution,

%30seconds max

[xbathy,ybathy]=meshgrid(xbathy,ybathy);

xbathy = xbathy(:); %columnize

ybathy = ybathy(:); %columnize

zbathy = -zbathy(:); %columnize, and make depth positive

% outname=strcat(name,'_bathy.mat','interpreter','none')

save([name,'_bathy.mat'],'xbathy','ybathy','zbathy')

it is OK. So I don't know the reasons when I use my depth mat file, it is created by

dat=load('55.dat');

zbathy=dat(:,3);

ybathy=dat(:,1);

xbathy=dat(:,2);

save south_sea_bathy xbathy ybathy zbathy

Who can tell me the reasons for that? Thank you very much!!