UFO
ObsGnssroRef.interface.F90
Go to the documentation of this file.
1 ! (C) Copyright 2017 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 gnssro observations
7 
9 
10  use fckit_configuration_module, only: fckit_configuration
11  use iso_c_binding
13 
14  implicit none
15  private
16 
17 #define LISTED_TYPE ufo_gnssro_Ref
18 
19  !> Linked list interface - defines registry_t type
20 #include "oops/util/linkedList_i.f"
21 
22  !> Global registry
23  type(registry_t) :: ufo_gnssro_ref_registry
24 
25  ! ------------------------------------------------------------------------------
26 contains
27  ! ------------------------------------------------------------------------------
28  !> Linked list implementation
29 #include "oops/util/linkedList_c.f"
30 
31 ! ------------------------------------------------------------------------------
32 
33 subroutine ufo_gnssro_ref_setup_c(c_key_self, c_conf) bind(c,name='ufo_gnssro_ref_setup_f90')
34 implicit none
35 integer(c_int), intent(inout) :: c_key_self
36 type(c_ptr), value, intent(in) :: c_conf
37 
38 type(ufo_gnssro_ref), pointer :: self
39 type(fckit_configuration) :: f_conf
40 
41 call ufo_gnssro_ref_registry%setup(c_key_self, self)
42 f_conf = fckit_configuration(c_conf)
43 
44 call self%setup(f_conf)
45 
46 end subroutine ufo_gnssro_ref_setup_c
47 
48 ! ------------------------------------------------------------------------------
49 
50 subroutine ufo_gnssro_ref_delete_c(c_key_self) bind(c,name='ufo_gnssro_ref_delete_f90')
51 implicit none
52 integer(c_int), intent(inout) :: c_key_self
53 
54 type(ufo_gnssro_ref), pointer :: self
55 
56 call ufo_gnssro_ref_registry%delete(c_key_self,self)
57 
58 end subroutine ufo_gnssro_ref_delete_c
59 
60 ! ------------------------------------------------------------------------------
61 
62 subroutine ufo_gnssro_ref_simobs_c(c_key_self, c_key_geovals, c_obsspace, c_nobs, c_hofx) bind(c,name='ufo_gnssro_ref_simobs_f90')
63 
64 implicit none
65 integer(c_int), intent(in) :: c_key_self
66 integer(c_int), intent(in) :: c_key_geovals
67 type(c_ptr), value, intent(in) :: c_obsspace
68 integer(c_int), intent(in) :: c_nobs
69 real(c_double), intent(inout) :: c_hofx(c_nobs)
70 
71 type(ufo_gnssro_ref), pointer :: self
72 
73 character(len=*), parameter :: myname_="ufo_gnssro_simobs_ref_c"
74 call ufo_gnssro_ref_registry%get(c_key_self, self)
75 call self%opr_simobs(c_key_geovals, c_obsspace, c_hofx)
76 
77 end subroutine ufo_gnssro_ref_simobs_c
78 
79 ! ------------------------------------------------------------------------------
80 
81 end module ufo_gnssro_ref_mod_c
Fortran module to handle gnssro observations.
subroutine ufo_gnssro_ref_setup_c(c_key_self, c_conf)
Linked list implementation.
subroutine ufo_gnssro_ref_simobs_c(c_key_self, c_key_geovals, c_obsspace, c_nobs, c_hofx)
type(registry_t) ufo_gnssro_ref_registry
Linked list interface - defines registry_t type.
subroutine ufo_gnssro_ref_delete_c(c_key_self)
Fortran module to handle gnssro refractivity observations.
Fortran derived type for gnssro trajectory.