Contact: | Jeff Anderson |
Revision: | $Revision: 2801 $ |
Source: | $URL: http://subversion.ucar.edu/DAReS/DART/trunk/obs_def/obs_def_mod.html $ |
Change Date: | $Date: 2007-04-04 22:11:48 -0600 (Wed, 04 Apr 2007) $ |
Change history: | try "svn log" or "svn diff" |
Beginning with the I-release of DART, a more flexible. powerful (and complicated) mechanism for incorporating new types of observations is part of DART. The obs_def module being described here is created by the program preprocess.f90 from two kinds of input files. First, a DEFAULT obs_def module (normally called DEFAULT_obs_def_mod.F90 and documented in this directory) is used as a template into which the preprocessor incorporates information from zero or more special obs_def modules (such as obs_def_1d_state_mod.f90 or obs_def_reanalyis_bufr_mod.f90) which are also documented in this directory. If no special obs_def files are included in the preprocessor namelist, a minimal obs_def_mod.f90 is created which can only support identity forward observation operators.
types_mod utilities_mod location_mod (depends on model choice) time_manager_mod assim_model_mod obs_kind_mod Other special obs_def_kind modules as required
type obs_def_type private type(location_type) :: location integer :: kind type(time_type) :: time real(r8) :: error_variance integer :: key end type obs_def_type
Models all that is known about an observation except for actual values. Includes a location, kind, time and error variance.
Component | Description |
---|---|
location | Location of the observation. |
kind | The kind of the observation. |
time | Time of the observation. |
error_variance | Error variance of the observation. |
key | Unique identifier for observations of a particular kind. |
type(obs_def_type), intent(out) :: obs_def type(location_type), intent(in) :: location integer, intent(in) :: kind type(time_type), intent(in) :: time real(r8), intent(in) :: error_variance
Creates an obs_def type with location, kind, time and error_variance specified.
obs_def | The obs_def that is created |
location | Location for this obs_def |
kind | Observation kind for obs_def |
time | Time for obs_def |
error_variance | Error variance of this observation |
type(obs_def_type), intent(out) :: obs_def1 type(obs_def_type), intent(in) :: obs_def2
Copies obs_def2 to obs_def1, overloaded as assignment (=).
obs_def1 | obs_def to be copied into |
obs_def2 | obs_def to be copied from |
integer :: get_obs_def_key type(obs_def_type), intent(in) :: obs_def
Returns key from an observation definition.
var | Returns key from an obs_def |
obs_def | An obs_def |
real(r8) :: get_obs_def_error_variance type(obs_def_type), intent(in) :: obs_def
Returns error variance from an observation definition.
var | Error variance from an obs_def |
obs_def | An obs_def |
type(location_type) :: get_obs_def_location type(obs_def_type), intent(in) :: obs_def
Returns the location from an observation definition.
var | Returns location from an obs_def |
obs_def | An obs_def |
integer :: get_obs_kind type(obs_def_type), intent(in) :: obs_def
Returns an observation kind from an observation definition.
var | Returns the observation kind from an obs_def |
obs_def | An obs_def |
type(time_type) :: get_obs_def_time type(obs_def_type), intent(in) :: obs_def
Returns time from an observation definition.
var | Returns time from an obs_def |
obs_def | An obs_def |
character(len = 32) :: get_obs_name integer, intent(in) :: obs_kind_ind
Returns an observation name from an observation kind.
var | Returns name from an observation kind |
obs_kind_ind | An observation kind |
type(obs_def_type), intent(inout) :: obs_def type(location_type), intent(in) :: location
Set the location in an observation definition.
obs_def | An obs_def |
location | A location |
type(obs_def_type), intent(inout) :: obs_def real(r8), intent(in) :: error_variance
Set error variance for an observation definition.
obs_def | An obs_def |
error_variance | Error variance |
type(obs_def_type), intent(inout) :: obs_def integer, intent(in) :: key
Set the key for an observation definition.
obs_def | An obs_def |
key | Unique identifier for this observation |
type(obs_def_type), intent(inout) :: obs_def integer, intent(in) :: kind
Set the kind of observation in an observation definition.
obs_def | An obs_def |
kind | An integer observation kind |
type(obs_def_type), intent(inout) :: obs_def type(time_type), intent(in) :: time
Sets time for an observation definition.
obs_def | An obs_def |
time | Time to set |
integer, intent(in) :: key type(obs_def_type), intent(in) :: obs_def integer, intent(in) :: obs_kind_ind real(r8), intent(in) :: state(:) real(r8), intent(out) :: obs_val integer, intent(out) :: istatus logical, intent(out) :: assimilate_this_ob logical, intent(out) :: evaluate_this_ob
Compute the observation (forward) operator for a particular obs definition.
key | descriptor for observation type |
obs_def | The input obs_def |
obs_kind_ind | The obs kind |
state | Model state vector |
istatus | Returned integer describing problems with applying forward operator (0 means OK). |
assimilate_this_ob | Indicates whether to assimilate this obs or not |
evaluate_this_ob | Indicates whether to evaluate this obs or not |
integer, intent(in) :: ifile type(obs_def_type), intent(inout) :: obs_def integer, intent(in) :: key real(r8), intent(inout) :: obs_val character(len=*), optional, intent(in) :: fform
Reads an obs_def from file open on channel ifile. Uses format specified in fform or FORMATTED if fform is not present.
ifile | File unit open to output file |
obs_def | Observation definition to be read |
key | Present if unique identifier key is needed by some obs kind. Unused by default code. |
obs_val | Present if needed to perform operations based on value. Unused by default code. |
fform | File format specifier: FORMATTED or UNFORMATTED; default FORMATTED (FORMATTED in this case is the human readable/text option as opposed to UNFORMATTED which is binary.) |
type(obs_def_type), intent(inout) :: obs_def integer, intent(in) :: key
Creates an obs_def via input from standard in.
obs_def | An obs_def to be created |
key | Present if unique identifier key is needed by some obs kind. Unused by default code. |
integer, intent(in) :: ifile type(obs_def_type), intent(in) :: obs_def integer, intent(in) :: key character(len=*), optional, intent(in) :: fform
Writes an obs_def to file open on channel ifile. Uses format specified in fform or FORMATTED if fform is not present.
ifile | File unit open to output file |
obs_def | Observation definition to be written |
key | Present if unique identifier key is needed by some obs kind. Unused by default code. |
fform | File format specifier: FORMATTED or UNFORMATTED; default FORMATTED |
type(obs_def_type), intent(inout) :: obs_def
Releases all storage associated with an obs_def and its subcomponents.
obs_def | An obs_def to be released. |
Routine | Message | Comment |
---|---|---|
get_expected_obs_from_def | Attempt to evaluate undefined observation kind | An observation kind for which no forward operator has been defined is an error. |
read_obs_def | Expected header "obdef" in input file | The format of the input file is not consistent. |
read_obs_def | Expected kind header "kind " in input file | The format of the input file is not consistent. |
read_obs_def | Attempt to read for undefined obs_kind index | Reading for an observation kind for which no forward operator has been defined is an error. |
write_obs_def | Attempt to write for undefined obs_kind index | Writing for an observation kind for which no forward operator has been defined is an error. |
interactive_obs_def | Attempt to interactively create undefined obs_kind index | Creating an observation kind for which no forward operator has been defined is an error. |