Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CTDAS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tsurata, Aki
CTDAS
Commits
7def0bcf
Commit
7def0bcf
authored
14 years ago
by
Peters, Wouter
Browse files
Options
Downloads
Patches
Plain Diff
the base class model for an observation operator
parent
3b9e49c0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
da/baseclasses/model.py
+60
-0
60 additions, 0 deletions
da/baseclasses/model.py
with
60 additions
and
0 deletions
da/baseclasses/model.py
0 → 100755
+
60
−
0
View file @
7def0bcf
#!/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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment