-
Notifications
You must be signed in to change notification settings - Fork 1
Description
From COSIMA/mom6-panan#56 (comment), it's possible to get density inversions in the sigma-2 coordinate space (that may perhaps not be inversions with locally-referenced density). With the rho2 coordinate, particularly as a diagnostic, this will produce incorrect values during regridding, as there is the assumption of a monotonic density profile. In the case above, this gave layers of identically zero thickness that inherited junk values during remapping.
Perhaps the get_polynomial_coordinate routine could benefit from a safety check on monotonicity? Alternatively, the remapping should be robust to completely vanished (rather than just minimum thickness) layers.
Just flagging this here in case anybody wants to pick it up sooner than me, otherwise I'll get to it when I find some time!