UFO
ROobserror.interface.F90
Go to the documentation of this file.
1 !
2 ! (C) Copyright 2017-2018 UCAR
3 !
4 ! This software is licensed under the terms of the Apache Licence Version 2.0
5 ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6 !
8 
9 use fckit_configuration_module, only: fckit_configuration
10 use iso_c_binding
12 
15 
16 implicit none
17 private
18 
19 #define LISTED_TYPE ufo_roobserror
20 
21 !> Linked list interface - defines registry_t type
22 #include "oops/util/linkedList_i.f"
23 
24 !> Global registry
25 type(registry_t) :: ufo_roobserror_registry
26 
27 ! ------------------------------------------------------------------------------
28 contains
29 ! ------------------------------------------------------------------------------
30 !> Linked list implementation
31 #include "oops/util/linkedList_c.f"
32 ! ------------------------------------------------------------------------------
33 
34 subroutine ufo_roobserror_create_c(c_self, c_obspace, c_conf, c_filtervar) bind(c,name='ufo_roobserror_create_f90')
35 use oops_variables_mod
36 implicit none
37 integer(c_int), intent(inout) :: c_self
38 type(c_ptr), value, intent(in) :: c_obspace
39 type(c_ptr), value, intent(in) :: c_conf
40 type(c_ptr), value, intent(in) :: c_filtervar
41 type(ufo_roobserror), pointer :: self
42 type(fckit_configuration) :: f_conf
43 
44 call ufo_roobserror_registry%setup(c_self, self)
45 f_conf = fckit_configuration(c_conf)
46 
47 self%obsvar = oops_variables(c_filtervar)
48 self%variable = self%obsvar%variable(1)
49 
50 call ufo_roobserror_create(self, c_obspace, f_conf)
51 
52 end subroutine ufo_roobserror_create_c
53 
54 ! ------------------------------------------------------------------------------
55 
56 subroutine ufo_roobserror_delete_c(c_self) bind(c,name='ufo_roobserror_delete_f90')
57 implicit none
58 integer(c_int), intent(inout) :: c_self
59 
60 type(ufo_roobserror), pointer :: self
61 
62 call ufo_roobserror_registry%get(c_self, self)
63 call ufo_roobserror_delete(self)
64 call ufo_roobserror_registry%delete(c_self, self)
65 
66 end subroutine ufo_roobserror_delete_c
67 
68 ! ------------------------------------------------------------------------------
69 
70 subroutine ufo_roobserror_prior_c(c_self) bind(c,name='ufo_roobserror_prior_f90')
71 implicit none
72 integer(c_int), intent(in) :: c_self
73 type(ufo_roobserror), pointer :: self
74 
75 call ufo_roobserror_registry%get(c_self, self)
76 call ufo_roobserror_prior(self)
77 
78 end subroutine ufo_roobserror_prior_c
79 
80 ! ------------------------------------------------------------------------------
81 
82 end module ufo_roobserror_mod_c
ufo_roobserror_mod_c::ufo_roobserror_create_c
subroutine ufo_roobserror_create_c(c_self, c_obspace, c_conf, c_filtervar)
Linked list implementation.
Definition: ROobserror.interface.F90:35
ufo_roobserror_mod_c::ufo_roobserror_prior_c
subroutine ufo_roobserror_prior_c(c_self)
Definition: ROobserror.interface.F90:71
ufo_roobserror_mod::ufo_roobserror_prior
subroutine, public ufo_roobserror_prior(self)
Definition: ufo_roobserror_mod.F90:64
ufo_roobserror_mod_c::ufo_roobserror_delete_c
subroutine ufo_roobserror_delete_c(c_self)
Definition: ROobserror.interface.F90:57
ufo_geovals_mod
Definition: ufo_geovals_mod.F90:7
ufo_roobserror_mod::ufo_roobserror_create
subroutine, public ufo_roobserror_create(self, obspace, f_conf)
Definition: ufo_roobserror_mod.F90:37
ufo_geovals_mod_c
Definition: GeoVaLs.interface.F90:7
ufo_roobserror_mod::ufo_roobserror
Definition: ufo_roobserror_mod.F90:25
ufo_roobserror_mod::ufo_roobserror_delete
subroutine, public ufo_roobserror_delete(self)
Definition: ufo_roobserror_mod.F90:57
ufo_roobserror_mod
Fortran module to implement RO observational error.
Definition: ufo_roobserror_mod.F90:8
ufo_roobserror_mod_c
Definition: ROobserror.interface.F90:7
ufo_geovals_mod_c::ufo_geovals_registry
type(registry_t), public ufo_geovals_registry
Linked list interface - defines registry_t type.
Definition: GeoVaLs.interface.F90:30
ufo_roobserror_mod_c::ufo_roobserror_registry
type(registry_t) ufo_roobserror_registry
Linked list interface - defines registry_t type.
Definition: ROobserror.interface.F90:25