FV3 Bundle
ufo_basis_mod.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 
7 
8  use iso_c_binding
11 
12  type, abstract :: ufo_basis
13  private
14  contains
15  procedure, non_overridable :: opr_simobs => opr_simobs_
16  procedure(simobs_), deferred :: simobs
17  end type ufo_basis
18 
19  abstract interface
20 
21  ! ------------------------------------------------------------------------------
22 
23  subroutine simobs_(self, geovals, hofx, obss)
24  use iso_c_binding
25  import ufo_basis, ufo_geovals
26  implicit none
27  class(ufo_basis), intent(in) :: self
28  type(ufo_geovals), intent(in) :: geovals
29  real(c_double), intent(inout) :: hofx(:)
30  type(c_ptr), value, intent(in) :: obss
31  end subroutine simobs_
32 
33  ! ------------------------------------------------------------------------------
34 
35  end interface
36 
37 contains
38 
39 ! ------------------------------------------------------------------------------
40 
41  subroutine opr_simobs_(self, c_key_geovals, c_obsspace, c_hofx)
42  implicit none
43 
44  class(ufo_basis), intent(in) :: self
45  integer(c_int), intent(in) :: c_key_geovals
46  type(c_ptr), value, intent(in) :: c_obsspace
47  real(c_double), intent(inout) :: c_hofx(:)
48 
49  type(ufo_geovals), pointer :: geovals
50 
51  call ufo_geovals_registry%get(c_key_geovals,geovals)
52 
53  call self%simobs(geovals, c_hofx, c_obsspace)
54 
55  end subroutine opr_simobs_
56 
57 ! ------------------------------------------------------------------------------
58 
59 end module ufo_basis_mod
subroutine opr_simobs_(self, c_key_geovals, c_obsspace, c_hofx)
type to hold interpolated fields required by the obs operators
type(registry_t), public ufo_geovals_registry
Linked list interface - defines registry_t type.