From a08c5815cb2807662d1bf9dd71b3e07051ea4a8b Mon Sep 17 00:00:00 2001 From: Henry Addison Date: Thu, 14 Dec 2023 16:38:55 -0600 Subject: [PATCH] save the fixed prediction files too --- bin/check_preds.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/check_preds.py b/bin/check_preds.py index a7e710b33..00c689ab9 100644 --- a/bin/check_preds.py +++ b/bin/check_preds.py @@ -74,7 +74,7 @@ def check(pred_ds): unit=" files", ) as pbar: for fpath in fpaths: - pred_ds = xr.open_dataset(fpath) + pred_ds = xr.load_dataset(fpath) # import pdb; pdb.set_trace() pred_ds = fix(pred_ds) errors = check(pred_ds) @@ -83,4 +83,6 @@ def check(pred_ds): print(f"Errors in {fpath}:") for e in errors: print(e) + else: + pred_ds.to_netcdf(fpath) pbar.update(1)