EMPIRE DA  v1.9.1
Data assimilation codes using EMPIRE communication
 All Classes Files Functions Variables Pages
model_specific.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine configure_model
 subroutine called initially to set up details and data for model specific functions More...
 
subroutine reconfigure_model
 subroutine to reset variables that may change when the observation network changes More...
 
subroutine solve_r (obsDim, nrhs, y, v, t)
 subroutine to take an observation vector y and return v in observation space. More...
 
subroutine solve_rhalf (obsdim, nrhs, y, v, t)
 subroutine to take an observation vector y and return v in observation space. More...
 
subroutine solve_hqht_plus_r (obsdim, y, v, t)
 subroutine to take an observation vector y and return v in observation space. More...
 
subroutine q (nrhs, x, Qx)
 subroutine to take a full state vector x and return Qx in state space. More...
 
subroutine qhalf (nrhs, x, Qx)
 subroutine to take a full state vector x and return \(Q^{1/2}x\) in state space. More...
 
subroutine r (obsDim, nrhs, y, Ry, t)
 subroutine to take an observation vector x and return Rx in observation space. More...
 
subroutine rhalf (obsDim, nrhs, y, Ry, t)
 subroutine to take an observation vector x and return Rx in observation space. More...
 
subroutine h (obsDim, nrhs, x, hx, t)
 subroutine to take a full state vector x and return H(x) in observation space. More...
 
subroutine ht (obsDim, nrhs, y, x, t)
 subroutine to take an observation vector y and return x \(= H^T(y)\) in full state space. More...
 
subroutine dist_st_ob (xp, yp, dis, t)
 subroutine to compute the distance between the variable in the state vector and the variable in the observations More...
 
subroutine bhalf (nrhs, x, bx)
 subroutine to take a full state vector x and return \(B^{1/2}x\) in state space. More...
 
subroutine solve_b (nrhs, x, v)
 subroutine to take a state vector x and return v in state space. More...
 
subroutine get_observation_data (y, t)
 Subroutine to read observation from a file
. More...
 

Function/Subroutine Documentation

subroutine bhalf ( integer, intent(in)  nrhs,
real(kind=rk), dimension(state_dim,nrhs), intent(in)  x,
real(kind=rk), dimension(state_dim,nrhs), intent(out)  bx 
)

subroutine to take a full state vector x and return \(B^{1/2}x\) in state space.

Given \(x\) compute \(B^{\frac{1}{2}}x\)

Parameters
[in]nrhsthe number of right hand sides
[in]xthe input vector
[out]bxthe resulting vector where bx \(= B^{\frac{1}{2}}x\)

Definition at line 281 of file model_specific.f90.

Here is the caller graph for this function:

subroutine configure_model ( )

subroutine called initially to set up details and data for model specific functions

By the end of this subroutine, the following must be set:

This is a very good place to load in data for the matrices B,Q,R,H etc

Definition at line 38 of file model_specific.f90.

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine dist_st_ob ( integer, intent(in)  xp,
integer, intent(in)  yp,
real(kind=kind(1.0d0)), intent(out)  dis,
integer, intent(in)  t 
)

subroutine to compute the distance between the variable in the state vector and the variable in the observations

Compute \(\mathrm{dist}(x(xp),y(yp))\)

Parameters
[in]xpthe index in the state vector
[in]ypthe index in the observation vector
[out]disthe distance between x(xp) and y(yp)
[in]tthe current time index for observations

Definition at line 265 of file model_specific.f90.

Here is the caller graph for this function:

subroutine get_observation_data ( real(kind=rk), dimension(obs_dim), intent(out)  y,
integer, intent(in)  t 
)

Subroutine to read observation from a file
.

Parameters
[out]yThe observation
[in]tthe current timestep

Definition at line 319 of file model_specific.f90.

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine h ( integer, intent(in)  obsDim,
integer, intent(in)  nrhs,
real(kind=rk), dimension(state_dim,nrhs), intent(in)  x,
real(kind=rk), dimension(obsdim,nrhs), intent(out)  hx,
integer, intent(in)  t 
)

subroutine to take a full state vector x and return H(x) in observation space.

Given \(x\) compute \(Hx\)

Parameters
[in]obsdimthe dimension of the observations
[in]nrhsthe number of right hand sides
[in]xthe input vectors in state space
[out]hxthe resulting vector in observation space where hx \(= Hx\)
[in]tthe timestep

Definition at line 221 of file model_specific.f90.

Here is the caller graph for this function:

subroutine ht ( integer, intent(in)  obsDim,
integer, intent(in)  nrhs,
real(kind=rk), dimension(obsdim,nrhs), intent(in)  y,
real(kind=rk), dimension(state_dim,nrhs), intent(out)  x,
integer, intent(in)  t 
)

subroutine to take an observation vector y and return x \(= H^T(y)\) in full state space.

Given \(y\) compute \(x=H^T(y)\)

Parameters
[in]obsdimthe dimension of the observations
[in]nrhsthe number of right hand sides
[in]ythe input vectors in observation space
[out]xthe resulting vector in state space where x \(= H^Ty\)
[in]tthe timestep

Definition at line 243 of file model_specific.f90.

Here is the caller graph for this function:

subroutine q ( integer, intent(in)  nrhs,
real(kind=rk), dimension(state_dim,nrhs), intent(in)  x,
real(kind=rk), dimension(state_dim,nrhs), intent(out)  Qx 
)

subroutine to take a full state vector x and return Qx in state space.

Given \(x\) compute \(Qx\)

Parameters
[in]nrhsthe number of right hand sides
[in]xthe input vector
[out]qxthe resulting vector where Qx \(= Qx\)

Definition at line 131 of file model_specific.f90.

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine qhalf ( integer, intent(in)  nrhs,
real(kind=rk), dimension(state_dim,nrhs), intent(in)  x,
real(kind=rk), dimension(state_dim,nrhs), intent(out)  Qx 
)

subroutine to take a full state vector x and return \(Q^{1/2}x\) in state space.

Given \(x\) compute \(Q^{\frac{1}{2}}x\)

Parameters
[in]nrhsthe number of right hand sides
[in]xthe input vector
[out]qxthe resulting vector where Qx \(= Q^{\frac{1}{2}}x\)

Definition at line 156 of file model_specific.f90.

Here is the caller graph for this function:

subroutine r ( integer, intent(in)  obsDim,
integer, intent(in)  nrhs,
real(kind=rk), dimension(obsdim,nrhs), intent(in)  y,
real(kind=rk), dimension(obsdim,nrhs), intent(out)  Ry,
integer, intent(in)  t 
)

subroutine to take an observation vector x and return Rx in observation space.

Given \(y\) compute \(Ry\)

Parameters
[in]obsdimthe dimension of the observations
[in]nrhsthe number of right hand sides
[in]ythe input vector
[out]rythe resulting vectors where Ry \(= Ry\)
[in]tthe timestep

Definition at line 176 of file model_specific.f90.

Here is the caller graph for this function:

subroutine reconfigure_model ( )

subroutine to reset variables that may change when the observation network changes

Definition at line 58 of file model_specific.f90.

Here is the caller graph for this function:

subroutine rhalf ( integer, intent(in)  obsDim,
integer, intent(in)  nrhs,
real(kind=rk), dimension(obsdim,nrhs), intent(in)  y,
real(kind=rk), dimension(obsdim,nrhs), intent(out)  Ry,
integer, intent(in)  t 
)

subroutine to take an observation vector x and return Rx in observation space.

Given \(y\) compute \(R^{\frac{1}{2}}y\)

Parameters
[in]obsdimthe dimension of the observations
[in]nrhsthe number of right hand sides
[in]ythe input vector
[out]rythe resulting vector where Ry \(= R^{\frac{1}{2}}y\)
[in]tthe timestep

Definition at line 198 of file model_specific.f90.

Here is the caller graph for this function:

subroutine solve_b ( integer, intent(in)  nrhs,
real(kind=rk), dimension(state_dim,nrhs), intent(in)  x,
real(kind=rk), dimension(state_dim,nrhs), intent(out)  v 
)

subroutine to take a state vector x and return v in state space.

Given \(y\) find \(v\) such that \(Bv=x\)

Parameters
[in]nrhsthe number of right hand sides
[in]xinput vector
[out]vresult vector where \(v=B^{-1}x\)

Definition at line 301 of file model_specific.f90.

Here is the caller graph for this function:

subroutine solve_hqht_plus_r ( integer, intent(in)  obsdim,
real(kind=rk), dimension(obsdim), intent(in)  y,
real(kind=rk), dimension(obsdim), intent(out)  v,
integer, intent(in)  t 
)

subroutine to take an observation vector y and return v in observation space.

Given \(y\) find \(v\) such that \((HQH^T+R)v=y\)

Parameters
[in]obsdimthe dimension of the observations
[in]ythe input vector
[out]vthe result where \(v = (HQH^T+R)^{-1}y\)
[in]tthe timestep

Definition at line 111 of file model_specific.f90.

Here is the caller graph for this function:

subroutine solve_r ( integer, intent(in)  obsDim,
integer, intent(in)  nrhs,
real(kind=rk), dimension(obsdim,nrhs), intent(in)  y,
real(kind=rk), dimension(obsdim,nrhs), intent(out)  v,
integer, intent(in)  t 
)

subroutine to take an observation vector y and return v in observation space.

Given \(y\) find \(v\) such that \(Rv=y\)

Parameters
[in]obsdimthe dimension of the observations
[in]nrhsthe number of right hand sides
[in]yinput vector
[out]vresult vector where \(v=R^{-1}y\)
[in]tthe timestep

Definition at line 68 of file model_specific.f90.

Here is the caller graph for this function:

subroutine solve_rhalf ( integer, intent(in)  obsdim,
integer, intent(in)  nrhs,
real(kind=rk), dimension(obsdim,nrhs), intent(in)  y,
real(kind=rk), dimension(obsdim,nrhs), intent(out)  v,
integer, intent(in)  t 
)

subroutine to take an observation vector y and return v in observation space.

Given \(y\) find \(v\) such that \(R^{\frac{1}{2}}v=y\)

Parameters
[in]obsdimthe dimension of the observations
[in]nrhsthe number of right hand sides
[in]yinput vector
[out]vresult vector where \(v=R^{-\frac{1}{2}}y\)
[in]tthe timestep

Definition at line 89 of file model_specific.f90.

Here is the caller graph for this function: