FV3 Bundle
fv3jedi_covariance_mod.f90
Go to the documentation of this file.
1 ! (C) Copyright 2017 UCAR
2 !
3 ! This software is licensed under the terms of the Apache Licence Version 2.0
4 ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
5 
7 
8 use iso_c_binding
9 use config_mod
10 use fv3jedi_increment_mod, only: fv3jedi_increment
12 
13 implicit none
14 
15 !> Fortran derived type to hold configuration data for the background/model covariance
17  integer :: nothing_yet
18 end type fv3jedi_covar
19 
20 ! ------------------------------------------------------------------------------
21 contains
22 
23 ! ------------------------------------------------------------------------------
24 
25 !> Setup for the model's 3d error covariance matrices (B and Q_i)
26 
27 !> This routine queries the configuration for the parameters that define the
28 !! covariance matrix, and stores the relevant values in the
29 !! error covariance structure.
30 
31 subroutine fv3jedi_covar_setup(self, geom, c_conf)
32 
33 implicit none
34 type(fv3jedi_covar), intent(inout) :: self !< Covariance structure
35 type(c_ptr), intent(in) :: c_conf !< Configuration
36 type(fv3jedi_geom), intent(in) :: geom !< Geometry
37 
38 end subroutine fv3jedi_covar_setup
39 
40 ! ------------------------------------------------------------------------------
41 
42 subroutine fv3jedi_covar_delete(self)
43 
44 implicit none
45 type(fv3jedi_covar), intent(inout) :: self !< Covariance structure
46 
47 end subroutine fv3jedi_covar_delete
48 
49 ! ------------------------------------------------------------------------------
50 
51 !> Multiply streamfunction by inverse(sqrt(C)), where C is 3d covariance matrix
52 
53 subroutine fv3jedi_covar_sqrt_inv_mult(self, xctl, xincr)
54 
55 implicit none
56 type(fv3jedi_covar), intent(in) :: self
57 real, intent(inout) :: xctl
58 type(fv3jedi_increment), intent(in) :: xincr
59 
60 end subroutine fv3jedi_covar_sqrt_inv_mult
61 
62 ! ------------------------------------------------------------------------------
63 
64 !> Multiply streamfunction by inverse(sqrt(C)) - Adjoint
65 
66 subroutine fv3jedi_covar_sqrt_inv_mult_ad(self, xctl, xincr)
67 
68 implicit none
69 type(fv3jedi_covar), intent(in) :: self
70 type(fv3jedi_increment), intent(inout) :: xincr
71 real, intent(in) :: xctl
72 
73 end subroutine fv3jedi_covar_sqrt_inv_mult_ad
74 
75 ! ------------------------------------------------------------------------------
76 
77 !> Multiply streamfunction by sqrt(C), where C is a 3d covariance matrix
78 
79 subroutine fv3jedi_covar_sqrt_mult(self, xincr, xctl)
80 
81 implicit none
82 type(fv3jedi_covar), intent(in) :: self
83 type(fv3jedi_increment), intent(inout) :: xincr
84 real, intent(in) :: xctl
85 
86 end subroutine fv3jedi_covar_sqrt_mult
87 
88 ! ------------------------------------------------------------------------------
89 
90 !> Multiply streamfunction by sqrt(C) - Adjoint
91 
92 subroutine fv3jedi_covar_sqrt_mult_ad(self, xincr, xctl)
93 
94 implicit none
95 type(fv3jedi_covar), intent(in) :: self
96 real, intent(inout) :: xctl
97 type(fv3jedi_increment), intent(in) :: xincr
98 
99 end subroutine fv3jedi_covar_sqrt_mult_ad
100 
101 ! ------------------------------------------------------------------------------
102 
103 end module fv3jedi_covariance_mod
subroutine fv3jedi_covar_sqrt_inv_mult_ad(self, xctl, xincr)
Multiply streamfunction by inverse(sqrt(C)) - Adjoint.
Fortran derived type to hold configuration data for the background/model covariance.
subroutine fv3jedi_covar_setup(self, geom, c_conf)
Setup for the model&#39;s 3d error covariance matrices (B and Q_i)
Fortran derived type to hold geometry data for the FV3JEDI model.
subroutine fv3jedi_covar_delete(self)
subroutine fv3jedi_covar_sqrt_mult_ad(self, xincr, xctl)
Multiply streamfunction by sqrt(C) - Adjoint.
subroutine fv3jedi_covar_sqrt_mult(self, xincr, xctl)
Multiply streamfunction by sqrt(C), where C is a 3d covariance matrix.
Handle increment for the FV3JEDI model.
Fortran module handling geometry for the FV3 model.
subroutine fv3jedi_covar_sqrt_inv_mult(self, xctl, xincr)
Multiply streamfunction by inverse(sqrt(C)), where C is 3d covariance matrix.