47 real(kind=kind(1.0d0)) :: start_t,end_t
49 real(kind=kind(1.0d0)),
allocatable,
dimension(:,:) :: analysis,&
52 write(6,
'(A)')
'PF: Starting PF code'
62 write(emp_o,*)
'PF: setting controls'
67 write(emp_o,*)
'PF: configuring model'
72 write(emp_o,*)
'allocating pf'
79 write(6,*)
'PF: starting to receive from model'
86 if(.not. pf%gen_Q)
then
94 write(6,*)
'PF: All models received in pf couple'
100 start_t = mpi_wtime()
102 allocate(analysis(state_dim,pf%count))
103 allocate(forecast(state_dim,pf%count))
104 allocate(inc(state_dim,pf%count))
110 write(6,*)
'PF: observation counter = ',j
114 do i = 1,pf%time_bwn_obs-1
115 pf%timestep = pf%timestep + 1
120 select case(pf%filter)
138 write(emp_e,*)
'Error -555: Incorrect pf%filter'
147 pf%timestep = pf%timestep + 1
148 write(6,*)
'starting the observation timestep'
155 select case(pf%filter)
184 print*,
'Difference in letkf and letks_filter = ',sum( (pf%psi&
187 pf%psi = forecast + inc
188 print*,
'Difference in letkf and letks = ',sum( (pf%psi&
192 write(emp_e,*)
'Error -556: Incorrect pf%filter'
197 write(6,*)
'PF: timestep = ',pf%timestep,
'after observation analysis'
208 write(6,*)
'PF: finished the loop - now to tidy up'
227 write(6,*)
'PF: finished deallocate_data - off to mpi_finalize'
230 call mpi_finalize(mpi_err)
231 write(*,*)
'Program couple_pf terminated successfully.'
232 write(*,*)
'Time taken in running the model = ',end_t-start_t
subroutine timestep_data_allocate_obs_times(n)
subroutine to allocate space for obs_times array
module for doing things related to the LETKS:
subroutine send_all_models(stateDim, nrhs, x, tag)
subroutine to send all the model states to the models
subroutine deallocate_pf
subroutine to deallocate space for the filtering code
subroutine deterministic_model
subroutine to simply move the model forward in time one timestep
subroutine configure_model
subroutine called initially to set up details and data for model specific functions ...
Module containing EMPIRE coupling data.
subroutine equivalent_weights_filter_zhu
subroutine to do the new scheme equal weights last time-step
subroutine close_emp_o()
subroutine to close the output file
Module that stores the information about the outputting from empire.
subroutine timestep_data_set_completed(t)
subroutine to define the number of completed timesteps
subroutine stochastic_model
subroutine to simply move the model forward in time one timestep PAB 21-05-2013
subroutine reconfigure_model
subroutine to reset variables that may change when the observation network changes ...
subroutine sir_filter
Subroutine to perform SIR filter (Sequential Importance Resampling)
Module that stores the information about the timestepping process.
program empire
the main program
subroutine recv_all_models(stateDim, nrhs, x)
subroutine to receive all the model states from the models after
subroutine initialise_mpi(mdl_id, cpl_root, cpl_mpi_comm)
subroutine letkf_analysis
subroutine to perform the ensemble transform Kalman filter as part of L-ETKF
subroutine save_truth(x)
Subroutine to save truth to a file .
subroutine timestep_data_set_tau(pseudotimestep)
subroutine to define the current number of timesteps between observations
subroutine timestep_data_set_current(t)
subroutine to define the current timestep
Module that stores the dimension of observation and state spaces.
subroutine diagnostics
Subroutine to give output diagnositics such as rank histograms.
subroutine proposal_filter
Subroutine to perform nudging in the proposal step of EWPF.
subroutine timestep_data_set_do_no_analysis
subroutine to define if the current timestep should not perform an analysis
subroutine trajectories
subroutine to output trajectories
subroutine output_from_pf
subroutine to output data from the filter
subroutine allocate_pf
subroutine to allocate space for the filtering code
subroutine random_seed_mpi(pfid)
Subroutine to set the random seed across MPI threads.
subroutine timestep_data_set_obs_times(obs_num_in_time, timestep)
subroutine to set the timestep corresponding to the observation number in time
subroutine perturb_particle(x)
Subroutine to perturb state vector governed by the init option.
subroutine letks_increment(psi, inc)
subroutine to compute the LETKS increments
subroutine set_pf_controls
subroutine to ensure pf_control data is ok
module pf_control holds all the information to control the the main program
subroutine genq
Subroutine to estimate Q from a long model run.
subroutine timestep_data_set_do_analysis
subroutine to define if the current timestep should perform an analysis
subroutine timestep_data_set_next_ob_time(ob_time)
subroutine to set the next observation timestep
subroutine letks_filter_stage
subroutine to compute the data for the LETKS, so that the increments can subsquently be computed ...
subroutine equivalent_weights_filter
subroutine to do the equivalent weights step
subroutine open_emp_o(id_num)
subroutine to open the file for outputting