9 use kinds,
only: kind_real
12 use ufo_vars_mod,
only: maxvarlen
18 integer :: nothing_yet
19 character(len=MAXVARLEN),
allocatable :: var_scaling_variables(:)
20 real (kind=kind_real),
allocatable :: var_scaling_magnitudes(:)
23 #define LISTED_TYPE mpas_covar
26 #include <oops/util/linkedList_i.f>
35 #include <oops/util/linkedList_c.f>
47 use fckit_configuration_module,
only: fckit_configuration
53 type(fckit_configuration),
intent(in) :: f_conf
56 character(kind=c_char,len=:),
allocatable :: char_array(:)
57 real(kind=c_float),
allocatable :: real_array(:)
59 if (f_conf%has(
"var_scaling_variables") .and. f_conf%has(
"var_scaling_magnitudes"))
then
60 call f_conf%get_or_die(
"var_scaling_variables",char_array)
61 call f_conf%get_or_die(
"var_scaling_magnitudes",real_array)
62 if(
size(real_array) /=
size(char_array))
then
63 call abor1_ftn(
"--> mpas_b_setup_f90: var_scaling_variables and var_scaling_magnitudes have different sizes")
66 if(len(char_array) > maxvarlen)
then
67 call abor1_ftn(
"--> mpas_b_setup_f90: length of strings in var_scaling_variables greater than MAXVARLEN")
69 allocate(self % var_scaling_variables(
size(char_array)))
70 self % var_scaling_variables = char_array
71 allocate(self % var_scaling_magnitudes(
size(real_array)))
72 self % var_scaling_magnitudes = real(real_array,kind=kind_real)
74 allocate(self % var_scaling_variables(0))
75 allocate(self % var_scaling_magnitudes(0))
86 deallocate(self % var_scaling_variables)
87 deallocate(self % var_scaling_magnitudes)
100 real,
intent(inout) :: xctl
115 real,
intent(in) :: xctl
129 real,
intent(in) :: xctl
142 real,
intent(inout) :: xctl
subroutine mpas_covar_sqrt_inv_mult(self, xctl, xincr)
Multiply streamfunction by inverse(sqrt(C)), where C is 3d covariance matrix.
subroutine mpas_covar_sqrt_inv_mult_ad(self, xctl, xincr)
Multiply streamfunction by inverse(sqrt(C)) - Adjoint.
subroutine mpas_covar_delete(self)
subroutine mpas_covar_sqrt_mult(self, xincr, xctl)
Multiply streamfunction by sqrt(C), where C is a 3d covariance matrix.
type(registry_t) mpas_covar_registry
Linked list interface - defines registry_t type.
subroutine mpas_covar_setup(self, geom, f_conf)
Linked list implementation.
subroutine mpas_covar_sqrt_mult_ad(self, xincr, xctl)
Multiply streamfunction by sqrt(C) - Adjoint.
Fortran derived type to hold configuration data for the background/model covariance.
Fortran derived type to hold MPAS field.
Fortran derived type to hold geometry definition.