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
134 subroutine writeto(this, obstab, btagfound, fnamein)
138 character(len=*),
intent(in) :: btagfound
139 character(len=*),
intent(in) :: fnamein
141 character(len=12) :: tag
142 character(len=80) :: fnameout
145 if (len_trim(btagfound) > 12)
then
146 tag = btagfound(1:12)
148 write (tag,
'(a12)') btagfound
152 if (len_trim(fnamein) > 80)
then
153 fnameout = fnamein(1:80)
155 write (fnameout,
'(a80)') fnamein
159 call obstab%add_term(this%Name)
160 call obstab%add_term(tag//trim(this%ObsTypeId))
161 call obstab%add_term(
'ALL TIMES')
162 call obstab%add_term(
'"'//trim(this%IDstring)//
'"')
163 call obstab%add_term(fnameout)
179 this%indxbnds_count = 0
182 if (
allocated(this%indxbnds))
then
183 deallocate (this%indxbnds)
187 allocate (this%indxbnds(0))
204 integer(I4B),
intent(in) :: indx
207 this%indxbnds_count = this%indxbnds_count + 1
213 this%indxbnds(this%indxbnds_count) = indx
227 if (
allocated(this%indxbnds))
then
228 deallocate (this%indxbnds)
244 formatted, indx, obsData, inunit)
247 character(len=*),
intent(in) :: defline
248 integer(I4B),
intent(in) :: numunit
249 logical,
intent(in) :: formatted
250 integer(I4B),
intent(in) :: indx
251 type(
obsdatatype),
dimension(:),
pointer,
intent(in) :: obsdata
252 integer(I4B),
intent(in) :: inunit
258 integer(I4B) :: istart
259 integer(I4B) :: istop
267 allocate (newobservation)
268 allocate (newobservation%indxbnds(0))
271 newobservation%indxbnds_count = 0
277 call urword(defline, icol, istart, istop, 1, n, r, iout, inunit)
278 newobservation%Name = defline(istart:istop)
281 call urword(defline, icol, istart, istop, 1, n, r, iout, inunit)
282 newobservation%ObsTypeId = defline(istart:istop)
286 if (obsdata(i)%ObsTypeID == newobservation%ObsTypeId)
then
287 newobservation%obsDatum => obsdata(i)
289 elseif (obsdata(i)%ObsTypeID ==
'')
then
296 istop = len_trim(defline)
297 if (istart > istop)
then
300 newobservation%IDstring = defline(istart:istop)
303 newobservation%UnitNumber = numunit
304 newobservation%FormattedOutput = formatted
305 newobservation%IndxObsOutput = indx
318 class(*),
pointer,
intent(inout) :: obj
323 if (.not.
associated(obj))
return
341 type(
listtype),
intent(inout) :: list
344 class(*),
pointer :: obj
360 type(
listtype),
intent(inout) :: list
361 integer(I4B),
intent(in) :: idx
365 class(*),
pointer :: obj
367 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.