60 integer,
intent(in) :: n
61 integer,
parameter :: rk = kind(1.0d0)
62 real(kind=rk),
dimension(n),
intent(in) :: x
63 real(kind=rk),
dimension(n),
intent(out) :: g
65 real(kind=rk),
intent(out) :: f
67 real(kind=rk),
dimension(obs_dim) :: y,Hx
68 real(kind=rk),
dimension(n) :: gtemp
69 real(kind=rk),
dimension(n) :: xtemp
70 real(kind=rk) :: ftemp,ftemp3
74 call
h(obs_dim,1,x,hx,tsdata%current_timestep)
80 call daxpy(obs_dim,-1.0d0,hx,1,y,1)
83 call
solve_r(obs_dim,1,y,hx,tsdata%current_timestep)
87 ftemp = 0.5_rk*sum(y*hx)
88 if(comm_version .eq. 3)
then
91 call mpi_allreduce(ftemp3,ftemp,1,mpi_double_precision,mpi_sum&
92 &,pf_member_comm,mpi_err)
96 call
ht(obs_dim,1,y,gtemp,tsdata%current_timestep)
110 f = 0.5_rk*sum(xtemp*g)
111 if(comm_version .eq. 3)
then
114 call mpi_allreduce(ftemp3,f,1,mpi_double_precision,mpi_sum&
115 &,pf_member_comm,mpi_err)
125 call daxpy(state_dim,-1.0d0,gtemp,1,g,1)
subroutine solve_r(obsDim, nrhs, y, v, t)
subroutine to take an observation vector y and return v in observation space.
Module containing EMPIRE coupling data.
Module that stores the information about the timestepping process.
subroutine threedvar_fcn(n, x, f, g)
subroutine to provide the objective function and gradient for 3dvar
Module that stores the dimension of observation and state spaces.
subroutine h(obsDim, nrhs, x, hx, t)
subroutine to take a full state vector x and return H(x) in observation space.
subroutine solve_b(nrhs, x, v)
subroutine to take a state vector x and return v in state space.
subroutine ht(obsDim, nrhs, y, x, t)
subroutine to take an observation vector y and return x in full state space.
module to store stuff for 3DVar
subroutine get_observation_data(y, t)
Subroutine to read observation from a file .