-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
398 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
__author__ = 'sean.tokunaga@ifremer.fr' | ||
|
||
""" | ||
A bunch of custom errors used in argopy. | ||
""" | ||
|
||
class NetCDF4FileNotFoundError(FileNotFoundError): | ||
""" | ||
Most common error. Basically just a file not found. | ||
I made a custom one to make it easier to catch. | ||
""" | ||
def __init__(self, path, verbose=True): | ||
if verbose: | ||
print("Error: Couldn't find NetCDF4 file:") | ||
print(path) | ||
self.path = path | ||
|
||
|
||
class UnrecognisedDataSelectionMode(ValueError): | ||
""" | ||
This is to be used when the user fails to specify a valid data selection mode. | ||
the valid ones to date are ""delayed_mode", "real-time", "adj_non_empty" (default), "data_mode" | ||
""" | ||
def __init__(self, institute=None, wmo=None): | ||
self.institute = institute | ||
self.wmo = wmo | ||
|
||
|
||
class UnrecognisedProfileDirection(ValueError): | ||
""" | ||
Not "A" or "D". Argopy should have recognized those. | ||
""" | ||
def __init__(self, institute=None, wmo=None): | ||
self.institute = institute | ||
self.wmo = wmo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.