23 integer(I4B),
pointer :: nvert => null()
24 real(dp),
dimension(:),
pointer,
contiguous :: length => null()
25 real(dp),
dimension(:),
pointer,
contiguous :: width => null()
26 real(dp),
dimension(:),
pointer,
contiguous :: bottom => null()
27 integer(I4B),
dimension(:),
pointer,
contiguous :: idomain => null()
28 real(dp),
dimension(:, :),
pointer,
contiguous :: vertices => null()
29 real(dp),
dimension(:, :),
pointer,
contiguous :: cellxy => null()
30 real(dp),
dimension(:),
pointer,
contiguous :: fdc => null()
31 integer(I4B),
dimension(:),
pointer,
contiguous :: iavert => null()
32 integer(I4B),
dimension(:),
pointer,
contiguous :: javert => null()
68 logical :: length_units = .false.
69 logical :: nogrb = .false.
70 logical :: xorigin = .false.
71 logical :: yorigin = .false.
72 logical :: angrot = .false.
73 logical :: nodes = .false.
74 logical :: nvert = .false.
75 logical :: width = .false.
76 logical :: bottom = .false.
77 logical :: idomain = .false.
78 logical :: iv = .false.
79 logical :: xv = .false.
80 logical :: yv = .false.
81 logical :: icell1d = .false.
82 logical :: fdc = .false.
83 logical :: ncvert = .false.
84 logical :: icvert = .false.
89 subroutine disv1d_cr(dis, name_model, input_mempath, inunit, iout)
94 character(len=*),
intent(in) :: name_model
95 character(len=*),
intent(in) :: input_mempath
96 integer(I4B),
intent(in) :: inunit
97 integer(I4B),
intent(in) :: iout
100 logical(LGP) :: found_fname
101 character(len=*),
parameter :: fmtheader = &
102 "(1X, /1X, 'DISV1D -- DISCRETIZATION BY VERTICES IN 1D PACKAGE,', &
103 &' VERSION 1 : 4/2/2024 - INPUT READ FROM MEMPATH: ', A, /)"
106 call disnew%allocate_scalars(name_model, input_mempath)
107 dis%input_mempath = input_mempath
112 call mem_set_value(dis%input_fname,
'INPUT_FNAME', dis%input_mempath, &
120 write (iout, fmtheader) dis%input_mempath
133 if (this%inunit /= 0)
then
134 call this%disv1d_load()
138 call this%grid_finalize()
150 integer(I4B),
intent(in) :: noden
151 integer(I4B),
intent(in) :: nodem
152 integer(I4B),
intent(in) :: ihc
153 real(DP),
intent(inout) :: xcomp
154 real(DP),
intent(inout) :: ycomp
155 real(DP),
intent(inout) :: zcomp
156 integer(I4B),
intent(in) :: ipos
158 real(DP) :: angle, dmult
162 angle = this%con%anglex(this%con%jas(ipos))
164 if (nodem < noden) dmult = -
done
165 xcomp = cos(angle) * dmult
166 ycomp = sin(angle) * dmult
177 xcomp, ycomp, zcomp, conlen)
180 integer(I4B),
intent(in) :: noden
181 integer(I4B),
intent(in) :: nodem
182 logical,
intent(in) :: nozee
183 real(DP),
intent(in) :: satn
184 real(DP),
intent(in) :: satm
185 integer(I4B),
intent(in) :: ihc
186 real(DP),
intent(inout) :: xcomp
187 real(DP),
intent(inout) :: ycomp
188 real(DP),
intent(inout) :: zcomp
189 real(DP),
intent(inout) :: conlen
191 integer(I4B) :: nodeun, nodeum
192 real(DP) :: xn, xm, yn, ym, zn, zm
203 nodeun = this%get_nodeuser(noden)
204 nodeum = this%get_nodeuser(nodem)
205 xn = this%cellxy(1, nodeun)
206 yn = this%cellxy(2, nodeun)
207 xm = this%cellxy(1, nodeum)
208 ym = this%cellxy(2, nodeum)
217 character(len=*),
intent(out) :: dis_type
225 integer(I4B) :: dis_enum
237 character(len=*),
intent(in) :: name_model
238 character(len=*),
intent(in) :: input_mempath
241 call this%DisBaseType%allocate_scalars(name_model, input_mempath)
257 call this%source_options()
258 call this%source_dimensions()
259 call this%source_griddata()
262 if (this%nvert > 0)
then
263 call this%source_vertices()
264 call this%source_cell1d()
278 character(len=LENVARNAME),
dimension(3) :: lenunits = &
279 &[character(len=LENVARNAME) ::
'FEET',
'METERS',
'CENTIMETERS']
288 idmmemorypath, lenunits, found%length_units)
290 idmmemorypath, found%nogrb)
292 idmmemorypath, found%xorigin)
294 idmmemorypath, found%yorigin)
296 idmmemorypath, found%angrot)
299 if (this%iout > 0)
then
300 call this%log_options(found)
310 write (this%iout,
'(1x,a)')
'Setting Discretization Options'
312 if (found%length_units)
then
313 write (this%iout,
'(4x,a,i0)')
'Model length unit [0=UND, 1=FEET, &
314 &2=METERS, 3=CENTIMETERS] set as ', this%lenuni
317 if (found%nogrb)
then
318 write (this%iout,
'(4x,a,i0)')
'Binary grid file [0=GRB, 1=NOGRB] &
319 &set as ', this%nogrb
322 if (found%xorigin)
then
323 write (this%iout,
'(4x,a,G0)')
'XORIGIN = ', this%xorigin
326 if (found%yorigin)
then
327 write (this%iout,
'(4x,a,G0)')
'YORIGIN = ', this%yorigin
330 if (found%angrot)
then
331 write (this%iout,
'(4x,a,G0)')
'ANGROT = ', this%angrot
334 write (this%iout,
'(1x,a,/)')
'End Setting Discretization Options'
346 character(len=LENMEMPATH) :: idmMemoryPath
354 call mem_set_value(this%nodes,
'NODES', idmmemorypath, found%nodes)
355 call mem_set_value(this%nvert,
'NVERT', idmmemorypath, found%nvert)
358 this%nodesuser = this%nodes
361 if (this%iout > 0)
then
362 call this%log_dimensions(found)
366 if (this%nodesuser < 1)
then
368 'NODES was not specified or was specified incorrectly.')
371 if (this%nvert < 1)
then
373 'NVERT was not specified or was specified as zero. The &
374 &VERTICES and CELL1D blocks will not be read for the DISV1D6 &
375 &Package in model '//trim(this%memoryPath)//
'.')
380 'LENGTH', this%memoryPath)
382 'WIDTH', this%memoryPath)
384 'BOTTOM', this%memoryPath)
386 'IDOMAIN', this%memoryPath)
389 if (this%nvert > 0)
then
391 'VERTICES', this%memoryPath)
393 'FDC', this%memoryPath)
395 'CELLXY', this%memoryPath)
399 do n = 1, this%nodesuser
400 this%length(n) =
dzero
401 this%width(n) =
dzero
402 this%bottom(n) =
dzero
413 write (this%iout,
'(1x,a)')
'Setting Discretization Dimensions'
415 if (found%nodes)
then
416 write (this%iout,
'(4x,a,i0)')
'NODES = ', this%nodesuser
419 if (found%nvert)
then
420 write (this%iout,
'(4x,a,i0)')
'NVERT = ', this%nvert
423 write (this%iout,
'(1x,a,/)')
'End Setting Discretization Dimensions'
433 character(len=LENMEMPATH) :: idmMemoryPath
444 call mem_set_value(this%idomain,
'IDOMAIN', idmmemorypath, found%idomain)
446 if (.not. found%width)
then
447 write (errmsg,
'(a)')
'Error in GRIDDATA block: WIDTH not found.'
451 if (.not. found%bottom)
then
452 write (errmsg,
'(a)')
'Error in GRIDDATA block: BOTTOM not found.'
461 if (this%iout > 0)
then
462 call this%log_griddata(found)
473 write (this%iout,
'(1x,a)')
'Setting Discretization Griddata'
475 if (found%width)
then
476 write (this%iout,
'(4x,a)')
'WIDTH set from input file'
479 if (found%bottom)
then
480 write (this%iout,
'(4x,a)')
'BOTTOM set from input file'
483 if (found%idomain)
then
484 write (this%iout,
'(4x,a)')
'IDOMAIN set from input file'
487 write (this%iout,
'(1x,a,/)')
'End Setting Discretization Griddata'
501 character(len=LENMEMPATH) :: idmMemoryPath
502 real(DP),
dimension(:),
contiguous,
pointer :: vert_x => null()
503 real(DP),
dimension(:),
contiguous,
pointer :: vert_y => null()
514 if (
associated(vert_x) .and.
associated(vert_y))
then
516 this%vertices(1, i) = vert_x(i)
517 this%vertices(2, i) = vert_y(i)
520 call store_error(
'Required Vertex arrays not found.')
524 if (this%iout > 0)
then
525 write (this%iout,
'(1x,a)')
'Setting Discretization Vertices'
526 write (this%iout,
'(1x,a,/)')
'End setting discretization vertices'
542 character(len=LENMEMPATH) :: idmMemoryPath
543 integer(I4B),
dimension(:),
contiguous,
pointer :: icell1d => null()
544 integer(I4B),
dimension(:),
contiguous,
pointer :: ncvert => null()
545 integer(I4B),
dimension(:),
contiguous,
pointer :: icvert => null()
546 real(DP),
dimension(:),
contiguous,
pointer :: fdc => null()
554 call mem_setptr(icell1d,
'ICELL1D', idmmemorypath)
555 call mem_setptr(ncvert,
'NCVERT', idmmemorypath)
556 call mem_setptr(icvert,
'ICVERT', idmmemorypath)
559 if (
associated(icell1d) .and.
associated(ncvert) &
560 .and.
associated(icvert))
then
561 call this%define_cellverts(icell1d, ncvert, icvert)
563 call store_error(
'Required cell vertex arrays not found.')
570 if (
associated(fdc))
then
571 do i = 1, this%nodesuser
584 this%javert, this%length, this%cellxy)
587 if (this%iout > 0)
then
588 write (this%iout,
'(1x,a)')
'Setting Discretization CELL1D'
589 write (this%iout,
'(1x,a,/)')
'End Setting Discretization CELL1D'
602 integer(I4B),
dimension(:),
contiguous,
pointer,
intent(in) :: icell1d
603 integer(I4B),
dimension(:),
contiguous,
pointer,
intent(in) :: ncvert
604 integer(I4B),
dimension(:),
contiguous,
pointer,
intent(in) :: icvert
607 integer(I4B) :: i, j, ierr
608 integer(I4B) :: icv_idx, startvert, maxnnz = 2
611 call vert_spm%init(this%nodesuser, this%nvert, maxnnz)
615 do i = 1, this%nodesuser
616 if (icell1d(i) /= i)
call store_error(
'ICELL1D input sequence violation.')
618 call vert_spm%addconnection(i, icvert(icv_idx), 0)
620 startvert = icvert(icv_idx)
622 icv_idx = icv_idx + 1
627 call mem_allocate(this%iavert, this%nodesuser + 1,
'IAVERT', this%memoryPath)
628 call mem_allocate(this%javert, vert_spm%nnz,
'JAVERT', this%memoryPath)
629 call vert_spm%filliaja(this%iavert, this%javert, ierr)
630 call vert_spm%destroy()
637 real(DP),
dimension(:, :),
intent(in) :: vertices
638 real(DP),
dimension(:),
intent(in) :: fdc
639 integer(I4B),
dimension(:),
intent(in) :: iavert
640 integer(I4B),
dimension(:),
intent(in) :: javert
641 real(DP),
dimension(:),
intent(in) :: length
642 real(DP),
dimension(:, :),
intent(inout) :: cellxy
644 integer(I4B) :: nodes
655 nodes =
size(iavert) - 1
662 do j = iavert(n), iavert(n + 1) - 2
663 d =
calcdist(vertices, javert(j), javert(j + 1))
664 fd1 = fd0 + d / length(n)
668 if (fd1 >= fdc(n))
then
671 fd = (fdc(n) - fd0) / (fd1 - fd0)
679 cellxy(ixy, n) = (
done - fd) * vertices(ixy, iv0) + &
680 fd * vertices(ixy, iv1)
690 real(DP),
dimension(:, :),
intent(in) :: vertices
691 integer(I4B),
dimension(:),
intent(in) :: iavert
692 integer(I4B),
dimension(:),
intent(in) :: javert
693 real(DP),
dimension(:),
intent(inout) :: length
695 integer(I4B) :: nodes
700 nodes =
size(iavert) - 1
705 do j = iavert(n), iavert(n + 1) - 2
706 dlen = dlen +
calcdist(vertices, javert(j), javert(j + 1))
722 integer(I4B) :: node, noder, k
724 character(len=*),
parameter :: fmtnr = &
725 "(/1x, 'The specified IDOMAIN results in a reduced number of cells.',&
726 &/1x, 'Number of user nodes: ',I0,&
727 &/1X, 'Number of nodes in solution: ', I0, //)"
731 do k = 1, this%nodesuser
732 if (this%idomain(k) > 0) this%nodes = this%nodes + 1
736 if (this%nodes == 0)
then
737 call store_error(
'Model does not have any active nodes. Make sure &
738 &IDOMAIN has some values greater than zero.')
739 call store_error_filename(this%input_fname)
743 if (this%nodes < this%nodesuser)
then
744 write (this%iout, fmtnr) this%nodesuser, this%nodes
748 call this%allocate_arrays()
754 if (this%nodes < this%nodesuser)
then
757 do k = 1, this%nodesuser
758 if (this%idomain(k) > 0)
then
759 this%nodereduced(node) = noder
762 this%nodereduced(node) = 0
769 if (this%nodes < this%nodesuser)
then
772 do k = 1, this%nodesuser
773 if (this%idomain(k) > 0)
then
774 this%nodeuser(noder) = node
783 do node = 1, this%nodesuser
785 if (this%nodes < this%nodesuser) noder = this%nodereduced(node)
786 if (noder <= 0) cycle
787 this%bot(noder) = this%bottom(node)
788 this%area(noder) = this%length(node)
792 call this%create_connections()
803 call this%DisBaseType%allocate_arrays()
806 if (this%nodes < this%nodesuser)
then
807 call mem_allocate(this%nodeuser, this%nodes,
'NODEUSER', this%memoryPath)
808 call mem_allocate(this%nodereduced, this%nodesuser,
'NODEREDUCED', &
811 call mem_allocate(this%nodeuser, 1,
'NODEUSER', this%memoryPath)
812 call mem_allocate(this%nodereduced, 1,
'NODEREDUCED', this%memoryPath)
816 this%mshape(1) = this%nodesuser
824 integer(I4B) :: nrsize
828 if (this%nodes < this%nodesuser) nrsize = this%nodes
834 call this%con%disv1dconnections_verts(this%name_model, this%nodes, &
835 this%nodesuser, nrsize, this%nvert, &
836 this%vertices, this%iavert, &
837 this%javert, this%cellxy, this%fdc, &
838 this%nodereduced, this%nodeuser, &
841 this%nja = this%con%nja
842 this%njas = this%con%njas
855 integer(I4B),
dimension(:),
intent(in) :: icelltype
857 integer(I4B) :: i, iunit, ntxt, version
858 integer(I4B),
parameter :: lentxt = 100
859 character(len=50) :: txthdr
860 character(len=lentxt) :: txt
861 character(len=LINELENGTH) :: fname
862 character(len=LENBIGLINE) :: crs
863 logical(LGP) :: found_crs
864 character(len=*),
parameter :: fmtgrdsave = &
865 "(4X,'BINARY GRID INFORMATION WILL BE WRITTEN TO:', &
866 &/,6X,'UNIT NUMBER: ', I0,/,6X, 'FILE NAME: ', A)"
871 if (this%nvert > 0) ntxt = ntxt + 5
873 call mem_set_value(crs,
'CRS', this%input_mempath, found_crs)
882 fname = trim(this%output_fname)
884 write (this%iout, fmtgrdsave) iunit, trim(adjustl(fname))
885 call openfile(iunit, this%iout, trim(adjustl(fname)),
'DATA(BINARY)', &
889 write (txthdr,
'(a)')
'GRID DISV1D'
890 txthdr(50:50) = new_line(
'a')
892 write (txthdr,
'(a)')
'VERSION 1'
893 txthdr(50:50) = new_line(
'a')
895 write (txthdr,
'(a, i0)')
'NTXT ', ntxt
896 txthdr(50:50) = new_line(
'a')
898 write (txthdr,
'(a, i0)')
'LENTXT ', lentxt
899 txthdr(50:50) = new_line(
'a')
903 write (txt,
'(3a, i0)')
'NCELLS ',
'INTEGER ',
'NDIM 0 # ', this%nodesuser
904 txt(lentxt:lentxt) = new_line(
'a')
906 write (txt,
'(3a, i0)')
'NJA ',
'INTEGER ',
'NDIM 0 # ', this%con%nja
907 txt(lentxt:lentxt) = new_line(
'a')
909 write (txt,
'(3a, 1pg24.15)')
'XORIGIN ',
'DOUBLE ',
'NDIM 0 # ', this%xorigin
910 txt(lentxt:lentxt) = new_line(
'a')
912 write (txt,
'(3a, 1pg24.15)')
'YORIGIN ',
'DOUBLE ',
'NDIM 0 # ', this%yorigin
913 txt(lentxt:lentxt) = new_line(
'a')
915 write (txt,
'(3a, 1pg24.15)')
'ANGROT ',
'DOUBLE ',
'NDIM 0 # ', this%angrot
916 txt(lentxt:lentxt) = new_line(
'a')
918 write (txt,
'(3a, i0)')
'BOTM ',
'DOUBLE ',
'NDIM 1 ', this%nodesuser
919 txt(lentxt:lentxt) = new_line(
'a')
921 write (txt,
'(3a, i0)')
'IA ',
'INTEGER ',
'NDIM 1 ', this%nodesuser + 1
922 txt(lentxt:lentxt) = new_line(
'a')
924 write (txt,
'(3a, i0)')
'JA ',
'INTEGER ',
'NDIM 1 ', this%con%nja
925 txt(lentxt:lentxt) = new_line(
'a')
927 write (txt,
'(3a, i0)')
'ICELLTYPE ',
'INTEGER ',
'NDIM 1 ', this%nodesuser
928 txt(lentxt:lentxt) = new_line(
'a')
930 write (txt,
'(3a, i0)')
'IDOMAIN ',
'INTEGER ',
'NDIM 1 ', this%nodesuser
931 txt(lentxt:lentxt) = new_line(
'a')
935 if (this%nvert > 0)
then
936 write (txt,
'(3a, i0)')
'VERTICES ',
'DOUBLE ',
'NDIM 2 2 ', this%nvert
937 txt(lentxt:lentxt) = new_line(
'a')
939 write (txt,
'(3a, i0)')
'CELLX ',
'DOUBLE ',
'NDIM 1 ', this%nodesuser
940 txt(lentxt:lentxt) = new_line(
'a')
942 write (txt,
'(3a, i0)')
'CELLY ',
'DOUBLE ',
'NDIM 1 ', this%nodesuser
943 txt(lentxt:lentxt) = new_line(
'a')
945 write (txt,
'(3a, i0)')
'IAVERT ',
'INTEGER ',
'NDIM 1 ', this%nodesuser + 1
946 txt(lentxt:lentxt) = new_line(
'a')
948 write (txt,
'(3a, i0)')
'JAVERT ',
'INTEGER ',
'NDIM 1 ',
size(this%javert)
949 txt(lentxt:lentxt) = new_line(
'a')
954 if (version == 2)
then
956 write (txt,
'(3a, i0)')
'CRS ',
'CHARACTER ',
'NDIM 1 ', &
958 txt(lentxt:lentxt) = new_line(
'a')
964 write (iunit) this%nodesuser
965 write (iunit) this%nja
966 write (iunit) this%xorigin
967 write (iunit) this%yorigin
968 write (iunit) this%angrot
969 write (iunit) this%bottom
970 write (iunit) this%con%iausr
971 write (iunit) this%con%jausr
972 write (iunit) icelltype
973 write (iunit) this%idomain
976 if (this%nvert > 0)
then
977 write (iunit) this%vertices
978 write (iunit) (this%cellxy(1, i), i=1, this%nodesuser)
979 write (iunit) (this%cellxy(2, i), i=1, this%nodesuser)
980 write (iunit) this%iavert
981 write (iunit) this%javert
985 if (version == 2)
then
986 if (found_crs)
write (iunit) trim(crs)
1000 integer(I4B),
intent(in) :: nodeu
1001 integer(I4B),
intent(in) :: icheck
1002 integer(I4B) :: nodenumber
1004 if (icheck /= 0)
then
1005 if (nodeu < 1 .or. nodeu > this%nodes)
then
1006 write (
errmsg,
'(a,i10)') &
1007 'Nodenumber less than 1 or greater than nodes:', nodeu
1013 if (this%nodes == this%nodesuser)
then
1016 nodenumber = this%nodereduced(nodeu)
1023 integer(I4B),
intent(in) :: nodeu
1024 character(len=*),
intent(inout) :: str
1026 character(len=10) :: nstr
1028 write (nstr,
'(i0)') nodeu
1029 str =
'('//trim(adjustl(nstr))//
')'
1040 flag_string, allow_zero)
result(nodeu)
1043 integer(I4B),
intent(inout) :: lloc
1044 integer(I4B),
intent(inout) :: istart
1045 integer(I4B),
intent(inout) :: istop
1046 integer(I4B),
intent(in) :: in
1047 integer(I4B),
intent(in) :: iout
1048 character(len=*),
intent(inout) :: line
1049 logical,
optional,
intent(in) :: flag_string
1050 logical,
optional,
intent(in) :: allow_zero
1051 integer(I4B) :: nodeu
1053 integer(I4B) :: lloclocal, ndum, istat, n
1056 if (
present(flag_string))
then
1057 if (flag_string)
then
1060 call urword(line, lloclocal, istart, istop, 1, ndum, r, iout, in)
1061 read (line(istart:istop), *, iostat=istat) n
1062 if (istat /= 0)
then
1070 call urword(line, lloc, istart, istop, 2, nodeu, r, iout, in)
1072 if (nodeu == 0)
then
1073 if (
present(allow_zero))
then
1074 if (allow_zero)
then
1080 if (nodeu < 1 .or. nodeu > this%nodesuser)
then
1081 write (
errmsg,
'(a,i0,a)') &
1082 "Node number in list (", nodeu,
") is outside of the grid. "// &
1083 "Cell number cannot be determined in line '"// &
1084 trim(adjustl(line))//
"'."
1098 logical(LGP) :: deallocate_vertices
1104 deallocate_vertices = (this%nvert > 0)
1116 if (deallocate_vertices)
then
1125 call this%DisBaseType%dis_da()
1135 cdatafmp, nvaluesp, nwidthp, editdesc, dinact)
1141 real(DP),
dimension(:),
pointer,
contiguous,
intent(inout) :: darray
1142 integer(I4B),
intent(in) :: iout
1143 integer(I4B),
intent(in) :: iprint
1144 integer(I4B),
intent(in) :: idataun
1145 character(len=*),
intent(in) :: aname
1146 character(len=*),
intent(in) :: cdatafmp
1147 integer(I4B),
intent(in) :: nvaluesp
1148 integer(I4B),
intent(in) :: nwidthp
1149 character(len=*),
intent(in) :: editdesc
1150 real(DP),
intent(in) :: dinact
1152 integer(I4B) :: k, ifirst
1153 integer(I4B) :: nlay
1154 integer(I4B) :: nrow
1155 integer(I4B) :: ncol
1156 integer(I4B) :: nval
1157 integer(I4B) :: nodeu, noder
1158 integer(I4B) :: istart, istop
1159 real(DP),
dimension(:),
pointer,
contiguous :: dtemp
1161 character(len=*),
parameter :: fmthsv = &
1162 "(1X,/1X,a,' WILL BE SAVED ON UNIT ',I4, &
1163 &' AT END OF TIME STEP',I5,', STRESS PERIOD ',I4)"
1168 ncol = this%mshape(1)
1172 if (this%nodes < this%nodesuser)
then
1175 do nodeu = 1, this%nodesuser
1176 noder = this%get_nodenumber(nodeu, 0)
1177 if (noder <= 0)
then
1178 dtemp(nodeu) = dinact
1181 dtemp(nodeu) = darray(noder)
1189 if (iprint /= 0)
then
1192 istop = istart + nrow * ncol - 1
1194 aname, cdatafmp, nvaluesp, nwidthp, editdesc)
1200 if (idataun > 0)
then
1205 istop = istart + nrow * ncol - 1
1206 if (ifirst == 1)
write (iout, fmthsv) &
1207 trim(adjustl(aname)), idataun, &
1214 elseif (idataun < 0)
then
1217 call ubdsv1(
kstp,
kper, aname, -idataun, dtemp, ncol, nrow, nlay, &
1225 dstmodel, dstpackage, naux, auxtxt, &
1226 ibdchn, nlist, iout)
1232 character(len=16),
intent(in) :: text
1233 character(len=16),
intent(in) :: textmodel
1234 character(len=16),
intent(in) :: textpackage
1235 character(len=16),
intent(in) :: dstmodel
1236 character(len=16),
intent(in) :: dstpackage
1237 integer(I4B),
intent(in) :: naux
1238 character(len=16),
dimension(:),
intent(in) :: auxtxt
1239 integer(I4B),
intent(in) :: ibdchn
1240 integer(I4B),
intent(in) :: nlist
1241 integer(I4B),
intent(in) :: iout
1243 integer(I4B) :: nlay, nrow, ncol
1247 ncol = this%mshape(1)
1250 call ubdsv06(
kstp,
kper, text, textmodel, textpackage, dstmodel, dstpackage, &
1251 ibdchn, naux, auxtxt, ncol, nrow, nlay, &
1264 integer(I4B),
intent(in) :: n
1265 integer(I4B),
intent(in) :: m
1266 integer(I4B),
intent(in) :: idx_conn
1267 real(DP),
intent(out) :: width_n
1268 real(DP),
intent(out) :: width_m
1271 width_n = this%width(n)
1272 width_m = this%width(m)
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
integer(i4b), parameter lenbigline
maximum length of a big line
@ disv1d
DISV1D6 discretization.
integer(i4b), parameter lenvarname
maximum length of a variable name
real(dp), parameter dzero
real constant zero
integer(i4b), parameter lenmempath
maximum length of the memory path
real(dp), parameter done
real constant 1
real(dp) function, public calcdist(vertices, ivert1, ivert2)
Calculate distance between two vertices.
subroutine, public disv1d_cr(dis, name_model, input_mempath, inunit, iout)
subroutine log_options(this, found)
Write user options to list file.
subroutine nodeu_to_string(this, nodeu, str)
subroutine connection_normal(this, noden, nodem, ihc, xcomp, ycomp, zcomp, ipos)
Get normal vector components between the cell and a given neighbor.
subroutine record_srcdst_list_header(this, text, textmodel, textpackage, dstmodel, dstpackage, naux, auxtxt, ibdchn, nlist, iout)
Record list header using ubdsv06.
subroutine define_cellverts(this, icell1d, ncvert, icvert)
Construct the iavert and javert integer vectors which are compressed sparse row index arrays that rel...
subroutine calculate_cellxy(vertices, fdc, iavert, javert, length, cellxy)
Calculate x, y, coordinates of reach midpoint.
subroutine get_dis_type(this, dis_type)
Get the discretization type (DIS, DIS2D, DISV, DISV1D, DISU)
subroutine source_cell1d(this)
Copy cell1d information from input data context to model context.
integer(i4b) function get_nodenumber_idx1(this, nodeu, icheck)
Return a nodenumber from the user specified node number with an option to perform a check....
subroutine grid_finalize(this)
Finalize grid construction.
subroutine get_flow_width(this, n, m, idx_conn, width_n, width_m)
@ brief Calculate the flow width between two cells
subroutine record_array(this, darray, iout, iprint, idataun, aname, cdatafmp, nvaluesp, nwidthp, editdesc, dinact)
Record a double precision array.
subroutine source_griddata(this)
subroutine allocate_scalars(this, name_model, input_mempath)
Allocate scalar variables.
subroutine disv1d_df(this)
Define the discretization.
subroutine connection_vector(this, noden, nodem, nozee, satn, satm, ihc, xcomp, ycomp, zcomp, conlen)
Get unit vector components between the cell and a given neighbor.
subroutine source_vertices(this)
Copy vertex information from input data context to model context.
subroutine calculate_cell_length(vertices, iavert, javert, length)
Calculate x, y, coordinates of reach midpoint.
subroutine disv1d_da(this)
integer(i4b) function get_dis_enum(this)
Get the discretization type enumeration.
subroutine source_dimensions(this)
Copy dimensions from IDM into package.
subroutine create_connections(this)
subroutine allocate_arrays(this)
subroutine write_grb(this, icelltype)
Write binary grid file.
subroutine disv1d_load(this)
integer(i4b) function nodeu_from_string(this, lloc, istart, istop, in, iout, line, flag_string, allow_zero)
nodeu_from_string – Receive a string and convert the string to a user nodenumber. The model is unstru...
subroutine log_dimensions(this, found)
Write dimensions to list file.
subroutine source_options(this)
Copy options from IDM into package.
subroutine log_griddata(this, found)
Write griddata found to list file.
subroutine, public line_unit_vector(x0, y0, z0, x1, y1, z1, xcomp, ycomp, zcomp, vmag)
Calculate the vector components (xcomp, ycomp, and zcomp) for a line defined by two points,...
This module defines variable data types.
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
subroutine, public memorystore_remove(component, subcomponent, context)
subroutine, public memorystore_release(varname, memory_path)
Release a single variable from the memory store.
This module contains simulation methods.
subroutine, public ustop(stopmess, ioutlocal)
Stop the simulation.
subroutine, public store_warning(msg, substring)
Store warning message.
subroutine, public store_error(msg, terminate)
Store an error message.
integer(i4b) function, public count_errors()
Return number of errors.
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string
character(len=linelength) idm_context
character(len=maxcharlen) warnmsg
warning message string
real(dp), pointer, public pertim
time relative to start of stress period
real(dp), pointer, public totim
time relative to start of simulation
integer(i4b), pointer, public kstp
current time step number
integer(i4b), pointer, public kper
current stress period number
real(dp), pointer, public delt
length of the current time step
Simplifies tracking parameters sourced from the input context.