19 real(dp),
dimension(:),
pointer,
contiguous,
private :: x => null()
20 real(dp),
dimension(:),
pointer,
contiguous,
private :: flowja => null()
41 integer(I4B),
pointer,
intent(in) :: inobs
44 call obs%allocate_scalars()
46 obs%inputFilename =
''
47 obs%inUnitObs => inobs
55 type(
swfictype),
pointer,
intent(in) :: ic
56 real(DP),
dimension(:),
pointer,
contiguous,
intent(in) :: x
57 real(DP),
dimension(:),
pointer,
contiguous,
intent(in) :: flowja
63 call this%set_pointers(ic, x, flowja)
71 integer(I4B),
intent(in) :: iout
72 character(len=*),
intent(in) :: pkgname
73 character(len=*),
intent(in) :: filtyp
79 call this%ObsType%obs_df(iout, pkgname, filtyp, dis)
85 call this%StoreObsType(
'stage', .false., indx)
89 call this%StoreObsType(
'flow-ja-face', .true., indx)
99 integer(I4B) :: i, jaindex, nodenumber
100 character(len=100) :: msg
103 call this%obs_bd_clear()
106 if (this%npakobs > 0)
then
107 do i = 1, this%npakobs
108 obsrv => this%pakobs(i)%obsrv
109 nodenumber = obsrv%NodeNumber
110 jaindex = obsrv%JaIndex
111 select case (obsrv%ObsTypeId)
113 call this%SaveOneSimval(obsrv, this%x(nodenumber))
114 case (
'FLOW-JA-FACE')
115 call this%SaveOneSimval(obsrv, this%flowja(jaindex))
117 msg =
' Unrecognized observation type: '//trim(obsrv%ObsTypeId)
141 nullify (this%flowja)
142 call this%ObsType%obs_da()
150 type(
swfictype),
pointer,
intent(in) :: ic
151 real(DP),
dimension(:),
pointer,
contiguous,
intent(in) :: x
152 real(DP),
dimension(:),
pointer,
contiguous,
intent(in) :: flowja
156 this%flowja => flowja
167 integer(I4B),
intent(in) :: inunitobs
168 integer(I4B),
intent(in) :: iout
171 integer(I4B) :: icol, istart, istop
172 character(len=LINELENGTH) :: ermsg, string
175 string = obsrv%IDstring
180 nn1 = dis%noder_from_string(icol, istart, istop, inunitobs, &
181 iout, string, .false.)
184 obsrv%NodeNumber = nn1
186 ermsg =
'Error reading data from ID string'
198 integer(I4B),
intent(in) :: inunitobs
199 integer(I4B),
intent(in) :: iout
201 integer(I4B) :: nn1, nn2
202 integer(I4B) :: icol, istart, istop, jaidx
203 character(len=LINELENGTH) :: ermsg, string
205 70
format(
'Error: No connection exists between cells identified in text: ', a)
208 string = obsrv%IDstring
213 nn1 = dis%noder_from_string(icol, istart, istop, inunitobs, &
214 iout, string, .false.)
217 obsrv%NodeNumber = nn1
219 ermsg =
'Error reading data from ID string: '//string(istart:istop)
225 nn2 = dis%noder_from_string(icol, istart, istop, inunitobs, &
226 iout, string, .false.)
228 obsrv%NodeNumber2 = nn2
230 ermsg =
'Error reading data from ID string: '//string(istart:istop)
235 jaidx = dis%con%getjaindex(nn1, nn2)
237 write (ermsg, 70) trim(string)
240 obsrv%JaIndex = jaidx
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
integer(i4b), parameter maxobstypes
maximum number of observation types
This module defines variable data types.
This module contains the derived types ObserveType and ObsDataType.
This module contains the derived type ObsType.
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
integer(i4b) function, public count_errors()
Return number of errors.
subroutine, public store_error_unit(iunit, terminate)
Store the file unit number.
subroutine swf_obs_bd(this)
Save obs.
subroutine swf_obs_df(this, iout, pkgname, filtyp, dis)
Define.
subroutine set_pointers(this, ic, x, flowja)
Set pointers.
subroutine swf_obs_da(this)
Deallocate memory.
subroutine swf_process_intercell_obs_id(obsrv, dis, inunitobs, iout)
Process flow between two cells when requested.
subroutine swf_obs_ar(this, ic, x, flowja)
Allocate and read.
subroutine, public swf_obs_cr(obs, inobs)
Create a new obs object.
subroutine swf_process_stage_obs_id(obsrv, dis, inunitobs, iout)
Calculate stage observation when requested.
subroutine swf_obs_rp(this)
Do observations need any checking? If so, add checks here.