FV3 Bundle
ufo_stericheight_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 steric height observations
7 
9 
10  use iso_c_binding
11  use config_mod
15  use ufo_vars_mod
16  implicit none
17  private
18 
19 #define LISTED_TYPE ufo_stericheight_tlad
20 
21  !> Linked list interface - defines registry_t type
22 #include "../../linkedList_i.f"
23 
24  !> Global registry
25  type(registry_t) :: ufo_stericheight_tlad_registry
26 
27  ! ------------------------------------------------------------------------------
28 contains
29  ! ------------------------------------------------------------------------------
30  !> Linked list implementation
31 #include "../../linkedList_c.f"
32 
33 ! ------------------------------------------------------------------------------
34 
35 subroutine ufo_stericheight_tlad_setup_c(c_key_self, c_conf) bind(c,name='ufo_stericheight_tlad_setup_f90')
36 implicit none
37 integer(c_int), intent(inout) :: c_key_self
38 type(c_ptr), intent(in) :: c_conf
39 
40 type(ufo_stericheight_tlad), pointer :: self
41 
43 call ufo_stericheight_tlad_registry%add(c_key_self)
44 call ufo_stericheight_tlad_registry%get(c_key_self, self)
45 
46 end subroutine ufo_stericheight_tlad_setup_c
47 
48 ! ------------------------------------------------------------------------------
49 
50 subroutine ufo_stericheight_tlad_delete_c(c_key_self) bind(c,name='ufo_stericheight_tlad_delete_f90')
51 implicit none
52 integer(c_int), intent(inout) :: c_key_self
53 
54 type(ufo_stericheight_tlad), pointer :: self
55 
56 call ufo_stericheight_tlad_registry%get(c_key_self, self)
57 call ufo_stericheight_tlad_registry%remove(c_key_self)
58 
59 end subroutine ufo_stericheight_tlad_delete_c
60 
61 ! ------------------------------------------------------------------------------
62 
63 subroutine ufo_stericheight_tlad_gettraj(c_key_self, c_nobs, c_vars, c_key_traj) bind(c,name='ufo_stericheight_tlad_gettraj_f90')
64 use fckit_log_module, only : fckit_log
65 
66 implicit none
67 integer(c_int), intent(in) :: c_key_self
68 integer(c_int), intent(in) :: c_nobs
69 type(c_ptr), intent(in) :: c_vars
70 integer(c_int), intent(inout) :: c_key_traj
71 
72 type(ufo_stericheight_tlad), pointer :: self
73 type(ufo_geovals), pointer :: traj
74 type(ufo_vars) :: cvars
75 integer nobs
76 
77 call ufo_stericheight_tlad_registry%get(c_key_self, self)
78 call ufo_geovals_registry%get(c_key_traj,traj)
79 call ufo_vars_setup(cvars, c_vars)
80 !call qg_obsoper_registry%get(c_key_self, self)
81 !call qg_goms_registry%init()
82 !call qg_goms_registry%add(c_key_traj)
83 !call qg_goms_registry%get(c_key_traj,traj)
84 !call qg_vars_create(vars, c_vars)
85 !allocate(mobs(c_nobs))
86 !do jj=1,c_nobs
87 ! mobs(jj)=jj
88 !enddo
89 nobs=c_nobs
90 call ufo_geovals_setup(traj, cvars, nobs)
91 !deallocate(mobs)
92 
93 end subroutine ufo_stericheight_tlad_gettraj
94 
95 ! ------------------------------------------------------------------------------
96 
97 subroutine ufo_stericheight_tlad_settraj_c(c_key_self, c_key_geovals) bind(c,name='ufo_stericheight_tlad_settraj_f90')
98 
99 implicit none
100 integer(c_int), intent(in) :: c_key_self
101 integer(c_int), intent(in) :: c_key_geovals
102 
103 type(ufo_stericheight_tlad), pointer :: self
104 type(ufo_geovals), pointer :: geovals
105 
106 character(len=*), parameter :: myname_="ufo_stericheight_tlad_settraj_c"
107 
108 print *, myname_
109 
110 call ufo_stericheight_tlad_registry%get(c_key_self, self)
111 call ufo_geovals_registry%get(c_key_geovals,geovals)
112 
113 call ufo_stericheight_tlad_settraj(self, geovals)
114 
115 end subroutine ufo_stericheight_tlad_settraj_c
116 
117 ! ------------------------------------------------------------------------------
118 
119 subroutine ufo_stericheight_simobs_tl_c(c_key_self, c_key_geovals, c_nobs, c_hofx) bind(c,name='ufo_stericheight_simobs_tl_f90')
121 implicit none
122 integer(c_int), intent(in) :: c_key_self
123 integer(c_int), intent(in) :: c_key_geovals
124 integer(c_int), intent(in) :: c_nobs
125 real(c_double), intent(inout) :: c_hofx(:)
126 
127 type(ufo_stericheight_tlad), pointer :: self
128 type(ufo_geovals), pointer :: geovals
129 
130 character(len=*), parameter :: myname_="ufo_stericheight_simobs_tl_c"
131 
132 call ufo_stericheight_tlad_registry%get(c_key_self, self)
133 call ufo_geovals_registry%get(c_key_geovals,geovals)
134 
135 call ufo_stericheight_simobs_tl(self, geovals, c_hofx)
136 
137 end subroutine ufo_stericheight_simobs_tl_c
138 
139 ! ------------------------------------------------------------------------------
140 
141 subroutine ufo_stericheight_simobs_ad_c(c_key_self, c_key_geovals, c_nobs, c_hofx) bind(c,name='ufo_stericheight_simobs_ad_f90')
143 implicit none
144 integer(c_int), intent(in) :: c_key_self
145 integer(c_int), intent(in) :: c_key_geovals
146 integer(c_int), intent(in) :: c_nobs
147 real(c_double), intent(inout) :: c_hofx(:)
148 
149 type(ufo_stericheight_tlad), pointer :: self
150 type(ufo_geovals), pointer :: geovals
151 
152 character(len=*), parameter :: myname_="ufo_stericheight_simobs_ad_c"
153 
154 call ufo_stericheight_tlad_registry%get(c_key_self, self)
155 call ufo_geovals_registry%get(c_key_geovals,geovals)
156 
157 call ufo_stericheight_simobs_ad(self, geovals, c_hofx)
158 
159 end subroutine ufo_stericheight_simobs_ad_c
160 
Fortran module to handle steric height observations.
subroutine ufo_stericheight_tlad_settraj_c(c_key_self, c_key_geovals)
subroutine ufo_stericheight_tlad_delete_c(c_key_self)
subroutine, public ufo_stericheight_simobs_tl(self, geovals, hofx)
type(registry_t) ufo_stericheight_tlad_registry
Linked list interface - defines registry_t type.
Fortran module to handle steric height operator.
subroutine, public ufo_stericheight_tlad_settraj(self, geovals)
subroutine ufo_stericheight_simobs_ad_c(c_key_self, c_key_geovals, c_nobs, c_hofx)
subroutine ufo_stericheight_simobs_tl_c(c_key_self, c_key_geovals, c_nobs, c_hofx)
subroutine ufo_stericheight_tlad_gettraj(c_key_self, c_nobs, c_vars, c_key_traj)
type to hold interpolated fields required by the obs operators
type(registry_t), public ufo_geovals_registry
Linked list interface - defines registry_t type.
subroutine ufo_stericheight_tlad_setup_c(c_key_self, c_conf)
Linked list implementation.
subroutine, public ufo_geovals_setup(self, vars, nobs)
subroutine, public ufo_vars_setup(self, c_vars)
subroutine, public ufo_stericheight_simobs_ad(self, geovals, hofx)