-
Notifications
You must be signed in to change notification settings - Fork 28
Description
[from @kakearney]
The input parsing and checking is much improved! But there are still a few places where things fall through the cracks, notably with file input. It would be nice if the various functions verified that files exist before they try to open them. At the very least, some checks should be added to the demos.m file to make sure the user-modified bathymetry_dir path points to a valid file, and to error out gracefully if it does not. For example, if a user were to ignore the instructions to modify the path (and I guarantee you most of them will!), this is the error they will get:
Error using netcdf.open (line 52)
Could not open file
'/Users/lnferris/Documents/data/bathymetry/topo_20.1.nc'.
Error in bathymetry_extract (line 51)
nc = netcdf.open(bathymetry_dir, 'NOWRITE'); % open the
file as netcdf datasource.
Error in demos (line 58)
bathymetry_plot(bathymetry_extract(bathymetry_dir,bounding_region(argo)),'2Dcontour')