NOAA-GFDL/MDTF-diagnostics

Missing Dimensions setting in precip_buoy_diag

Wen-hao-Dong opened this issue · 2 comments

Bug Severity

  • 1 = Minor problem that does not affect total framework functionality (e.g., computation error in a POD, problem with logging output, or an issue on a single system
  • 2 = Major problem that affects overall functionality, but that does not occur for all users (e.g., problems installing the framework with a specific Conda version, a framework option that causes one or more PODs to fail, or missing/incompatible Python modules).
  • 3 = Catastrophic problem that occurs frequently for multiple users and/or on multiple systems (e.g.,framework consistently fails to install on multiple systems, or one or more PODs continuously fails after running successfully)

Describe the bug
The precip_buoy_diag POD fails due to a lack of Dimension settings in the corresponding settings.jsonc file. The error message is pasted below:

Steps To Reproduce

Environment
Describe the system environment:

Log information and/or terminal output
CRITICAL: **********************************************************************
Uncaught exception:
Traceback (most recent call last):
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/diagnostic.py", line 875, in from_struct
pod.varlist = Varlist.from_struct(d, parent=pod)
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/diagnostic.py", line 467, in from_struct
assert 'dimensions' in d
AssertionError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/archive/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/mdtf_framework.py", line 68, in
exit_code = main(argv)
File "/archive/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/mdtf_framework.py", line 62, in main
exit_code = framework.main()
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/core.py", line 1151, in main
case.setup()
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/data_manager.py", line 186, in setup
self._DiagnosticClass.from_config(pod_name, parent=self)
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/diagnostic.py", line 888, in from_config
return cls.from_struct(pod_name, config.pod_data[pod_name], parent)
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/diagnostic.py", line 877, in from_struct
raise util.PodConfigError("Caught exception while parsing varlist",
src.util.exceptions.PodConfigError: Couldn't parse the settings.jsonc file for POD 'precip_buoy_diag': Caught exception while parsing varlist.

@Wen-hao-Dong I added the dimensions block and reformatted the the settings file. Pull the updates from the main branch into your test branch and let me know if you have more issues.

Now it ran into another problem, complaining the filed unit:
CRITICAL: **********************************************************************
Uncaught exception:
Traceback (most recent call last):
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/data_model.py", line 425, in coordinate_from_struct
return util.coerce_to_dataclass(d, class_dict[ax], **kwargs)
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/util/dataclass.py", line 830, in coerce_to_dataclass
return dc(**new_kwargs)
File "", line 10, in init
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/util/dataclass.py", line 586, in _new_post_init
_old_post_init(self, *args, **kwargs)
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/util/dataclass.py", line 586, in _new_post_init
_old_post_init(self, *args, **kwargs)
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/util/dataclass.py", line 587, in _new_post_init
_mdtf_dataclass_type_check(self, _post_init_log)
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/util/dataclass.py", line 498, in _mdtf_dataclass_type_check
raise exceptions.DataclassParseError((f"{self.class.name}: "
src.util.exceptions.DataclassParseError: VarlistCoordinate: No value supplied for mandatory field units.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/diagnostic.py", line 449, in _pod_dimension_from_struct
return data_model.coordinate_from_struct(
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/data_model.py", line 427, in coordinate_from_struct
raise ValueError(f"Couldn't parse coordinate: {repr(d)}")
ValueError: Couldn't parse coordinate: OrderedDict([('standard_name', 'air_pressure'), ('positive', 'down')])

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/diagnostic.py", line 875, in from_struct
pod.varlist = Varlist.from_struct(d, parent=pod)
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/diagnostic.py", line 468, in from_struct
dims_d = {k: _pod_dimension_from_struct(k, v, vlist_settings)
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/diagnostic.py", line 468, in
dims_d = {k: _pod_dimension_from_struct(k, v, vlist_settings)
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/diagnostic.py", line 454, in _pod_dimension_from_struct
raise ValueError(f"Couldn't parse dimension entry for {name}: {dd}")
ValueError: Couldn't parse dimension entry for lev: OrderedDict([('standard_name', 'air_pressure'), ('positive', 'down')])

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/archive/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/mdtf_framework.py", line 68, in
exit_code = main(argv)
File "/archive/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/mdtf_framework.py", line 62, in main
exit_code = framework.main()
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/core.py", line 1151, in main
case.setup()
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/data_manager.py", line 186, in setup
self._DiagnosticClass.from_config(pod_name, parent=self)
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/diagnostic.py", line 888, in from_config
return cls.from_struct(pod_name, config.pod_data[pod_name], parent)
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/diagnostic.py", line 877, in from_struct
raise util.PodConfigError("Caught exception while parsing varlist",
src.util.exceptions.PodConfigError: Couldn't parse the settings.jsonc file for POD 'precip_buoy_diag': Caught exception while parsing varlist.