UFO
ObsGnssroBendMetOffice.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-bending angle Met Office 1d operator
7 
9 
10  use fckit_configuration_module, only: fckit_configuration
11  use fckit_log_module, only : fckit_log
12  use iso_c_binding
14  use ufo_geovals_mod
16 
17  implicit none
18  private
19 
20 #define LISTED_TYPE ufo_gnssro_BendMetOffice
21 
22  !> Linked list interface - defines registry_t type
23 #include "oops/util/linkedList_i.f"
24 
25  !> Global registry
27 
28  ! ------------------------------------------------------------------------------
29 contains
30  ! ------------------------------------------------------------------------------
31  !> Linked list implementation
32 #include "oops/util/linkedList_c.f"
33 
34 ! ------------------------------------------------------------------------------
35 
36 subroutine ufo_gnssro_bendmetoffice_setup_c(c_key_self, &
37  vert_interp_ops, &
38  pseudo_ops, &
39  min_temp_grad) bind(c,name='ufo_gnssro_bendmetoffice_setup_f90')
40 implicit none
41 integer(c_int), intent(inout) :: c_key_self
42 logical(c_bool), intent(in) :: vert_interp_ops
43 logical(c_bool), intent(in) :: pseudo_ops
44 real(c_float), intent(in) :: min_temp_grad
45 
46 type(ufo_gnssro_bendmetoffice), pointer :: self
47 
48 call ufo_gnssro_bendmetoffice_registry%setup(c_key_self, self)
49 
50 call self%setup(vert_interp_ops, pseudo_ops, min_temp_grad)
51 
53 
54 ! ------------------------------------------------------------------------------
55 
56 subroutine ufo_gnssro_bendmetoffice_delete_c(c_key_self) bind(c,name='ufo_gnssro_bendmetoffice_delete_f90')
57 implicit none
58 integer(c_int), intent(inout) :: c_key_self
59 
60 type(ufo_gnssro_bendmetoffice), pointer :: self
61 
62 call ufo_gnssro_bendmetoffice_registry%delete(c_key_self,self)
63 
65 
66 ! ------------------------------------------------------------------------------
67 
68 subroutine ufo_gnssro_bendmetoffice_simobs_c(c_key_self, c_key_geovals, c_obsspace, &
69  c_nobs, c_hofx, c_key_obs_diags) &
70  bind(c,name='ufo_gnssro_bendmetoffice_simobs_f90')
71 
72 implicit none
73 integer(c_int), intent(in) :: c_key_self ! Key giving pointer to self object
74 integer(c_int), intent(in) :: c_key_geovals ! Key giving pointer to geovals object
75 type(c_ptr), value, intent(in) :: c_obsspace ! Pointer to obs-space object
76 integer(c_int), intent(in) :: c_nobs ! Number of observations
77 real(c_double), intent(inout) :: c_hofx(c_nobs) ! Array of calculated H(x) object
78 integer(c_int), intent(in) :: c_key_obs_diags ! Key giving pointer to obs diagnostics object
79 
80 type(ufo_gnssro_bendmetoffice), pointer :: self ! Self object
81 type(ufo_geovals), pointer :: obs_diags ! Observations diagnostics
82 type(ufo_geovals), pointer :: geovals ! Geovals object
83 character(len=*), parameter :: myname_="ufo_gnssro_bendmetoffice_simobs_c"
84 character(len=200) :: output_message ! Message to be output
85 
86 write(output_message, *) 'TRACE: Beginning interface', c_key_obs_diags, c_key_geovals, c_key_self
87 call fckit_log % info(output_message)
88 
89 call ufo_gnssro_bendmetoffice_registry % get(c_key_self, self)
90 call ufo_geovals_registry % get(c_key_obs_diags, obs_diags)
91 call ufo_geovals_registry % get(c_key_geovals, geovals)
92 
93 call self%simobs(geovals, c_obsspace, c_hofx, obs_diags)
94 
95 write(output_message, *) 'TRACE: Finishing interface'
96 call fckit_log % info(output_message)
97 
99 
100 ! ------------------------------------------------------------------------------
101 
type(registry_t), public ufo_geovals_registry
Linked list interface - defines registry_t type.
Fortran module to handle gnssro observations-bending angle Met Office 1d operator.
subroutine ufo_gnssro_bendmetoffice_setup_c(c_key_self, vert_interp_ops, pseudo_ops, min_temp_grad)
Linked list implementation.
subroutine ufo_gnssro_bendmetoffice_simobs_c(c_key_self, c_key_geovals, c_obsspace, c_nobs, c_hofx, c_key_obs_diags)
type(registry_t) ufo_gnssro_bendmetoffice_registry
Linked list interface - defines registry_t type.
Fortran module for gnssro bending angle Met Office forward operator.
type to hold interpolated fields required by the obs operators