FV3 Bundle
ufo_aircraft_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
17 
18  !> Linked list interface - defines registry_t type
19 #include "../../linkedList_i.f"
20 
21  !> Global registry
22  type(registry_t) :: ufo_aircraft_registry
23 
24  ! ------------------------------------------------------------------------------
25 contains
26  ! ------------------------------------------------------------------------------
27  !> Linked list implementation
28 #include "../../linkedList_c.f"
29 
30 ! ------------------------------------------------------------------------------
31 
32 subroutine ufo_aircraft_setup_c(c_key_self, c_conf) bind(c,name='ufo_aircraft_setup_f90')
33 implicit none
34 integer(c_int), intent(inout) :: c_key_self
35 type(c_ptr), intent(in) :: c_conf
36 
37 type(ufo_aircraft), pointer :: self
38 
39 call ufo_aircraft_registry%setup(c_key_self, self)
40 
41 end subroutine ufo_aircraft_setup_c
42 
43 ! ------------------------------------------------------------------------------
44 
45 subroutine ufo_aircraft_delete_c(c_key_self) bind(c,name='ufo_aircraft_delete_f90')
46 implicit none
47 integer(c_int), intent(inout) :: c_key_self
48 
49 type(ufo_aircraft), pointer :: self
50 
51 call ufo_aircraft_registry%delete(c_key_self, self)
52 
53 end subroutine ufo_aircraft_delete_c
54 
55 ! ------------------------------------------------------------------------------
56 
57 subroutine ufo_aircraft_simobs_c(c_key_self, c_key_geovals, c_obsspace, c_nobs, c_hofx, c_bias) bind(c,name='ufo_aircraft_simobs_f90')
58 
59 implicit none
60 integer(c_int), intent(in) :: c_key_self
61 integer(c_int), intent(in) :: c_key_geovals
62 type(c_ptr), value, intent(in) :: c_obsspace
63 integer(c_int), intent(in) :: c_nobs
64 real(c_double), intent(inout) :: c_hofx(c_nobs)
65 integer(c_int), intent(in) :: c_bias
66 
67 type(ufo_aircraft), pointer :: self
68 
69 character(len=*), parameter :: myname_="ufo_aircraft_simobs_c"
70 
71 call ufo_aircraft_registry%get(c_key_self, self)
72 
73 call self%opr_simobs(c_key_geovals, c_obsspace, c_hofx)
74 
75 end subroutine ufo_aircraft_simobs_c
76 
77 ! ------------------------------------------------------------------------------
78 
79 end module ufo_aircraft_mod_c
Fortran module to handle aircraft observations.
subroutine ufo_aircraft_simobs_c(c_key_self, c_key_geovals, c_obsspace, c_nobs, c_hofx, c_bias)
subroutine ufo_aircraft_delete_c(c_key_self)
subroutine ufo_aircraft_setup_c(c_key_self, c_conf)
Linked list implementation.
type(registry_t) ufo_aircraft_registry
Linked list interface - defines registry_t type.
Fortran module to handle aircraft observations.