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
57 type(
swfictype),
pointer,
intent(in) :: ic
58 real(DP),
dimension(:),
pointer,
contiguous,
intent(in) :: x
59 real(DP),
dimension(:),
pointer,
contiguous,
intent(in) :: flowja
65 call this%set_pointers(ic, x, flowja)
75 integer(I4B),
intent(in) :: iout
76 character(len=*),
intent(in) :: pkgname
77 character(len=*),
intent(in) :: filtyp
83 call this%ObsType%obs_df(iout, pkgname, filtyp, dis)
89 call this%StoreObsType(
'stage', .false., indx)
93 call this%StoreObsType(
'flow-ja-face', .true., indx)
105 integer(I4B) :: i, jaindex, nodenumber
106 character(len=100) :: msg
109 call this%obs_bd_clear()
112 if (this%npakobs > 0)
then
113 do i = 1, this%npakobs
114 obsrv => this%pakobs(i)%obsrv
115 nodenumber = obsrv%NodeNumber
116 jaindex = obsrv%JaIndex
117 select case (obsrv%ObsTypeId)
119 call this%SaveOneSimval(obsrv, this%x(nodenumber))
120 case (
'FLOW-JA-FACE')
121 call this%SaveOneSimval(obsrv, this%flowja(jaindex))
123 msg =
' Unrecognized observation type: '//trim(obsrv%ObsTypeId)
149 nullify (this%flowja)
150 call this%ObsType%obs_da()
160 type(
swfictype),
pointer,
intent(in) :: ic
161 real(DP),
dimension(:),
pointer,
contiguous,
intent(in) :: x
162 real(DP),
dimension(:),
pointer,
contiguous,
intent(in) :: flowja
166 this%flowja => flowja
179 integer(I4B),
intent(in) :: inunitobs
180 integer(I4B),
intent(in) :: iout
183 integer(I4B) :: icol, istart, istop
184 character(len=LINELENGTH) :: ermsg, string
187 string = obsrv%IDstring
192 nn1 = dis%noder_from_string(icol, istart, istop, inunitobs, &
193 iout, string, .false.)
196 obsrv%NodeNumber = nn1
198 ermsg =
'Error reading data from ID string'
212 integer(I4B),
intent(in) :: inunitobs
213 integer(I4B),
intent(in) :: iout
215 integer(I4B) :: nn1, nn2
216 integer(I4B) :: icol, istart, istop, jaidx
217 character(len=LINELENGTH) :: ermsg, string
219 70
format(
'Error: No connection exists between cells identified in text: ', a)
222 string = obsrv%IDstring
227 nn1 = dis%noder_from_string(icol, istart, istop, inunitobs, &
228 iout, string, .false.)
231 obsrv%NodeNumber = nn1
233 ermsg =
'Error reading data from ID string: '//string(istart:istop)
239 nn2 = dis%noder_from_string(icol, istart, istop, inunitobs, &
240 iout, string, .false.)
242 obsrv%NodeNumber2 = nn2
244 ermsg =
'Error reading data from ID string: '//string(istart:istop)
249 jaidx = dis%con%getjaindex(nn1, nn2)
251 write (ermsg, 70) trim(string)
254 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.