Skip to content

Ocean z-level bounds must be retrieved offline #194

Description

@ceblanton

Is your feature request related to a problem? Please describe.
Surfaced when retrying thetao/so on the regridded ocean_1x1deg source (#192 masks this on native ocean, since thetao/so never get this far there).

CMOR requires vertical levels to carry bounds; fremor builds them itself via create_lev_bnds(bound_these=lev, with_these=ds['z_i']) — pairing each z_l layer-center value with its two neighboring z_i interface values, a legitimate, standard approach when both coordinates are present. The problem is narrower than a coding oversight: z_i simply isn't in these files. Checked directly — z_i does exist elsewhere in this archive, but only in two unrelated diagnostics (KHTH_u, KHTH_v, horizontal-diffusivity fields reported on interface levels for their own reasons), never alongside any z_l-bearing tracer field.

Unlike #192's nv bug, there's no missing line to add here — the fix would need either this postprocessing stream to retain z_i alongside z_l for 3-D tracer output, or fremor to fall back to a known, fixed set of standard level-interface values for this vertical grid when the file doesn't carry them.

Current error:

KeyError: 'CMOR requires the input data have vertical level boundaries (bnds)'
  at cmor_mixer.py:377, from IndexError: z_i not found in /

Describe the feature you'd like
CMORize these files including the required vertical bounds.

Additional context
Add any other notes, context, information, etc. about the feature here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions