FV3 Bundle
ioda_obs_example_mod.F90
Go to the documentation of this file.
1 !
2 ! (C) Copyright 2017 UCAR
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 !> Fortran example module for observation space
8 
9 ! TODO: replace example with your_obsspace_name through the file
10 
12 
13 use kinds
14 use fckit_log_module, only : fckit_log
15 
16 implicit none
17 private
18 integer, parameter :: max_string=800
19 
20 public ioda_obs_example
24 
25 ! ------------------------------------------------------------------------------
26 
27 !> Fortran derived type to hold observation space info
28 ! TODO: fill in, below is just an example
30  integer :: nobs
31 end type ioda_obs_example
32 
33 ! ------------------------------------------------------------------------------
34 
35 contains
36 ! ------------------------------------------------------------------------------
37 ! TODO: replace the below function with your constructor of obsspace
38 subroutine ioda_obs_example_setup(self, nobs)
39 implicit none
40 type(ioda_obs_example), intent(inout) :: self
41 integer, intent(in) :: nobs
42 
43 call ioda_obs_example_delete(self)
44 
45 self%nobs = nobs
46 
47 end subroutine ioda_obs_example_setup
48 
49 ! ------------------------------------------------------------------------------
50 ! TODO: replace the below function with your destructor of obsspace
51 subroutine ioda_obs_example_delete(self)
52 implicit none
53 type(ioda_obs_example), intent(inout) :: self
54 
55 end subroutine ioda_obs_example_delete
56 
57 ! ------------------------------------------------------------------------------
58 ! TODO: replace the below function with your random obs generator
59 subroutine ioda_obs_example_generate(self, nobs)
60 implicit none
61 type(ioda_obs_example), intent(inout) :: self
62 integer, intent(in) :: nobs
63 
64 end subroutine ioda_obs_example_generate
65 
66 ! ------------------------------------------------------------------------------
67 ! TODO: replace the below function with your obsspace read
68 subroutine ioda_obs_example_read(filename, self)
69 implicit none
70 character(max_string), intent(in) :: filename
71 type(ioda_obs_example), intent(inout), target :: self
72 
73 end subroutine ioda_obs_example_read
74 
75 ! ------------------------------------------------------------------------------
76 ! TODO: replace the below function with your obsspace get locations function
77 subroutine ioda_obs_example_getlocs(self, locs)
79 implicit none
80 type(ioda_obs_example), intent(in) :: self
81 type(ioda_locs), intent(inout) :: locs
82 
83 end subroutine ioda_obs_example_getlocs
84 
85 ! ------------------------------------------------------------------------------
86 
87 end module ioda_obs_example_mod
subroutine, public ioda_obs_example_read(filename, self)
Fortran derived type to hold observation locations.
integer, parameter max_string
subroutine, public ioda_obs_example_setup(self, nobs)
subroutine, public ioda_obs_example_generate(self, nobs)
Fortran derived type to hold observation space info.
Fortran example module for observation space.
subroutine, public ioda_obs_example_getlocs(self, locs)
subroutine, public ioda_obs_example_delete(self)
Fortran module handling observation locations.