Diagnostics¶
Diagnostics are separate objects (instances of subclasses of VerosDiagnostic
)
responsible for handling I/O, restart mechanics, and monitoring of the numerical
solution. All available diagnostics are instantiated and added to a dictionary
attribute Veros.diagnostics
(with a key determined by their name attribute).
Options for diagnostics may be set during the Veros.set_diagnostics()
method:
class MyModelSetup(Veros):
...
def set_diagnostics(self):
self.diagnostics["averages"].output_variables = ["psi","u","v"]
self.diagnostics["averages"].sampling_frequency = 3600.
self.diagnostics["snapshot"].output_variables += ["du"]
Base class¶
This class implements some common logic for all diagnostics. This makes it easy to write your own diagnostics: Just derive from this class, and implement the virtual functions.