EMPIRE DA  v1.9.1
Data assimilation codes using EMPIRE communication
 All Classes Files Functions Variables Pages
fcn.f90
Go to the documentation of this file.
1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2 !!! Time-stamp: <2016-10-18 15:39:18 pbrowne>
3 !!!
4 !!! subroutine be called by optimization codes
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 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
27 
30 subroutine fcn( n, x, f, g )
31  use output_empire, only : emp_e
32  use pf_control
33  implicit none
34  integer,intent(in) :: n
35  real(kind=kind(1.0d0)), dimension(n), intent(in) :: x
37  real(kind=kind(1.0d0)), intent(out) :: f
38  real(kind=kind(1.0d0)), dimension(n), intent(out) :: g
40 
41  select case(pf%filter)
42  case('3D')
43  call threedvar_fcn(n,x,f,g)
44  case default
45  write(emp_e,*) 'wrong case in fcn'
46  stop
47  end select
48 ! print*,'function = ',f
49 ! print*,'gradient = ',g
50 end subroutine fcn
Module that stores the information about the outputting from empire.
subroutine threedvar_fcn(n, x, f, g)
subroutine to provide the objective function and gradient for 3dvar
module pf_control holds all the information to control the the main program
Definition: pf_control.f90:29
subroutine fcn(n, x, f, g)
This is the subroutine which the optimization routines call to get the objective function value and i...
Definition: 4denvar_fcn.f90:31