FV3 Bundle
ufo_radiosonde_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 radiosonde observations
7 
9 
10  use iso_c_binding
11  use config_mod
13  implicit none
14  private
15 
16 #define LISTED_TYPE ufo_radiosonde
17 
18  !> Linked list interface - defines registry_t type
19 #include "../../linkedList_i.f"
20 
21  !> Global registry
22  type(registry_t) :: ufo_radiosonde_registry
23 
24  ! ------------------------------------------------------------------------------
25 
26 contains
27  ! ------------------------------------------------------------------------------
28  !> Linked list implementation
29 #include "../../linkedList_c.f"
30 
31 ! ------------------------------------------------------------------------------
32 
33 subroutine ufo_radiosonde_setup_c(c_key_self, c_conf) bind(c,name='ufo_radiosonde_setup_f90')
34 implicit none
35 integer(c_int), intent(inout) :: c_key_self
36 type(c_ptr), intent(in) :: c_conf
37 
38 type(ufo_radiosonde), pointer :: self
39 
40 call ufo_radiosonde_registry%setup(c_key_self, self)
41 
42 end subroutine ufo_radiosonde_setup_c
43 
44 ! ------------------------------------------------------------------------------
45 
46 subroutine ufo_radiosonde_delete_c(c_key_self) bind(c,name='ufo_radiosonde_delete_f90')
47 implicit none
48 integer(c_int), intent(inout) :: c_key_self
49 
50 type(ufo_radiosonde), pointer :: self
51 
52 call ufo_radiosonde_registry%delete(c_key_self, self)
53 
54 end subroutine ufo_radiosonde_delete_c
55 
56 ! ------------------------------------------------------------------------------
57 
58 subroutine ufo_radiosonde_simobs_c(c_key_self, c_key_geovals, c_obsspace, c_nobs, c_hofx, c_bias) bind(c,name='ufo_radiosonde_simobs_f90')
59 
60 implicit none
61 integer(c_int), intent(in) :: c_key_self
62 integer(c_int), intent(in) :: c_key_geovals
63 type(c_ptr), value, intent(in) :: c_obsspace
64 integer(c_int), intent(in) :: c_nobs
65 real(c_double), intent(inout) :: c_hofx(c_nobs)
66 integer(c_int), intent(in) :: c_bias
67 
68 type(ufo_radiosonde), pointer :: self
69 
70 character(len=*), parameter :: myname_="ufo_radiosonde_simobs_c"
71 
72 call ufo_radiosonde_registry%get(c_key_self, self)
73 call self%opr_simobs(c_key_geovals, c_obsspace, c_hofx)
74 
75 end subroutine ufo_radiosonde_simobs_c
76 
77 ! ------------------------------------------------------------------------------
78 
79 end module ufo_radiosonde_mod_c
subroutine ufo_radiosonde_delete_c(c_key_self)
subroutine ufo_radiosonde_setup_c(c_key_self, c_conf)
Linked list implementation.
Fortran module to handle radiosonde observations.
subroutine ufo_radiosonde_simobs_c(c_key_self, c_key_geovals, c_obsspace, c_nobs, c_hofx, c_bias)
type(registry_t) ufo_radiosonde_registry
Linked list interface - defines registry_t type.
Fortran module to handle radiosonde observations.