Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Matthieu Leclair
ROMSOC_tools
Commits
ed9e4517
Commit
ed9e4517
authored
Dec 18, 2019
by
Matthieu Leclair
Browse files
FIX: only drop existing variables from dataset
parent
28832886
Changes
1
Hide whitespace changes
Inline
Side-by-side
ROMSOC_tools/make_ROMSOC.py
View file @
ed9e4517
...
...
@@ -66,7 +66,9 @@ def get_ROMSOC_ds(ROMS_grd_file, COSMO_grd_file, transition_width):
cos_grd
[
'rotated_pole'
].
attrs
[
'grid_north_pole_latitude'
])
cos_map
=
dp_map
(
NP
)
romsoc_ds
=
romsoc_ds
.
drop
((
'height_2m'
,
'height_10m'
))
drop_vars
=
[
v
for
v
in
(
'height_2m'
,
'height_10m'
)
if
v
in
romsoc_ds
]
if
drop_vars
:
romsoc_ds
=
romsoc_ds
.
drop
(
drop_vars
)
# Add velocity directions
# =======================
...
...
Write
Preview
Supports
Markdown
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