9 & bind(c,name=
'mpas_b_setup_f90')
11 use fckit_configuration_module,
only: fckit_configuration
17 integer(c_int),
intent(inout) :: c_key_self
18 type(c_ptr),
value,
intent(in) :: c_conf
19 integer(c_int),
intent(in) :: c_key_geom
22 type(fckit_configuration) :: f_conf
29 f_conf = fckit_configuration(c_conf)
42 integer(c_int),
intent(inout) :: c_key_self
55 subroutine c_mpas_b_inv_mult(c_key_self, c_key_in, c_key_out) bind(c,name='mpas_b_invmult_f90')
64 integer(c_int),
intent(in) :: c_key_self
65 integer(c_int),
intent(in) :: c_key_in
66 integer(c_int),
intent(in) :: c_key_out
79 call copy_pool(xin % subFields, xout % subFields)
85 call copy_pool(xin % subFields, xout % subFields)
96 subroutine c_mpas_b_mult(c_key_self, c_key_in, c_key_out) bind(c,name='mpas_b_mult_f90')
99 use fckit_log_module,
only: fckit_log
105 use ufo_vars_mod,
only: ufo_vars_getindex
115 integer(c_int),
intent(in) :: c_key_self
116 integer(c_int),
intent(in) :: c_key_in
117 integer(c_int),
intent(in) :: c_key_out
121 type (mpas_pool_iterator_type) :: poolItr
122 type (field1DReal),
pointer :: field1d_src
123 type (field2DReal),
pointer :: field2d_src
131 call fckit_log%info (
'---- inside sub c_mpas_b_mult ----')
137 call copy_pool(xin % subFields, xout % subFields)
139 call mpas_pool_begin_iteration(xout % subFields)
140 do while ( mpas_pool_get_next_member(xout % subFields, poolitr) )
141 if (poolitr % memberType == mpas_pool_field .AND. poolitr % dataType == mpas_pool_real)
then
142 ivar = ufo_vars_getindex(self % var_scaling_variables,trim(poolitr % memberName))
143 if ( ivar < 1 ) cycle
144 if (poolitr % nDims == 1)
then
145 call mpas_pool_get_field(xout % subFields, poolitr % memberName, field1d_src)
146 field1d_src % array = field1d_src % array * self % var_scaling_magnitudes(ivar)
147 else if (poolitr % nDims == 2)
then
148 call mpas_pool_get_field(xout % subFields, poolitr % memberName, field2d_src)
149 field2d_src % array = field2d_src % array * self % var_scaling_magnitudes(ivar)
172 integer(c_int),
intent(in) :: c_key_self
173 integer(c_int),
intent(in) :: c_key_out
subroutine c_mpas_b_inv_mult(c_key_self, c_key_in, c_key_out)
Multiply streamfunction by inverse of covariance.
subroutine c_mpas_b_delete(c_key_self)
subroutine c_mpas_b_mult(c_key_self, c_key_in, c_key_out)
Multiply streamfunction by covariance.
subroutine c_mpas_b_setup(c_key_self, c_conf, c_key_geom)
subroutine c_mpas_b_randomize(c_key_self, c_key_out)
Generate randomized increment.
subroutine mpas_covar_delete(self)
type(registry_t) mpas_covar_registry
Linked list interface - defines registry_t type.
subroutine mpas_covar_setup(self, geom, f_conf)
Linked list implementation.
type(registry_t), public mpas_fields_registry
Linked list interface - defines registry_t type.
subroutine, public copy_pool(pool_src, pool)
type(registry_t), public mpas_geom_registry
Linked list interface - defines registry_t type.
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.