Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input parsing - verify files exists #38

Open
lnferris opened this issue Oct 22, 2020 · 0 comments
Open

input parsing - verify files exists #38

lnferris opened this issue Oct 22, 2020 · 0 comments

Comments

@lnferris
Copy link
Owner

[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')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant