37 integer,
parameter :: rk = kind(1.0d0)
38 real(kind=rk),
dimension(state_dim,pf%count) :: e
39 real(kind=rk),
dimension(state_dim) :: mse
40 real(kind=rk),
dimension(state_dim) :: truth
42 integer :: ensemble_comm,comm_root,mpi_err,rank
44 character(256) :: filename
51 e(:,i) = pf%psi(:,i) - truth
66 select case(comm_version)
68 ensemble_comm = pf_mpi_comm
71 write(filename,
'(A,A,A,i7.7)')
'ens_',trim(pf%rmse_filename),
'_',pf%timestep
73 ensemble_comm = pf_ens_comm
74 comm_root = pf_ens_size-1
76 write(filename,
'(A,A,A,i7.7,A,i0)')
'ens_',trim(pf%rmse_filename),
'_'&
77 &,pf%timestep,
'.',pf_ens_rank
79 write(emp_e,*)
'EMPIRE ERROR: output_ens_rmse comm_version'
80 write(emp_e,*)
'EMPIRE ERROR: comm_version',comm_version
81 write(emp_e,*)
'EMPIRE ERROR: is currently not supported. STOPPING'
85 call mpi_reduce(truth,mse,state_dim,mpi_double_precision,mpi_sum&
86 &,comm_root,ensemble_comm,mpi_err)
89 if( rank == comm_root )
then
90 mse = mse/
real(nens,rk)
96 open(unit_ens_rmse,file=trim(filename),iostat=ios,action=
'write',status=
'replace'&
99 write(emp_e,*)
'EMPIRE ERROR: CANNOT open file ',filename
100 write(emp_e,*)
'Very strange that I couldnt open it. Im going to stop&
104 write(unit_ens_rmse,*) mse
Module containing EMPIRE coupling data.
Module that stores the information about the outputting from empire.
Module that stores the information about the timestepping process.
subroutine output_ens_rmse()
subroutine to output RMSEs
Module that stores the dimension of observation and state spaces.
subroutine get_truth(x)
Subroutine to read truth from the file written by save_truth .
module pf_control holds all the information to control the the main program