FV3 Bundle
ufo_radiance_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 for Fortran-C++ interface functions for CRTM tl/ad obs operator
7 
9 
10  use iso_c_binding
11  use config_mod
13  implicit none
14  private
15 
16 #define LISTED_TYPE ufo_radiance_tlad
17 
18  !> Linked list interface - defines registry_t type
19 #include "../../linkedList_i.f"
20 
21  !> Global registry
22  type(registry_t) :: ufo_radiance_tlad_registry
23 
24 contains
25 
26  ! ------------------------------------------------------------------------------
27  !> Linked list implementation
28 #include "../../linkedList_c.f"
29 
30 ! ------------------------------------------------------------------------------
31 
32 subroutine ufo_radiance_tlad_setup_c(c_key_self, c_conf) bind(c,name='ufo_radiance_tlad_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_radiance_tlad), pointer :: self
38 
39 call ufo_radiance_tlad_registry%setup(c_key_self, self)
40 
41 call self%setup(c_conf)
42 
43 end subroutine ufo_radiance_tlad_setup_c
44 
45 ! ------------------------------------------------------------------------------
46 
47 subroutine ufo_radiance_tlad_delete_c(c_key_self) bind(c,name='ufo_radiance_tlad_delete_f90')
48 implicit none
49 integer(c_int), intent(inout) :: c_key_self
50 
51 type(ufo_radiance_tlad), pointer :: self
52 
53 call ufo_radiance_tlad_registry%get(c_key_self, self)
54 call self%opr_delete()
55 call ufo_radiance_tlad_registry%remove(c_key_self)
56 
57 end subroutine ufo_radiance_tlad_delete_c
58 
59 ! ------------------------------------------------------------------------------
60 
61 subroutine ufo_radiance_tlad_settraj_c(c_key_self, c_key_geovals, c_obsspace) bind(c,name='ufo_radiance_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_radiance_tlad), pointer :: self
69 
70 character(len=*), parameter :: myname_="ufo_radiance_tlad_settraj_c"
71 
72 call ufo_radiance_tlad_registry%get(c_key_self, self)
73 call self%opr_settraj(c_key_geovals, c_obsspace)
74 
75 end subroutine ufo_radiance_tlad_settraj_c
76 
77 ! ------------------------------------------------------------------------------
78 
79 subroutine ufo_radiance_simobs_tl_c(c_key_self, c_key_geovals, c_obsspace, c_nobs, c_hofx) bind(c,name='ufo_radiance_simobs_tl_f90')
80 
81 implicit none
82 integer(c_int), intent(in) :: c_key_self
83 integer(c_int), intent(in) :: c_key_geovals
84 type(c_ptr), value, intent(in) :: c_obsspace
85 integer(c_int), intent(in) :: c_nobs
86 real(c_double), intent(inout) :: c_hofx(c_nobs)
87 
88 type(ufo_radiance_tlad), pointer :: self
89 
90 character(len=*), parameter :: myname_="ufo_radiance_simobs_tl_c"
91 
92 call ufo_radiance_tlad_registry%get(c_key_self, self)
93 call self%opr_simobs_tl(c_key_geovals, c_obsspace, c_hofx)
94 
95 end subroutine ufo_radiance_simobs_tl_c
96 
97 ! ------------------------------------------------------------------------------
98 
99 subroutine ufo_radiance_simobs_ad_c(c_key_self, c_key_geovals, c_obsspace, c_nobs, c_hofx) bind(c,name='ufo_radiance_simobs_ad_f90')
101 implicit none
102 integer(c_int), intent(in) :: c_key_self
103 integer(c_int), intent(in) :: c_key_geovals
104 type(c_ptr), value, intent(in) :: c_obsspace
105 integer(c_int), intent(in) :: c_nobs
106 real(c_double), intent(in) :: c_hofx(c_nobs)
107 
108 type(ufo_radiance_tlad), pointer :: self
109 
110 character(len=*), parameter :: myname_="ufo_radiance_simobs_ad_c"
111 
112 call ufo_radiance_tlad_registry%get(c_key_self, self)
113 call self%opr_simobs_ad(c_key_geovals, c_obsspace, c_hofx)
114 
115 end subroutine ufo_radiance_simobs_ad_c
116 
117 ! ------------------------------------------------------------------------------
118 
119 end module ufo_radiance_tlad_mod_c
Fortran module for Fortran-C++ interface functions for CRTM tl/ad obs operator.
Fortran module to handle tl/ad for radiance observations.
subroutine ufo_radiance_tlad_settraj_c(c_key_self, c_key_geovals, c_obsspace)
subroutine ufo_radiance_simobs_tl_c(c_key_self, c_key_geovals, c_obsspace, c_nobs, c_hofx)
subroutine ufo_radiance_tlad_setup_c(c_key_self, c_conf)
Linked list implementation.
subroutine ufo_radiance_tlad_delete_c(c_key_self)
type(registry_t) ufo_radiance_tlad_registry
Linked list interface - defines registry_t type.
subroutine ufo_radiance_simobs_ad_c(c_key_self, c_key_geovals, c_obsspace, c_nobs, c_hofx)