UFO
new_qc/example/ufo_example_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 
6 !> Fortran module to implement example check
7 
8 module ufo_example_mod
9 
10 use fckit_configuration_module, only: fckit_configuration
11 use iso_c_binding
12 use kinds
14 use obsspace_mod
15 use ufo_vars_mod
16 
17 implicit none
19 private
20 integer, parameter :: max_string=800
21 
22 ! ------------------------------------------------------------------------------
23 !> TODO: fill in this type
24 type, public :: ufo_example
25 private
26  character(len=max_string), public, allocatable :: geovars(:)
27 end type ufo_example
28 
29 ! ------------------------------------------------------------------------------
30 contains
31 ! ------------------------------------------------------------------------------
32 
33 subroutine ufo_example_create(self, f_conf)
34 implicit none
35 type(ufo_example), intent(inout) :: self
36 type(fckit_configuration), intent(in) :: f_conf
37 
38 ! TODO: set self%geovars (list of variables to use from GeoVaLs) if needed
39 
40 end subroutine ufo_example_create
41 
42 ! ------------------------------------------------------------------------------
43 
44 subroutine ufo_example_delete(self)
45 implicit none
46 type(ufo_example), intent(inout) :: self
47 
48 if (allocated(self%geovars)) deallocate(self%geovars)
49 
50 end subroutine ufo_example_delete
51 
52 ! ------------------------------------------------------------------------------
53 
54 subroutine ufo_example_prior(self, obspace, geovals)
55 implicit none
56 type(ufo_example), intent(in) :: self
57 type(c_ptr), value, intent(in) :: obspace
58 type(ufo_geovals), intent(in) :: geovals
59 
60 end subroutine ufo_example_prior
61 
62 ! ------------------------------------------------------------------------------
63 
64 subroutine ufo_example_post(self, obspace, nvars, nlocs, hofx, hofxdiags)
65 implicit none
66 type(ufo_example), intent(in) :: self
67 type(c_ptr), value, intent(in) :: obspace
68 integer, intent(in) :: nvars, nlocs
69 real(c_double), intent(in) :: hofx(nvars, nlocs)
70 type(ufo_geovals), intent(in) :: hofxdiags
71 
72 end subroutine ufo_example_post
73 
74 ! ------------------------------------------------------------------------------
75 
76 end module ufo_example_mod
ufo_avgkernel_mod::max_string
integer, parameter max_string
Definition: ufo_avgkernel_mod.F90:17
ufo_example_mod::ufo_example_post
subroutine, public ufo_example_post(self, obspace, nvars, nlocs, hofx, hofxdiags)
Definition: new_qc/example/ufo_example_mod.F90:65
ufo_example_mod::ufo_example_delete
subroutine, public ufo_example_delete(self)
Definition: new_qc/example/ufo_example_mod.F90:45
ufo_example_mod::ufo_example_prior
subroutine, public ufo_example_prior(self, obspace, geovals)
Definition: new_qc/example/ufo_example_mod.F90:55
ufo_example_mod::ufo_example
Fortran derived type for the observation type.
Definition: new_obsop/example/ufo_example_mod.F90:18
ufo_geovals_mod
Definition: ufo_geovals_mod.F90:7
ufo_vars_mod
Definition: ufo_variables_mod.F90:8
ufo_example_mod::ufo_example_create
subroutine, public ufo_example_create(self, f_conf)
Definition: new_qc/example/ufo_example_mod.F90:34
ufo_geovals_mod::ufo_geovals
type to hold interpolated fields required by the obs operators
Definition: ufo_geovals_mod.F90:47
ufo_example_mod
Fortran module for example observation operator.
Definition: new_obsop/example/ufo_example_mod.F90:8