Summary
After CMORisation, all ocean variables (Omon + Oyr) produce output files whose
time coordinate carries the attribute bounds = "time_bounds", yet no
time_bounds (or time_bnds) variable exists in the file. The compliance-checker
therefore reports a HIGH-severity error ATTR004/VAR004: the variable
referenced by time:bounds does not exist in the file.
Affected scope
13 files affected (all Omon + Oyr variables):
| Table |
Variables |
| Omon |
intpp, mlotst, so, thetao, tos, uo, vo, zos |
| Oyr |
detoc, dissic, no3, o2, talk |
Atmosphere (Amon) variables are unaffected — they follow a separate, already-working
code path.
Root cause
Three compounding issues:
-
Naming mismatch: the raw MOM model files contain a time_bounds(time, nv)
variable with time:bounds = "time_bounds". The code, however, expects the
CMOR-convention name time_bnds (_get_required_bounds_variables builds the
name as input_dim + "_bnds").
-
Dropped during loading: _preprocess in load_dataset keeps only
required_vars & ds.data_vars. required_vars contains time_bnds, while the
file has time_bounds, so the raw time_bounds is silently dropped — yet the
bounds = "time_bounds" attribute on the time coordinate is preserved and
written to the output file.
-
Bounds calculation disabled: in ocean.py the call
calculate_missing_bounds_variables(required_bounds) was double-commented out,
and the method was defined only on Atmosphere_CMORiser — Ocean_CMORiser did
not have it at all.
Net result: the output file has a dangling time:bounds attribute with no
corresponding bounds variable.
Relevant code locations
src/access_moppy/ocean.py — the commented-out bounds calculation call
src/access_moppy/atmosphere.py — calculate_missing_bounds_variables (originally defined only here)
src/access_moppy/base.py — load_dataset / _preprocess
src/access_moppy/vocabulary_processors.py — _get_required_bounds_variables
Expected behaviour
Ocean output files should contain a time_bnds(time, bnds) variable with
time:bounds = "time_bnds", and bnds should be a pure dimension with no index
values — consistent with atmosphere output and passing the compliance check.
Summary
After CMORisation, all ocean variables (Omon + Oyr) produce output files whose
timecoordinate carries the attributebounds = "time_bounds", yet notime_bounds(ortime_bnds) variable exists in the file. The compliance-checkertherefore reports a HIGH-severity error
ATTR004/VAR004: the variablereferenced by
time:boundsdoes not exist in the file.Affected scope
13 files affected (all Omon + Oyr variables):
Atmosphere (Amon) variables are unaffected — they follow a separate, already-working
code path.
Root cause
Three compounding issues:
Naming mismatch: the raw MOM model files contain a
time_bounds(time, nv)variable with
time:bounds = "time_bounds". The code, however, expects theCMOR-convention name
time_bnds(_get_required_bounds_variablesbuilds thename as
input_dim + "_bnds").Dropped during loading:
_preprocessinload_datasetkeeps onlyrequired_vars & ds.data_vars.required_varscontainstime_bnds, while thefile has
time_bounds, so the rawtime_boundsis silently dropped — yet thebounds = "time_bounds"attribute on thetimecoordinate is preserved andwritten to the output file.
Bounds calculation disabled: in
ocean.pythe callcalculate_missing_bounds_variables(required_bounds)was double-commented out,and the method was defined only on
Atmosphere_CMORiser—Ocean_CMORiserdidnot have it at all.
Net result: the output file has a dangling
time:boundsattribute with nocorresponding bounds variable.
Relevant code locations
src/access_moppy/ocean.py— the commented-out bounds calculation callsrc/access_moppy/atmosphere.py—calculate_missing_bounds_variables(originally defined only here)src/access_moppy/base.py—load_dataset/_preprocesssrc/access_moppy/vocabulary_processors.py—_get_required_bounds_variablesExpected behaviour
Ocean output files should contain a
time_bnds(time, bnds)variable withtime:bounds = "time_bnds", andbndsshould be a pure dimension with no indexvalues — consistent with atmosphere output and passing the compliance check.