UFO
ObsScatwindNeutralMetOffice.interface.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
2 ! (C) British Crown Copyright 2020 Met Office
3 !
4 ! This software is licensed under the terms of the Apache Licence Version 2.0
5 ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6 !-------------------------------------------------------------------------------
7 
8 !> Fortran module to handle scatwind observations - Met Office neutral operator
9 
11 
12  use fckit_configuration_module, only: fckit_configuration
13  use iso_c_binding
15  use ufo_geovals_mod, only: ufo_geovals
17 
18  implicit none
19  private
20 
21 #define LISTED_TYPE ufo_scatwind_neutralmetoffice
22 
23  !> Linked list interface - defines registry_t type
24 #include "oops/util/linkedList_i.f"
25 
26  !> Global registry
28 
29  ! ------------------------------------------------------------------------------
30 contains
31  ! ------------------------------------------------------------------------------
32  !> Linked list implementation
33 #include "oops/util/linkedList_c.f"
34 
35 ! ------------------------------------------------------------------------------
36 
37 subroutine ufo_scatwind_neutralmetoffice_setup_c(c_key_self, c_conf, c_obsvars, &
38  c_geovars) bind(c,name='ufo_scatwind_neutralmetoffice_setup_f90')
39 use oops_variables_mod
40 implicit none
41 integer(c_int), intent(inout) :: c_key_self
42 type(c_ptr), intent(in), value :: c_conf
43 type(c_ptr), intent(in), value :: c_obsvars !< variables to be simulated
44 type(c_ptr), intent(in), value :: c_geovars !< variables requested from the model
45 
46 type(ufo_scatwind_neutralmetoffice), pointer :: self
47 type(fckit_configuration) :: f_conf
48 
49 call ufo_scatwind_neutralmetoffice_registry%setup(c_key_self, self)
50 f_conf = fckit_configuration(c_conf)
51 
52 self%obsvars = oops_variables(c_obsvars)
53 self%geovars = oops_variables(c_geovars)
54 
55 call self%setup(f_conf)
56 
58 
59 ! ------------------------------------------------------------------------------
60 
61 subroutine ufo_scatwind_neutralmetoffice_delete_c(c_key_self) bind(c,name='ufo_scatwind_neutralmetoffice_delete_f90')
62 implicit none
63 integer(c_int), intent(inout) :: c_key_self
64 
65 type(ufo_scatwind_neutralmetoffice), pointer :: self
66 
67 call ufo_scatwind_neutralmetoffice_registry%delete(c_key_self,self)
68 
70 
71 ! ------------------------------------------------------------------------------
72 
73 subroutine ufo_scatwind_neutralmetoffice_simobs_c(c_key_self, c_key_geovals, &
74  c_obsspace, c_nvars, c_nlocs, &
75  c_hofx) bind(c,name='ufo_scatwind_neutralmetoffice_simobs_f90')
76 
77 implicit none
78 integer(c_int), intent(in) :: c_key_self
79 integer(c_int), intent(in) :: c_key_geovals
80 type(c_ptr), value, intent(in) :: c_obsspace
81 integer(c_int), intent(in) :: c_nvars, c_nlocs
82 real(c_double), intent(inout) :: c_hofx(c_nvars, c_nlocs)
83 
84 type(ufo_scatwind_neutralmetoffice), pointer :: self
85 type(ufo_geovals), pointer :: geovals
86 character(len=*), parameter :: myname_="ufo_scatwind_neutralmetoffice_simobs_c"
87 
88 call ufo_scatwind_neutralmetoffice_registry%get(c_key_self, self)
89 call ufo_geovals_registry%get(c_key_geovals, geovals)
90 
91 call self%simobs(geovals, c_obsspace, c_nvars, c_nlocs, c_hofx)
92 
94 
95 ! ------------------------------------------------------------------------------
96 
type(registry_t), public ufo_geovals_registry
Linked list interface - defines registry_t type.
Fortran module to handle scatwind observations - Met Office neutral operator.
subroutine ufo_scatwind_neutralmetoffice_setup_c(c_key_self, c_conf, c_obsvars, c_geovars)
Linked list implementation.
subroutine ufo_scatwind_neutralmetoffice_simobs_c(c_key_self, c_key_geovals, c_obsspace, c_nvars, c_nlocs, c_hofx)
type(registry_t) ufo_scatwind_neutralmetoffice_registry
Linked list interface - defines registry_t type.
Fortran module for Met Office scatwind neutral wind forward operator.
type to hold interpolated fields required by the obs operators