INTERFACE / PUBLIC COMPONENTS / NAMELIST / FILES / REFERENCES / ERRORS / BUGS / PLANS / PRIVATE COMPONENTS

MODULE obs_model_mod

Contact: Jeff Anderson
Reviewers:  
Revision: $Revision: 1.2 $
Release Name: $Name: pre_hawaii $
Change Date: $Date: 2004/12/22 20:48:13 $
Change history: see CVS log

OVERVIEW

This is the highest level in DART where a module has access to details of both the assim_model structure and the observation structure. Operations like the evaluation of forward operators that require a knowledge of both the observations and the model details are computed here.




OTHER MODULES USED

types_mod
utilities_mod
location_mod
assim_model_mod
obs_kind_mod
obs_sequence_mod
obs_def_mod
time_manager_mod
ensemble_manager_mod



PUBLIC INTERFACE

use assim_model_mod, only : take_obs
 interactive_def
 get_expected_obs
 get_close_states
 move_ahead
 take_vr
 take_td

NOTES




PUBLIC COMPONENTS



call take_obs(state_vector, location, obs_kind, obs_vals, istatus)
 real(r8), dimension(:), intent(in) :: state_vector
 type(location_type), intent(in)    :: location
 type(obs_kind_type), intent(in)    :: obs_kind
 real(r8), intent(out)              :: obs_vals
 integer, intent(out)               :: istatus
 

Description

Given a model state vector and the location and kind of an observation, returns the expected value of the observation (the forward operator) and an integer status variable that can be used for quality control. Standard values of the istatus variable MUST BE DEFINED but samples can be seen in the existing model_mod.f90 modules.

state_vector    Model state vector
location    Location of the observation
obs_kind    Kind of the observation
obs_vals    Returns the forward operator estimate of the observation
istatus    Status value useful for quality control


call interactive_def(location, obs_kind)
 type(location_type), intent(out) :: location
 type(obs_kind_type), intent(out) :: obs_kind
 

Description

Allows definition of an observation using standard input.

location    Location of defined observation
obs_kind    Kind of defined observation


call get_expected_obs(seq, keys, state, obs_vals, istatus)
 type(obs_sequence_type), intent(in) :: seq
 integer, dimension(:), intent(in)   :: keys
 real(r8), dimension(:), intent(in)  :: state
 real(r8), dimension(:), intent(out) :: obs_vals
 integer, intent(out)                :: istatus
 

Description

Used to compute the expected value of a set of observations in an observation sequence given a model state vector. Also returns a status variable that reports on problems taking forward operators. This is normally applied to single observations at a time in the current (H) implementation.

seq    An observation sequence
keys    List of integer keys that define observations from seq
state    Model state vector
obs_vals    Returned expected values of the observations
istatus    Integer error code for use in quality control


call get_close_states(seq, key, radius, numinds, indices, dist, x)
 type(obs_sequence_type), intent(in) :: seq
 integer, intent(in)                 :: key
 real(r8), intent(in)                :: radius
 integer, intent(out)                :: numinds
 integer, dimension(:), intent(out)  :: indices
 real(r8), dimension(:), intent(out) :: dist
 real(r8), dimension(:), intent(in)  :: x
 

Description

Given an observation from an observation sequence, find the number of state variables that are within distance 'radius' of the observation location. Return the indices of the close states and the distances between each and the observation. The model state vector is, unfortunately, needed to compute locations of model state variables in many complex models.

seq    An observation sequence
key    Integer key identifying an observation in the sequence
radius    Find close states within this radius
numinds    Number of close states found
indices    Indices of the close state variables
dist    The distance between each close state and the observation
x    The model state vector, needed to compute distance in some models


call move_ahead(ens_handle, ens_size, model_size, seq, last_key_used, key_bounds, num_obs_in_set, async, adv_ens_command)
 type(ensemble_type), intent(in)     :: ens_handle
 integer, intent(in)                 :: ens_size
 integer, intent(in)                 :: model_size
 type(obs_sequence_type), intent(in) :: seq
 integer, intent(in)                 :: last_key_used
 integer, dimension(2), intent(out)  :: key_bounds
 integer, intent(out)                :: num_obs_in_set
 integer, intent(in)                 :: async
 character(len=129), intent(in)      :: adv_ens_command
 

Description

Given an observation sequence and an ensemble, determines how to advance the model so that the next set of observations can be assimilated. Also returns the first and last keys and the number of observations to be assimilated at this time. The algorithm implemented here (one might want to have other variants) first finds the time of the next observation that has not been assimilated at a previous time. It also determines the time of the ensemble state vectors. It then uses information about the model's time stepping capabilities to determine the time to which the model can be advanced that is CLOSEST to the time of the next observation. For now, this algorithm assumes that the model's timestep is a constant. A window of width equal to the model timestep is centered around the closest model time to the next observation and all observations in this window are added to the set to be assimilated.

ens_handle    Identifies the model state ensemble
ens_size    Number of ensemble members
model_size    Size of model state vector
seq    An observation sequence
last_key_used    Identifies the last observation from the sequence that has been used
key_bounds    Returned lower and upper bound on observations to be used at this time
num_obs_in_set    Number of observations to be used at this time
async    Controls how model is advanced (see filter)
adv_ens_command    Command issued by shell for async option 2 (see filter)


call take_vr(state_vector, obs_def, vr, istatus)
 real(r8), dimension(:), intent(in) :: state_vector
 type(obs_def_type), intent(in)     :: obs_def
 real(r8), intent(out)              :: vr
 integer, intent(out)               :: istatus
 

Description

Given a description of a radar observation and model state vector, return the expected value of the radar observation. Returned status value describes problems found in computing forward operator.

state_vector    Model state vector
obs_def    Definition of radar observation
vr    Returned expected value (forward operator) for radar observation
istatus    Returned integer describing problems with applying forward operator


call take_td(state_vector, obs_def, td, istatus)
 real(r8), dimension(:), intent(in) :: state_vector
 type(obs_def_type), intent(in)     :: obs_def
 real(r8), intent(out)              :: td
 integer, intent(out)               :: istatus
 

Description

Given a description of a dewpoint temperature observation and model state vector, return the expected value of the dewpoint. Returned status value describes problems found in computing forward operator.

state_vector    Model state vector
obs_def    Definition of radar observation
td    Returned expected value (forward operator) for dew point temperature
istatus    Returned integer describing problems with applying forward operator




FILES




REFERENCES


ERROR CODES and CONDITIONS

RoutineMessageComment
get_expected_obs identity obs is outside of state vector Can't compute identity observation for non-existent variable
move_ahead next obs time not in model time window Error in algorithm to compute observation window



KNOWN BUGS




FUTURE PLANS