Skip to content

Commit 7b47732

Browse files
committed
add axis to segment. This stops the super annoying 'could not certify axis coords' warning from MOM6
1 parent 99b2304 commit 7b47732

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

regional_mom6/regional_mom6.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2887,6 +2887,9 @@ def regrid_velocity_tracers(
28872887
# If repeat-year forcing, add modulo coordinate
28882888
if self.repeat_year_forcing:
28892889
segment_out["time"] = segment_out["time"].assign_attrs({"modulo": " "})
2890+
# Add axes to suppress annoying runtime warnings
2891+
segment_out[f"ny_{self.segment_name}"] = segment_out[f"ny_{self.segment_name}"].assign_attrs({"axis":"Y"})
2892+
segment_out[f"nx_{self.segment_name}"] = segment_out[f"nx_{self.segment_name}"].assign_attrs({"axis":"X"})
28902893
segment_out.load().to_netcdf(
28912894
self.outfolder / f"forcing_obc_{self.segment_name}.nc",
28922895
encoding=encoding_dict,

0 commit comments

Comments
 (0)