EMPIRE DA  v1.9.1
Data assimilation codes using EMPIRE communication
 All Classes Files Functions Variables Pages
allocate_pf.f90
Go to the documentation of this file.
1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2 !!! Time-stamp: <2016-10-18 15:34:20 pbrowne>
3 !!!
4 !!! Subroutine to allocate space for the filtering code
5 !!! Copyright (C) 2015 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 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
28 subroutine allocate_pf
29  use output_empire, only : emp_e
30  use pf_control
31  use sizes
32  use histogram_data
33  integer :: st
34  allocate(pf%weight(pf%nens),stat=st)
35  if(st .ne. 0) then
36  write(emp_e,*) 'Error in allocating pf%weight'
37  stop
38  end if
39  pf%weight = -log(1.0d0/pf%nens)
40  allocate(pf%psi(state_dim,pf%count),stat=st)
41  if(st .ne. 0) then
42  write(emp_e,*) 'Error in allocating pf%psi'
43  stop
44  end if
45 
46  if(pf%use_talagrand) then
47  allocate(pf%talagrand(rhn_n,pf%nens+1),stat=st)
48  if(st .ne. 0) then
49  write(emp_e,*) 'Error in allocating pf%talagrand'
50  stop
51  end if
52  pf%talagrand = 0
53  end if
54 
55 end subroutine allocate_pf
Module that stores the information about the outputting from empire.
Module that stores the dimension of observation and state spaces.
Definition: sizes.f90:29
subroutine allocate_pf
subroutine to allocate space for the filtering code
Definition: allocate_pf.f90:28
Module to control what variables are used to generate rank histograms.
Definition: histogram.f90:29
module pf_control holds all the information to control the the main program
Definition: pf_control.f90:29