FV3 Bundle
ufo_aod_tlad_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_tlad_mod
13  implicit none
14  private
15 
16 #define LISTED_TYPE ufo_aod_tlad
17 
18  !> Linked list interface - defines registry_t type
19 #include "../../linkedList_i.f"
20 
21  !> Global registry
22  type(registry_t) :: ufo_aod_tlad_registry
23 
24  ! ------------------------------------------------------------------------------
25 
26 contains
27 
28  ! ------------------------------------------------------------------------------
29  !> Linked list implementation
30 #include "../../linkedList_c.f"
31 
32 ! ------------------------------------------------------------------------------
33 
34 subroutine ufo_aod_tlad_setup_c(c_key_self, c_conf) bind(c,name='ufo_aod_tlad_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_tlad), pointer :: self
40 
41 call ufo_aod_tlad_registry%setup(c_key_self, self)
42 
43 end subroutine ufo_aod_tlad_setup_c
44 
45 ! ------------------------------------------------------------------------------
46 
47 subroutine ufo_aod_tlad_delete_c(c_key_self) bind(c,name='ufo_aod_tlad_delete_f90')
48 implicit none
49 integer(c_int), intent(inout) :: c_key_self
50 
51 type(ufo_aod_tlad), pointer :: self
52 
53 call ufo_aod_tlad_registry%get(c_key_self, self)
54 call self%opr_delete()
55 call ufo_aod_tlad_registry%remove(c_key_self)
56 
57 end subroutine ufo_aod_tlad_delete_c
58 
59 ! ------------------------------------------------------------------------------
60 
61 subroutine ufo_aod_tlad_settraj_c(c_key_self, c_key_geovals, c_obsspace) bind(c,name='ufo_aod_tlad_settraj_f90')
62 
63 implicit none
64 integer(c_int), intent(in) :: c_key_self
65 integer(c_int), intent(in) :: c_key_geovals
66 type(c_ptr), value, intent(in) :: c_obsspace
67 
68 type(ufo_aod_tlad), pointer :: self
69 
70 character(len=*), parameter :: myname_="ufo_aod_tlad_settraj_c"
71 
72 call ufo_aod_tlad_registry%get(c_key_self, self)
73 
74 call self%opr_settraj(c_key_geovals, c_obsspace)
75 
76 end subroutine ufo_aod_tlad_settraj_c
77 
78 ! ------------------------------------------------------------------------------
79 
80 subroutine ufo_aod_simobs_tl_c(c_key_self, c_key_geovals, c_obsspace, c_nobs, c_hofx) bind(c,name='ufo_aod_simobs_tl_f90')
81 
82 implicit none
83 integer(c_int), intent(in) :: c_key_self
84 integer(c_int), intent(in) :: c_key_geovals
85 type(c_ptr), value, intent(in) :: c_obsspace
86 integer(c_int), intent(in) :: c_nobs
87 real(c_double), intent(inout) :: c_hofx(c_nobs)
88 
89 type(ufo_aod_tlad), pointer :: self
90 
91 character(len=*), parameter :: myname_="ufo_aod_simobs_tl_c"
92 
93 call ufo_aod_tlad_registry%get(c_key_self, self)
94 call self%opr_simobs_tl(c_key_geovals, c_obsspace, c_hofx)
95 
96 end subroutine ufo_aod_simobs_tl_c
97 
98 ! ------------------------------------------------------------------------------
99 
100 subroutine ufo_aod_simobs_ad_c(c_key_self, c_key_geovals, c_obsspace, c_nobs, c_hofx) bind(c,name='ufo_aod_simobs_ad_f90')
102 implicit none
103 integer(c_int), intent(in) :: c_key_self
104 integer(c_int), intent(in) :: c_key_geovals
105 type(c_ptr), value, intent(in) :: c_obsspace
106 integer(c_int), intent(in) :: c_nobs
107 real(c_double), intent(in) :: c_hofx(c_nobs)
108 
109 type(ufo_aod_tlad), pointer :: self
110 
111 character(len=*), parameter :: myname_="ufo_aod_simobs_ad_c"
112 
113 call ufo_aod_tlad_registry%get(c_key_self, self)
114 call self%opr_simobs_ad(c_key_geovals, c_obsspace, c_hofx)
115 
116 end subroutine ufo_aod_simobs_ad_c
117 
118 ! ------------------------------------------------------------------------------
119 
120 end module ufo_aod_tlad_mod_c
Fortran module to handle aod observations.
Fortran module to handle aod observations.
subroutine ufo_aod_tlad_settraj_c(c_key_self, c_key_geovals, c_obsspace)
subroutine ufo_aod_tlad_delete_c(c_key_self)
subroutine ufo_aod_simobs_ad_c(c_key_self, c_key_geovals, c_obsspace, c_nobs, c_hofx)
subroutine ufo_aod_tlad_setup_c(c_key_self, c_conf)
Linked list implementation.
subroutine ufo_aod_simobs_tl_c(c_key_self, c_key_geovals, c_obsspace, c_nobs, c_hofx)
type(registry_t) ufo_aod_tlad_registry
Linked list interface - defines registry_t type.