Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
thopri
PyNEMO
Commits
e8d1815d
Commit
e8d1815d
authored
4 years ago
by
thopri
Browse files
Options
Download
Email Patches
Plain Diff
updated bdy_mask.py so that it handles missing attributes
parent
9bc759f3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
pynemo/gui/nemo_bdy_mask.py
pynemo/gui/nemo_bdy_mask.py
+5
-6
No files found.
pynemo/gui/nemo_bdy_mask.py
View file @
e8d1815d
...
...
@@ -81,14 +81,13 @@ class Mask(object):
try
:
self
.
bathy_data
=
self
.
bathy_nc
.
variables
[
'Bathymetry'
][:,:]
except
:
self
.
bathy_data
=
self
.
bathy_nc
.
variables
[
'deptho'
][:,:]
try
:
#check if units exists otherwise unknown. TODO
self
.
data_units
=
self
.
bathy_nc
.
variables
[
'Bathymetry'
].
units
except
:
except
KeyError
:
self
.
bathy_data
=
self
.
bathy_nc
.
variables
[
'deptho'
][:,:]
self
.
data_units
=
self
.
bathy_nc
.
variables
[
'deptho'
].
units
# except AttributeError:
# self.data_units = "unknown"
except
AttributeError
:
self
.
logger
.
warning
(
'Bathymetry Units unknown....'
)
self
.
data_units
=
"unknown"
if
self
.
data
is
None
:
try
:
self
.
data
=
self
.
bathy_nc
.
variables
[
'Bathymetry'
]
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment