40 integer,
parameter :: rk = kind(1.0d0)
42 real(kind=rk) :: pWeight
43 real(kind=rk),
dimension(state_dim,pf%count) :: normaln
44 real(kind=rk),
dimension(state_dim,pf%count) :: betan
45 real(kind=rk),
dimension(obs_dim) :: y
46 real(kind=rk),
dimension(obs_dim,pf%count) :: Hpsi
47 real(kind=rk),
dimension(obs_dim,pf%count) :: y_Hpsin1
48 real(kind=rk),
dimension(state_dim,pf%count) :: fpsi
49 real(kind=rk),
dimension(state_dim,pf%count) :: kgain
50 real(kind=rk),
dimension(state_dim,pf%count) :: Qkgain
53 real(kind=rk) :: pweighttemp,ddot
64 call
h(obs_dim,pf%count,pf%psi,hpsi,pf%timestep)
68 y_hpsin1(:,k) = y - hpsi(:,k)
81 call
bprime(y_hpsin1,kgain,qkgain,normaln,betan)
87 particle = pf%particles(k)
89 call
update_state(pf%psi(:,k),fpsi(:,k),qkgain(:,k),betan(:,k))
92 pweight = ddot(state_dim,qkgain(:,k),1,kgain(:,k),1) + 2.0d0&
93 &*ddot(state_dim, betan(:,k),1,kgain(:,k),1)
95 if(comm_version .eq. 3)
then
98 call mpi_allreduce(pweighttemp,pweight,1,mpi_double_precision,mpi_sum&
99 &,pf_member_comm,mpi_err)
102 pf%weight(particle) = pf%weight(particle) + 0.5*pweight
subroutine normalrandomnumbers2d(mean, stdev, n, k, phi)
generate two dimensional Normal random numbers
subroutine send_all_models(stateDim, nrhs, x, tag)
subroutine to send all the model states to the models
Module containing EMPIRE coupling data.
subroutine update_state(state, fpsi, kgain, betan)
Subroutine to update the state.
subroutine recv_all_models(stateDim, nrhs, x)
subroutine to receive all the model states from the models after
subroutine bprime(y, x, QHtR_1y, normaln, betan)
subroutine to calculate nudging term and correlated random errors efficiently
Module that stores the dimension of observation and state spaces.
subroutine proposal_filter
Subroutine to perform nudging in the proposal step of EWPF.
subroutine h(obsDim, nrhs, x, hx, t)
subroutine to take a full state vector x and return H(x) in observation space.
module pf_control holds all the information to control the the main program
subroutine get_observation_data(y, t)
Subroutine to read observation from a file .