10 use fckit_configuration_module,
only: fckit_configuration
13 use oops_variables_mod
21 #define LISTED_TYPE ufo_metoffice_bmatrixstatic
24 #include "oops/util/linkedList_i.f"
32 #include "oops/util/linkedList_c.f"
37 bind(c, name=
'ufo_metoffice_bmatrixstatic_setup_f90')
40 integer(c_int),
intent(inout) :: c_self
41 type(c_ptr),
value,
intent(in) :: c_conf
42 integer(c_size_t),
intent(inout) :: nbands
43 integer(c_size_t),
intent(inout) :: nelements
46 type(fckit_configuration) :: f_conf
47 character(len=:),
allocatable :: str
48 character(len=:),
allocatable :: str_array(:)
49 logical :: qtotal_flag
50 character(len=200) :: filepath
52 character(len=200),
allocatable :: background_fields(:)
58 f_conf = fckit_configuration(c_conf)
59 call f_conf % get_or_die(
"BMatrix", str)
63 varsize = f_conf % get_size(
"background fields")
64 allocate(background_fields(varsize))
65 call f_conf % get_or_die(
"background fields", str_array)
66 background_fields(1:varsize) = str_array
69 call f_conf % get_or_die(
"qtotal", qtotal_flag)
72 call self % setup(background_fields, trim(filepath), qtotal_flag)
75 nbands = self % nbands
76 nelements =
size(self % store, 1)
82 bind(c, name=
'ufo_metoffice_bmatrixstatic_delete_f90')
85 integer(c_int),
intent(inout) :: c_self
100 bmatrix_store) bind(C, name='ufo_metoffice_bmatrixstatic_getelements_f90')
103 integer(c_int),
intent(inout) :: c_self
104 integer(c_size_t),
intent(in) :: nelements
105 integer(c_size_t),
intent(in) :: nbands
106 real(c_float),
intent(inout) :: south(nbands)
107 real(c_float),
intent(inout) :: north(nbands)
108 real(c_float),
intent(inout) :: bmatrix_store(nelements,nelements,nbands)
113 south = self % south(1:nbands)
114 north = self % north(1:nbands)
115 bmatrix_store = real(self % store, kind=kind_single)
subroutine ufo_metoffice_bmatrixstatic_setup_c(c_self, c_conf, nbands, nelements)
Linked list implementation.
type(registry_t) ufo_metoffice_bmatrixstatic_registry
Linked list interface - defines registry_t type.
subroutine ufo_metoffice_bmatrixstatic_getelements_c(c_self, nelements, nbands, south, north, bmatrix_store)
subroutine ufo_metoffice_bmatrixstatic_delete_c(c_self)
Fortran module containing the full b-matrix data type and methods for the 1D-Var.