Skip to content

Commit

Permalink
Fixup hack to only drop cdr melt onset var if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
trey-stafford committed Nov 5, 2024
1 parent e52dd2d commit 3e0a431
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions seaice_ecdr/nrt.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,11 @@ def hack_daily_cdr_vars_for_am2(
root_as_xr = daily_ds.root.to_dataset()

suppl_as_xr = daily_ds.cdr_supplementary.to_dataset()
suppl_as_xr = suppl_as_xr.drop_vars(
["raw_bt_seaice_conc", "raw_nt_seaice_conc", "cdr_melt_onset_day"]
)
vars_to_drop = ["raw_bt_seaice_conc", "raw_nt_seaice_conc"]
if "cdr_melt_onset_day" in suppl_as_xr.variables:
vars_to_drop.append("cdr_melt_onset_day")

suppl_as_xr = suppl_as_xr.drop_vars(vars_to_drop)

root_remapping = {}
for var in root_as_xr.variables:
Expand Down

0 comments on commit 3e0a431

Please sign in to comment.