11 use mo_kind,
only : i4, dp
27 real(dp),
dimension(:, :),
allocatable :: dataobs
28 logical,
dimension(:, :),
allocatable :: maskobs
30 integer(i4) :: timestepinput
31 character(256) :: varname
36 real(dp),
dimension(:, :),
allocatable :: datasim
37 integer(i4) :: averagetimestep
39 integer(i4) :: averagecounter
55 type(
optidata),
intent(in) :: optidataObs
57 allocate(this%dataSim(
size(optidataobs%dataObs, dim = 1),
size(optidataobs%dataObs, dim = 2)))
58 this%dataSim(:, :) = 0.0_dp
59 this%averageTimestep = 1
60 this%averageCounter = 0
66 deallocate(this%dataSim)
71 integer(i4),
intent(in) :: timeStepInput
72 logical,
intent(in) :: is_new_day
73 logical,
intent(in) :: is_new_month
74 logical,
intent(in) :: is_new_year
76 select case(timestepinput)
79 this%averageTimestep = this%averageTimestep + 1
82 if (is_new_month)
then
83 this%averageTimestep = this%averageTimestep + 1
87 this%averageTimestep = this%averageTimestep + 1
95 real(dp),
dimension(:),
intent(in) :: data_sim
97 this%dataSim(:, this%averageTimestep) = &
98 this%dataSim(:, this%averageTimestep) + data_sim(:)
104 this%dataSim(:, this%averageTimestep) = &
105 this%dataSim(:, this%averageTimestep) / real(this%averageCounter, dp)
106 this%averageTimestep = this%averageTimestep + 1
107 this%averageCounter = 0
112 integer(i4),
intent(in) :: timeStepInput
113 logical,
intent(in) :: is_new_day
114 logical,
intent(in) :: is_new_month
115 logical,
intent(in) :: is_new_year
117 select case(timestepinput)
123 if (is_new_month)
then
127 if (is_new_year)
then
135 real(dp),
dimension(:),
intent(in) :: data_sim
137 call this%add(data_sim(:))
138 this%averageCounter = this%averageCounter + 1
Type definitions for optimization routines.
subroutine optidata_sim_average_add(this, data_sim)
subroutine optidata_sim_add(this, data_sim)
subroutine optidata_sim_increment_counter(this, timestepinput, is_new_day, is_new_month, is_new_year)
subroutine optidata_sim_average(this)
subroutine optidata_sim_init(this, optidataobs)
subroutine optidata_sim_average_per_timestep(this, timestepinput, is_new_day, is_new_month, is_new_year)
subroutine optidata_sim_destroy(this)
type for simulated optional data
optional data, such as sm, neutrons, et, tws