FV3 Bundle
ufo_insitutemperature_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 temperature profile observations
7 
9 
10  use iso_c_binding
11  use config_mod
12  use ufo_geovals_mod, only: ufo_geovals
15  implicit none
16  private
17 
18 #define LISTED_TYPE ufo_insitutemperature
19 
20  !> Linked list interface - defines registry_t type
21 #include "../../linkedList_i.f"
22 
23  !> Global registry
24  type(registry_t) :: ufo_insitutemperature_registry
25 
26  ! ------------------------------------------------------------------------------
27 contains
28  ! ------------------------------------------------------------------------------
29  !> Linked list implementation
30 #include "../../linkedList_c.f"
31 
32 ! ------------------------------------------------------------------------------
33 
34 subroutine ufo_insitutemperature_setup_c(c_key_self, c_conf) bind(c,name='ufo_insitutemperature_setup_f90')
35 implicit none
36 integer(c_int), intent(inout) :: c_key_self
37 type(c_ptr), intent(in) :: c_conf
38 
39 type(ufo_insitutemperature), pointer :: self
40 
42 call ufo_insitutemperature_registry%add(c_key_self)
43 call ufo_insitutemperature_registry%get(c_key_self, self)
44 
45 end subroutine ufo_insitutemperature_setup_c
46 
47 ! ------------------------------------------------------------------------------
48 
49 subroutine ufo_insitutemperature_delete_c(c_key_self) bind(c,name='ufo_insitutemperature_delete_f90')
50 implicit none
51 integer(c_int), intent(inout) :: c_key_self
52 
53 type(ufo_insitutemperature), pointer :: self
54 
55 call ufo_insitutemperature_registry%get(c_key_self, self)
56 call ufo_insitutemperature_registry%remove(c_key_self)
57 
58 end subroutine ufo_insitutemperature_delete_c
59 
60 ! ------------------------------------------------------------------------------
61 
62 subroutine ufo_insitutemperature_simobs_c(c_key_self, c_key_geovals, c_obsspace, c_nobs, c_hofx, c_bias) bind(c,name='ufo_insitutemperature_simobs_f90')
63 
64 implicit none
65 integer(c_int), intent(in) :: c_key_self
66 integer(c_int), intent(in) :: c_key_geovals
67 integer(c_int), intent(in) :: c_nobs
68 real(c_double), intent(inout) :: c_hofx(c_nobs)
69 type(c_ptr), value, intent(in) :: c_obsspace
70 integer(c_int), intent(in) :: c_bias
71 
72 type(ufo_insitutemperature), pointer :: self
73 type(ufo_geovals), pointer :: geovals
74 character(len=*), parameter :: myname_="ufo_insitutemperature_simobs_c"
75 
76 call ufo_insitutemperature_registry%get(c_key_self, self)
77 call ufo_geovals_registry%get(c_key_geovals,geovals)
78 
79 call ufo_insitutemperature_simobs(self, geovals, c_hofx, c_obsspace)
80 
81 end subroutine ufo_insitutemperature_simobs_c
82 
type(registry_t) ufo_insitutemperature_registry
Linked list interface - defines registry_t type.
subroutine, public ufo_insitutemperature_simobs(self, geovals, hofx, obss)
subroutine ufo_insitutemperature_delete_c(c_key_self)
subroutine ufo_insitutemperature_setup_c(c_key_self, c_conf)
Linked list implementation.
Fortran module to handle temperature profile observations.
type to hold interpolated fields required by the obs operators
type(registry_t), public ufo_geovals_registry
Linked list interface - defines registry_t type.
Fortran module to handle temperature profile observations.
subroutine ufo_insitutemperature_simobs_c(c_key_self, c_key_geovals, c_obsspace, c_nobs, c_hofx, c_bias)