Commit ed9e4517 authored by Matthieu Leclair's avatar Matthieu Leclair
Browse files

FIX: only drop existing variables from dataset

parent 28832886
......@@ -66,7 +66,9 @@ def get_ROMSOC_ds(ROMS_grd_file, COSMO_grd_file, transition_width):
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
# =======================
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment