EMPIRE DA  v1.9.1
Data assimilation codes using EMPIRE communication
 All Classes Files Functions Variables Pages
deterministic_model.f90
Go to the documentation of this file.
1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2 !!! Time-stamp: <2016-10-18 15:05:01 pbrowne>
3 !!!
4 !!! subroutine to simply move the model forward in time one timestep
5 !!! Copyright (C) 2014 Philip A. Browne
6 !!!
7 !!! This program is free software: you can redistribute it and/or modify
8 !!! it under the terms of the GNU General Public License as published by
9 !!! the Free Software Foundation, either version 3 of the License, or
10 !!! (at your option) any later version.
11 !!!
12 !!! This program is distributed in the hope that it will be useful,
13 !!! but WITHOUT ANY WARRANTY; without even the implied warranty of
14 !!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 !!! GNU General Public License for more details.
16 !!!
17 !!! You should have received a copy of the GNU General Public License
18 !!! along with this program. If not, see <http://www.gnu.org/licenses/>.
19 !!!
20 !!! Email: p.browne @ reading.ac.uk
21 !!! Mail: School of Mathematical and Physical Sciences,
22 !!! University of Reading,
23 !!! Reading, UK
24 !!! RG6 6BB
25 !!!
26 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
32 
34  use output_empire, only : emp_e
35  use pf_control
36  use sizes
37  use comms
38 
39  IMPLICIT NONE
40  include 'mpif.h'
41  integer, parameter :: rk = kind(1.0d0)
42 
43 ! integer :: particle,k,tag,mpi_err
44 ! integer :: mpi_status( MPI_STATUS_SIZE )
45  logical, parameter :: nan_check=.false.
46 
47  if(nan_check) then
48  if(.not. all(pf%psi .eq. pf%psi)) then
49  write(emp_e,*) 'NaN detected in deterministic_model before mp&
50  &i_send to model'
51  stop
52  end if
53  end if
54 
55  call send_all_models(state_dim,pf%count,pf%psi,1)
56 
57  call recv_all_models(state_dim,pf%count,pf%psi)
58 
59  if(nan_check) then
60  if(.not. all(pf%psi .eq. pf%psi)) then
61  write(emp_e,*) 'NaN detected in deterministic_model after mpi_recv from &
62  &model'
63  stop
64  end if
65  end if
66 
67 
68 end subroutine deterministic_model
subroutine send_all_models(stateDim, nrhs, x, tag)
subroutine to send all the model states to the models
Definition: comms.f90:945
subroutine deterministic_model
subroutine to simply move the model forward in time one timestep
Module containing EMPIRE coupling data.
Definition: comms.f90:57
Module that stores the information about the outputting from empire.
subroutine recv_all_models(stateDim, nrhs, x)
subroutine to receive all the model states from the models after
Definition: comms.f90:993
Module that stores the dimension of observation and state spaces.
Definition: sizes.f90:29
module pf_control holds all the information to control the the main program
Definition: pf_control.f90:29