39 integer(I4B),
public :: nodenumber = 0
40 integer(I4B),
public :: unitnumber = 0
41 character(len=LENOBSNAME),
public :: name =
''
42 character(len=LENOBSTYPE),
public :: obstypeid =
''
43 character(len=200),
public :: idstring =
''
44 character(len=LENBOUNDNAME),
public :: featurename =
''
45 character(len=LENBOUNDNAME),
public :: featurename2 =
''
48 integer(I4B),
public :: nodenumber2 = 0
49 integer(I4B),
public :: jaindex = -2
52 integer(I4B),
public :: intpak1 = 0
53 real(dp),
public :: obsdepth =
dzero
54 real(dp),
public :: dblpak1 =
dzero
58 integer(I4B),
public :: indxbnds_count = 0
59 integer(I4B),
allocatable,
dimension(:),
public :: indxbnds
62 logical,
public :: formattedoutput = .true.
63 logical,
public :: bndfound = .false.
64 real(dp),
public :: currenttimestependvalue =
dzero
65 real(dp),
public :: currenttimestependtime =
dzero
68 integer(I4B),
public :: indxobsoutput = -1
78 procedure,
public ::
da
83 character(len=LENOBSTYPE),
public :: obstypeid =
''
84 logical,
public :: cumulative = .false.
85 procedure(processidsub),
nopass,
pointer,
public :: processidptr => null()
96 subroutine processidsub(obsrv, dis, inunitobs, iout)
103 integer(I4B),
intent(in) :: inunitobs
104 integer(I4B),
intent(in) :: iout
105 end subroutine processidsub
122 this%CurrentTimeStepEndValue =
dzero
131 subroutine writeto(this, obstab, btagfound, fnamein)
135 character(len=*),
intent(in) :: btagfound
136 character(len=*),
intent(in) :: fnamein
138 character(len=12) :: tag
139 character(len=80) :: fnameout
142 if (len_trim(btagfound) > 12)
then
143 tag = btagfound(1:12)
145 write (tag,
'(a12)') btagfound
149 if (len_trim(fnamein) > 80)
then
150 fnameout = fnamein(1:80)
152 write (fnameout,
'(a80)') fnamein
156 call obstab%add_term(this%Name)
157 call obstab%add_term(tag//trim(this%ObsTypeId))
158 call obstab%add_term(
'ALL TIMES')
159 call obstab%add_term(
'"'//trim(this%IDstring)//
'"')
160 call obstab%add_term(fnameout)
173 this%indxbnds_count = 0
176 if (
allocated(this%indxbnds))
then
177 deallocate (this%indxbnds)
181 allocate (this%indxbnds(0))
195 integer(I4B),
intent(in) :: indx
198 this%indxbnds_count = this%indxbnds_count + 1
204 this%indxbnds(this%indxbnds_count) = indx
215 if (
allocated(this%indxbnds))
then
216 deallocate (this%indxbnds)
229 formatted, indx, obsData, inunit)
232 character(len=*),
intent(in) :: defline
233 integer(I4B),
intent(in) :: numunit
234 logical,
intent(in) :: formatted
235 integer(I4B),
intent(in) :: indx
236 type(
obsdatatype),
dimension(:),
pointer,
intent(in) :: obsdata
237 integer(I4B),
intent(in) :: inunit
243 integer(I4B) :: istart
244 integer(I4B) :: istop
252 allocate (newobservation)
253 allocate (newobservation%indxbnds(0))
256 newobservation%indxbnds_count = 0
262 call urword(defline, icol, istart, istop, 1, n, r, iout, inunit)
263 newobservation%Name = defline(istart:istop)
266 call urword(defline, icol, istart, istop, 1, n, r, iout, inunit)
267 newobservation%ObsTypeId = defline(istart:istop)
271 if (obsdata(i)%ObsTypeID == newobservation%ObsTypeId)
then
272 newobservation%obsDatum => obsdata(i)
274 elseif (obsdata(i)%ObsTypeID ==
'')
then
281 istop = len_trim(defline)
282 if (istart > istop)
then
285 newobservation%IDstring = defline(istart:istop)
288 newobservation%UnitNumber = numunit
289 newobservation%FormattedOutput = formatted
290 newobservation%IndxObsOutput = indx
300 class(*),
pointer,
intent(inout) :: obj
305 if (.not.
associated(obj))
return
320 type(
listtype),
intent(inout) :: list
323 class(*),
pointer :: obj
336 type(
listtype),
intent(inout) :: list
337 integer(I4B),
intent(in) :: idx
341 class(*),
pointer :: obj
343 obj => list%GetItem(idx)
This module contains simulation constants.
real(dp), parameter dnodata
real no data constant
integer(i4b), parameter maxobstypes
maximum number of observation types
integer(i4b), parameter lenboundname
maximum length of a bound name
integer(i4b), parameter lenobsname
maximum length of a observation name
real(dp), parameter dzero
real constant zero
integer(i4b), parameter lenobstype
maximum length of a observation type (CONTINUOUS)
This module defines variable data types.
This module contains the derived types ObserveType and ObsDataType.
subroutine resetcurrentvalue(this)
@ brief Reset current observation value
subroutine da(this)
@ brief Deallocate a observation
subroutine addobsindex(this, indx)
@ brief Add a observation index
subroutine writeto(this, obstab, btagfound, fnamein)
@ brief Write observation input data
subroutine, public constructobservation(newObservation, defLine, numunit, formatted, indx, obsData, inunit)
@ brief Construct a new ObserveType
subroutine resetobsindex(this)
@ brief Reset a observation index
type(observetype) function, pointer, public getobsfromlist(list, idx)
@ brief Get an ObserveType from a list
subroutine, public addobstolist(list, obs)
@ brief Add a ObserveType to a list
type(observetype) function, pointer castasobservetype(obj)
@ brief Cast a object as a ObserveType
This module contains simulation methods.
subroutine, public store_warning(msg, substring)
Store warning message.
subroutine, public store_error(msg, terminate)
Store an error message.
subroutine, public store_error_unit(iunit, terminate)
Store the file unit number.
real(dp), pointer, public totim
time relative to start of simulation
real(dp), pointer, public totalsimtime
time at end of simulation
A generic heterogeneous doubly-linked list.