mpas_analysis.shared.analysis_task.AnalysisTask.check_analysis_enabled

AnalysisTask.check_analysis_enabled(analysisOptionName, default=False, raiseException=True)[source]

Check to make sure a given analysis is turned on, issuing a warning or raising an exception if not.

Parameters
  • analysisOptionName (str) – The name of a boolean namelist option indicating whether the given analysis member is enabled

  • default (bool, optional) – If no analysis option with the given name can be found, indicates whether the given analysis is assumed to be enabled by default.

  • raiseException (bool, optional) – Whether

Returns

enabled (bool) – Whether the given analysis is enabled

Raises

RuntimeError – If the given analysis option is not found and default is not True or if the analysis option is found and is False. The exception is only raised if raiseException = True.