FV3 Bundle
ufo_aod_interface.F90
Go to the documentation of this file.
1 ! (C) Copyright 2017-2018 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 
6 !> Fortran module to handle aod observations
7 
9 
10  use iso_c_binding
11  use config_mod
12  use ufo_aod_mod
13  implicit none
14  private
15 
16 #define LISTED_TYPE ufo_aod
17 
18  !> Linked list interface - defines registry_t type
19 #include "../../linkedList_i.f"
20 
21  !> Global registry
22  type(registry_t) :: ufo_aod_registry
23 
24  ! ------------------------------------------------------------------------------
25 
26 contains
27 
28  ! ------------------------------------------------------------------------------
29  !> Linked list implementation
30 #include "../../linkedList_c.f"
31 
32 ! ------------------------------------------------------------------------------
33 
34 subroutine ufo_aod_setup_c(c_key_self, c_conf) bind(c,name='ufo_aod_setup_f90')
35 implicit none
36 integer(c_int), intent(inout) :: c_key_self
37 type(c_ptr), intent(in) :: c_conf
38 
39 type(ufo_aod), pointer :: self
40 
41 call ufo_aod_registry%setup(c_key_self, self)
42 
43 end subroutine ufo_aod_setup_c
44 
45 ! ------------------------------------------------------------------------------
46 
47 subroutine ufo_aod_delete_c(c_key_self) bind(c,name='ufo_aod_delete_f90')
48 implicit none
49 integer(c_int), intent(inout) :: c_key_self
50 
51 type(ufo_aod), pointer :: self
52 
53 call ufo_aod_registry%delete(c_key_self, self)
54 
55 end subroutine ufo_aod_delete_c
56 
57 ! ------------------------------------------------------------------------------
58 
59 subroutine ufo_aod_simobs_c(c_key_self, c_key_geovals, c_obsspace, c_nobs, c_hofx, c_bias) bind(c,name='ufo_aod_simobs_f90')
60 
61 implicit none
62 integer(c_int), intent(in) :: c_key_self
63 integer(c_int), intent(in) :: c_key_geovals
64 type(c_ptr), value, intent(in) :: c_obsspace
65 integer(c_int), intent(in) :: c_nobs
66 real(c_double), intent(inout) :: c_hofx(c_nobs)
67 integer(c_int), intent(in) :: c_bias
68 
69 type(ufo_aod), pointer :: self
70 
71 character(len=*), parameter :: myname_="ufo_aod_simobs_c"
72 
73 call ufo_aod_registry%get(c_key_self, self)
74 call self%opr_simobs(c_key_geovals, c_obsspace, c_hofx)
75 
76 end subroutine ufo_aod_simobs_c
77 
78 ! ------------------------------------------------------------------------------
79 
80 end module ufo_aod_mod_c
subroutine ufo_aod_simobs_c(c_key_self, c_key_geovals, c_obsspace, c_nobs, c_hofx, c_bias)
Fortran module to handle aod observations.
Fortran module to handle aod observations.
Definition: ufo_aod_mod.F90:8
subroutine ufo_aod_delete_c(c_key_self)
type(registry_t) ufo_aod_registry
Linked list interface - defines registry_t type.
subroutine ufo_aod_setup_c(c_key_self, c_conf)
Linked list implementation.