Commit 7def0bcf authored by Peters, Wouter's avatar Peters, Wouter
Browse files

the base class model for an observation operator

parent 3b9e49c0
#!/usr/bin/env python
# model.py
"""
Author : peters
Revision History:
File created on 30 Aug 2010.
"""
import os
import sys
import logging
import datetime
identifier = 'GeneralObservationOperator'
version = '0.0'
################### Begin Class ObservationOperator ###################
class ObservationOperator(object):
"""
This is a class that defines an ObervationOperator. This object is used to control the sampling of
a statevector in the ensemble Kalman filter framework. The methods of this class specify which (external) code
is called to perform the sampling, and which files should be read for input and are written for output.
The baseclasses consist mainly of empty mehtods that require an application specific application
"""
def __init__(self):
""" The instance of an ObservationOperator is application dependent """
self.Identifier = identifier # the identifier gives the model name
self.Version = version # the model version used
msg = '%s object initialized'%self.Identifier ; logging.debug(msg)
msg = '%s version: %s'%(self.Identifier,self.Version) ; logging.info(msg)
def __str__(self):
return "This is a %s object, version %s"%(self.Identifier,self.Version)
def Initialize(self,DaCycle):
""" Perform all steps necessary to start the observation operator through a simple Run() call """
def ValidateInput(self,DaCycle):
""" Make sure that data needed for the ObservationOperator (such as observation input lists, or parameter files)
are present.
"""
def SaveData(self):
""" Write the data that is needed for a restart or recovery of the Observation Operator to the save directory """
################### End Class ObservationOperator ###################
if __name__ == "__main__":
pass
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment