363 class(ListReaderType) :: this
365 integer(I4B) :: mxlist, ldim, naux
366 integer(I4B) :: ii, jj, idum, nod, istat, increment
368 integer(I4B),
dimension(:),
allocatable :: cellid
369 character(len=LINELENGTH) :: fname
371 character(len=*),
parameter :: fmtmxlsterronly = &
372 "('Error reading list. The number of records encountered exceeds &
373 &the maximum number of records. Number of records found is ',I0,&
374 &' but MAXBOUND is ', I0, '. Try increasing MAXBOUND for this list. &
375 &Error occurred reading the following line: ', a, 5x, '>>> ', a)"
378 mxlist =
size(this%rlist, 2)
379 ldim =
size(this%rlist, 1)
380 naux =
size(this%auxvar, 1)
385 allocate (cellid(this%ndim))
392 call this%line_reader%rdcom(this%inlist, 0, this%line, this%ierr)
396 if (this%nlist < 0)
then
398 call urword(this%line, this%lloc, this%istart, this%istop, 1, idum, r, &
399 this%iout, this%inlist)
400 if (this%line(this%istart:this%istop) ==
'END' .or. this%ierr < 0)
then
403 if (this%ierr == 0)
then
404 call this%line_reader%bkspc(this%inlist)
412 if (ii > mxlist)
then
413 inquire (unit=this%inlist, name=fname)
414 write (errmsg, fmtmxlsterronly) &
415 ii, mxlist, new_line(
"A"), trim(this%line)
416 call store_error(errmsg)
417 call store_error_unit(this%inlist)
424 call urword(this%line, this%lloc, this%istart, this%istop, 2, &
425 cellid(1), r, this%iout, this%inlist)
426 if (this%ndim > 1)
then
427 call urword(this%line, this%lloc, this%istart, this%istop, 2, &
428 cellid(2), r, this%iout, this%inlist)
430 if (this%ndim > 2)
then
431 call urword(this%line, this%lloc, this%istart, this%istop, 2, &
432 cellid(3), r, this%iout, this%inlist)
436 call check_cellid(ii, cellid, this%mshape, this%ndim)
439 if (this%ndim == 3)
then
440 nod = get_node(cellid(1), cellid(2), cellid(3), &
441 this%mshape(1), this%mshape(2), this%mshape(3))
442 elseif (this%ndim == 2)
then
443 nod = get_node(cellid(1), 1, cellid(2), &
444 this%mshape(1), 1, this%mshape(2))
450 this%nodelist(ii) = nod
454 call urword(this%line, this%lloc, this%istart, this%istop, 0, idum, &
455 r, this%iout, this%inlist)
456 read (this%line(this%istart:this%istop), *, iostat=istat) r
461 this%rlist(jj, ii) = r
463 this%rlist(jj, ii) =
dzero
464 this%ntxtrlist = this%ntxtrlist + 1
465 if (this%ntxtrlist >
size(this%txtrlist))
then
466 increment = int(
size(this%txtrlist) * 0.2)
467 increment = max(100, increment)
472 this%txtrlist(this%ntxtrlist) = this%line(this%istart:this%istop)
473 this%idxtxtrow(this%ntxtrlist) = ii
474 this%idxtxtcol(this%ntxtrlist) = jj
481 call urword(this%line, this%lloc, this%istart, this%istop, 0, idum, &
482 r, this%iout, this%inlist)
483 read (this%line(this%istart:this%istop), *, iostat=istat) r
488 this%auxvar(jj, ii) = r
490 this%auxvar(jj, ii) =
dzero
491 this%ntxtauxvar = this%ntxtauxvar + 1
492 if (this%ntxtauxvar >
size(this%txtauxvar))
then
493 increment = int(
size(this%txtauxvar) * 0.2)
494 increment = max(100, increment)
499 this%txtauxvar(this%ntxtauxvar) = this%line(this%istart:this%istop)
500 this%idxtxtauxrow(this%ntxtauxvar) = ii
501 this%idxtxtauxcol(this%ntxtauxvar) = jj
502 if (len_trim(this%txtauxvar(this%ntxtauxvar)) == 0)
then
503 write (errmsg,
'(a,i0,a)')
'Auxiliary data or time series name &
504 &expected but not found in period &
505 &block "',
kper,
'".'
506 call store_error(errmsg)
507 call store_error_unit(this%inlist)
514 if (this%inamedbound > 0)
then
515 call urword(this%line, this%lloc, this%istart, this%istop, 1, idum, r, &
516 this%iout, this%inlist)
517 this%boundname(ii) = this%line(this%istart:this%istop)
521 if (this%nlist > 0)
then
522 if (ii == this%nlist)
exit readloop
531 if (count_errors() > 0)
then
532 call store_error_unit(this%inlist)
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
integer(i4b), parameter lenboundname
maximum length of a bound name
real(dp), parameter dzero
real constant zero
integer(i4b), pointer, public kper
current stress period number