FV3 Bundle
ufo_aircraft_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 aircraft observations
7 
9 
10  use iso_c_binding
11  use config_mod
13  implicit none
14  private
15 
16 #define LISTED_TYPE ufo_aircraft_tlad
17 
18  !> Linked list interface - defines registry_t type
19 #include "../../linkedList_i.f"
20 
21  !> Global registry
22  type(registry_t) :: ufo_aircraft_tlad_registry
23 
24  ! ------------------------------------------------------------------------------
25 
26 contains
27 
28  ! ------------------------------------------------------------------------------
29  !> Linked list implementation
30 #include "../../linkedList_c.f"
31 
32 ! ------------------------------------------------------------------------------
33 
34 subroutine ufo_aircraft_tlad_setup_c(c_key_self, c_conf) bind(c,name='ufo_aircraft_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_aircraft_tlad), pointer :: self
40 
41 call ufo_aircraft_tlad_registry%setup(c_key_self, self)
42 
43 end subroutine ufo_aircraft_tlad_setup_c
44 
45 ! ------------------------------------------------------------------------------
46 
47 subroutine ufo_aircraft_tlad_delete_c(c_key_self) bind(c,name='ufo_aircraft_tlad_delete_f90')
48 implicit none
49 integer(c_int), intent(inout) :: c_key_self
50 
51 type(ufo_aircraft_tlad), pointer :: self
52 
53 call ufo_aircraft_tlad_registry%get(c_key_self, self)
54 call self%opr_delete()
55 call ufo_aircraft_tlad_registry%remove(c_key_self)
56 
57 end subroutine ufo_aircraft_tlad_delete_c
58 
59 ! ------------------------------------------------------------------------------
60 
61 subroutine ufo_aircraft_tlad_settraj_c(c_key_self, c_key_geovals, c_obsspace) bind(c,name='ufo_aircraft_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_aircraft_tlad), pointer :: self
69 
70 character(len=*), parameter :: myname_="ufo_aircraft_tlad_settraj_c"
71 
72 call ufo_aircraft_tlad_registry%get(c_key_self, self)
73 
74 call self%opr_settraj(c_key_geovals, c_obsspace)
75 
76 end subroutine ufo_aircraft_tlad_settraj_c
77 
78 ! ------------------------------------------------------------------------------
79 
80 subroutine ufo_aircraft_simobs_tl_c(c_key_self, c_key_geovals, c_obsspace, c_nobs, c_hofx) bind(c,name='ufo_aircraft_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_aircraft_tlad), pointer :: self
90 
91 character(len=*), parameter :: myname_="ufo_aircraft_simobs_tl_c"
92 
93 call ufo_aircraft_tlad_registry%get(c_key_self, self)
94 
95 call self%opr_simobs_tl(c_key_geovals, c_obsspace, c_hofx)
96 
97 end subroutine ufo_aircraft_simobs_tl_c
98 
99 ! ------------------------------------------------------------------------------
100 
101 subroutine ufo_aircraft_simobs_ad_c(c_key_self, c_key_geovals, c_obsspace, c_nobs, c_hofx) bind(c,name='ufo_aircraft_simobs_ad_f90')
103 implicit none
104 integer(c_int), intent(in) :: c_key_self
105 integer(c_int), intent(in) :: c_key_geovals
106 type(c_ptr), value, intent(in) :: c_obsspace
107 integer(c_int), intent(in) :: c_nobs
108 real(c_double), intent(in) :: c_hofx(c_nobs)
109 
110 type(ufo_aircraft_tlad), pointer :: self
111 
112 character(len=*), parameter :: myname_="ufo_aircraft_simobs_ad_c"
113 
114 call ufo_aircraft_tlad_registry%get(c_key_self, self)
115 
116 call self%opr_simobs_ad(c_key_geovals, c_obsspace, c_hofx)
117 
118 end subroutine ufo_aircraft_simobs_ad_c
119 
120 ! ------------------------------------------------------------------------------
121 
122 end module ufo_aircraft_tlad_mod_c
subroutine ufo_aircraft_tlad_delete_c(c_key_self)
subroutine ufo_aircraft_simobs_ad_c(c_key_self, c_key_geovals, c_obsspace, c_nobs, c_hofx)
subroutine ufo_aircraft_simobs_tl_c(c_key_self, c_key_geovals, c_obsspace, c_nobs, c_hofx)
Fortran module to handle aircraft observations.
subroutine ufo_aircraft_tlad_settraj_c(c_key_self, c_key_geovals, c_obsspace)
Fortran module to handle aircraft observations.
subroutine ufo_aircraft_tlad_setup_c(c_key_self, c_conf)
Linked list implementation.
type(registry_t) ufo_aircraft_tlad_registry
Linked list interface - defines registry_t type.