From 01567ba3ecc8256a41ba33864e801eed6d85cab6 Mon Sep 17 00:00:00 2001 From: John Krasting Date: Mon, 23 Mar 2026 10:54:56 -0400 Subject: [PATCH] ACC diag: ensure static file has same coords - Enusres the static file has the same coordinates as the umo/vmo data --- gfdlvitals/diags/acc.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gfdlvitals/diags/acc.py b/gfdlvitals/diags/acc.py index 25d27b9..667c29c 100644 --- a/gfdlvitals/diags/acc.py +++ b/gfdlvitals/diags/acc.py @@ -49,7 +49,13 @@ def mom6_acc(fyear, tar, label="Ocean", outdir="./"): # select first time level from static file # editorial comment: why does the static file have a time dimension? dss = in_mem_xr(static_file) - + dss = dss.assign_coords({ + "xh": ds.xh, + "yh": ds.yh, + "xq": ds.xq, + "yq": ds.yq, + }) + ds = ds[["umo","vmo","z_i"]] ds = xr.merge([ds,dss], compat="override", join="outer", combine_attrs="override")