44 character(len=*),
intent(in) :: component
45 character(len=*),
intent(in) :: subcomponent
46 integer(I4B),
intent(in) :: iout
49 write (iout,
'(1x,a)')
'Loading input for '//trim(component)//&
50 &
'/'//trim(subcomponent)
57 character(len=*),
intent(in) :: component
58 character(len=*),
intent(in) :: subcomponent
59 integer(I4B),
intent(in) :: iout
62 write (iout,
'(1x,a)')
'Loading input complete...'
70 character(len=*),
intent(in) :: component
71 integer(I4B),
intent(in) :: iout
74 write (iout,
'(/1x,a,i0,a)')
'IDP PERIOD ',
kper, &
75 ' load for component: '//trim(component)
83 integer(I4B),
intent(in) :: iout
87 write (iout,
'(1x,a,/)')
'IDP component dynamic load complete...'
94 character(len=*),
intent(in) :: varname
95 character(len=*),
intent(in) :: mempath
96 integer(I4B),
intent(in) :: iout
97 logical(LGP),
intent(in) :: is_tas
101 write (iout,
'(3x, a, ": ", a)') &
102 'Time-array-series controlled dynamic variable detected', trim(varname)
104 write (iout,
'(3x, a, ": ", a)') &
105 'Time-series controlled dynamic variable detected', trim(varname)
113 logical(LGP),
intent(in) :: p_mem
114 character(len=*),
intent(in) :: varname
115 character(len=*),
intent(in) :: mempath
116 integer(I4B),
intent(in) :: iout
117 character(len=LINELENGTH) :: description
120 description =
'Logical detected'
121 write (iout,
'(3x, a, ": ", a, " = ", l1)') &
122 trim(description), trim(varname), p_mem
129 integer(I4B),
intent(in) :: p_mem
130 character(len=*),
intent(in) :: varname
131 character(len=*),
intent(in) :: mempath
132 character(len=*),
intent(in) :: datatype
133 integer(I4B),
intent(in) :: iout
134 character(len=LINELENGTH) :: description
137 if (datatype ==
'KEYWORD')
then
138 description =
'Keyword detected'
139 write (iout,
'(3x, a, ": ", a)') trim(description), trim(varname)
141 description =
'Integer detected'
142 write (iout,
'(3x, a, ": ", a, " = ", i0)') &
143 trim(description), trim(varname), p_mem
151 integer(I4B),
dimension(:),
contiguous,
intent(in) :: p_mem
152 character(len=*),
intent(in) :: varname
153 character(len=*),
intent(in) :: mempath
154 integer(I4B),
intent(in) :: iout
155 integer(I4B) :: min_val, max_val
156 character(len=LINELENGTH) :: description
159 min_val = minval(p_mem)
160 max_val = maxval(p_mem)
161 if (min_val == max_val)
then
162 description =
'Integer 1D constant array detected'
163 write (iout,
'(3x, a, ": ", a, " = ", i0)') &
164 trim(description), trim(varname), min_val
166 description =
'Integer 1D array detected'
167 write (iout,
'(3x, a, ": ", a, a, i0, a, i0)') &
168 trim(description), trim(varname), &
169 ' ranges from ', min_val,
' to ', max_val
177 integer(I4B),
dimension(:, :),
contiguous,
intent(in) :: p_mem
178 character(len=*),
intent(in) :: varname
179 character(len=*),
intent(in) :: mempath
180 integer(I4B),
intent(in) :: iout
181 integer(I4B) :: min_val, max_val
182 character(len=LINELENGTH) :: description
185 min_val = minval(p_mem)
186 max_val = maxval(p_mem)
187 if (min_val == max_val)
then
188 description =
'Integer 2D constant array detected'
189 write (iout,
'(3x, a, ": ", a, " = ", i0)') &
190 trim(description), trim(varname), min_val
192 description =
'Integer 2D array detected'
193 write (iout,
'(3x, a, ": ", a, a, i0, a, i0)') &
194 trim(description), trim(varname), &
195 ' ranges from ', min_val,
' to ', max_val
203 integer(I4B),
dimension(:, :, :),
contiguous,
intent(in) :: p_mem
204 character(len=*),
intent(in) :: varname
205 character(len=*),
intent(in) :: mempath
206 integer(I4B),
intent(in) :: iout
207 integer(I4B) :: min_val, max_val
208 character(len=LINELENGTH) :: description
211 min_val = minval(p_mem)
212 max_val = maxval(p_mem)
213 if (min_val == max_val)
then
214 description =
'Integer 3D constant array detected'
215 write (iout,
'(3x, a, ": ", a, " = ", i0)') &
216 trim(description), trim(varname), min_val
218 description =
'Integer 3D array detected'
219 write (iout,
'(3x, a, ": ", a, a, i0, a, i0)') &
220 trim(description), trim(varname), &
221 ' ranges from ', min_val,
' to ', max_val
229 real(DP),
intent(in) :: p_mem
230 character(len=*),
intent(in) :: varname
231 character(len=*),
intent(in) :: mempath
232 integer(I4B),
intent(in) :: iout
233 character(len=LINELENGTH) :: description
236 description =
'Double detected'
237 write (iout,
'(3x, a, ": ", a, " = ", G0)') &
238 trim(description), trim(varname), p_mem
245 real(DP),
dimension(:),
contiguous,
intent(in) :: p_mem
246 character(len=*),
intent(in) :: varname
247 character(len=*),
intent(in) :: mempath
248 integer(I4B),
intent(in) :: iout
249 real(DP) :: min_val, max_val
250 character(len=LINELENGTH) :: description
253 min_val = minval(p_mem)
254 max_val = maxval(p_mem)
255 if (min_val == max_val)
then
256 description =
'Double precision 1D constant array detected'
257 write (iout,
'(3x, a, ": ", a, " = ", G0)') &
258 trim(description), trim(varname), min_val
260 description =
'Double precision 1D array detected'
261 write (iout,
'(3x, a, ": ", a, a, G0, a, G0)') &
262 trim(description), trim(varname), &
263 ' ranges from ', min_val,
' to ', max_val
271 real(DP),
dimension(:, :),
contiguous,
intent(in) :: p_mem
272 character(len=*),
intent(in) :: varname
273 character(len=*),
intent(in) :: mempath
274 integer(I4B),
intent(in) :: iout
275 real(DP) :: min_val, max_val
276 character(len=LINELENGTH) :: description
279 min_val = minval(p_mem)
280 max_val = maxval(p_mem)
281 if (min_val == max_val)
then
282 description =
'Double precision 2D constant array detected'
283 write (iout,
'(3x, a, ": ", a, " = ", G0)') &
284 trim(description), trim(varname), min_val
286 description =
'Double precision 2D array detected'
287 write (iout,
'(3x, a, ": ", a, a, G0, a, G0)') &
288 trim(description), trim(varname), &
289 ' ranges from ', min_val,
' to ', max_val
297 real(DP),
dimension(:, :, :),
contiguous,
intent(in) :: p_mem
298 character(len=*),
intent(in) :: varname
299 character(len=*),
intent(in) :: mempath
300 integer(I4B),
intent(in) :: iout
301 real(DP) :: min_val, max_val
302 character(len=LINELENGTH) :: description
305 min_val = minval(p_mem)
306 max_val = maxval(p_mem)
307 if (min_val == max_val)
then
308 description =
'Double precision 3D constant array detected'
309 write (iout,
'(3x, a, ": ", a, " = ", G0)') &
310 trim(description), trim(varname), min_val
312 description =
'Double precision 3D array detected'
313 write (iout,
'(3x, a, ": ", a, a, G0, a, G0)') &
314 trim(description), trim(varname), &
315 ' ranges from ', min_val,
' to ', max_val
323 character(len=*),
intent(in) :: p_mem
324 character(len=*),
intent(in) :: varname
325 character(len=*),
intent(in) :: mempath
326 integer(I4B),
intent(in) :: iout
327 character(len=LINELENGTH) :: description
330 description =
'String detected'
331 write (iout,
'(3x, a, ": ", a, " = ", a)') &
332 trim(description), trim(varname), trim(p_mem)
344 integer(I4B),
dimension(:),
contiguous,
intent(in) :: p_mem
345 character(len=*),
intent(in) :: varname
346 character(len=*),
intent(in) :: mempath
347 character(len=*),
intent(in) :: shapestr
348 integer(I4B),
intent(in) :: iout
350 integer(I4B),
dimension(:),
pointer,
contiguous :: model_shape
351 integer(I4B),
dimension(:, :, :),
pointer,
contiguous :: int3d
352 integer(I4B),
dimension(:, :),
pointer,
contiguous :: int2d
353 integer(I4B),
dimension(3) :: dis3d_shape
354 integer(I4B),
dimension(2) :: dis2d_shape
355 integer(I4B),
pointer :: distype
356 character(LENMEMPATH) :: input_mempath
357 character(LENCOMPONENTNAME) :: comp, subcomp
358 integer(I4B) :: i, j, k, inunit, export_dim
359 logical(LGP) :: is_layered
364 call mem_setptr(distype,
'DISENUM', input_mempath)
365 call mem_setptr(model_shape,
'MODEL_SHAPE', input_mempath)
371 select case (export_dim)
374 dis3d_shape(1) = model_shape(3)
375 dis3d_shape(2) = model_shape(2)
376 dis3d_shape(3) = model_shape(1)
378 allocate (int3d(dis3d_shape(1), dis3d_shape(2), dis3d_shape(3)))
379 int3d = reshape(p_mem, dis3d_shape)
381 do k = 1, dis3d_shape(3)
383 do i = 1, model_shape(2)
384 write (inunit,
'(*(i0, " "))') (int3d(j, i, k), j=1, &
393 dis2d_shape(1) = model_shape(2)
394 dis2d_shape(2) = model_shape(1)
396 allocate (int2d(dis2d_shape(1), dis2d_shape(2)))
397 int2d = reshape(p_mem, dis2d_shape)
400 do i = 1, dis2d_shape(2)
402 write (inunit,
'(*(i0, " "))') (int2d(j, i), j=1, dis2d_shape(1))
408 do i = 1, dis2d_shape(2)
409 write (inunit,
'(*(i0, " "))') (int2d(j, i), j=1, dis2d_shape(1))
418 write (inunit,
'(*(i0, " "))') p_mem
421 write (
errmsg,
'(a,i0)')
'EXPORT unsupported int1d export_dim=', &
432 integer(I4B),
dimension(:, :),
contiguous,
intent(in) :: p_mem
433 character(len=*),
intent(in) :: varname
434 character(len=*),
intent(in) :: mempath
435 character(len=*),
intent(in) :: shapestr
436 integer(I4B),
intent(in) :: iout
438 integer(I4B),
dimension(:),
pointer,
contiguous :: model_shape
439 integer(I4B),
pointer :: distype
440 character(LENMEMPATH) :: input_mempath
441 character(LENCOMPONENTNAME) :: comp, subcomp
442 integer(I4B) :: i, j, inunit, export_dim
443 logical(LGP) :: is_layered
448 call mem_setptr(distype,
'DISENUM', input_mempath)
449 call mem_setptr(model_shape,
'MODEL_SHAPE', input_mempath)
454 select case (export_dim)
458 do i = 1,
size(p_mem, dim=2)
459 write (inunit,
'(*(i0, " "))') (p_mem(j, i), j=1,
size(p_mem, dim=1))
465 do i = 1,
size(p_mem, dim=2)
467 write (inunit,
'(*(i0, " "))') (p_mem(j, i), j=1,
size(p_mem, dim=1))
473 do i = 1,
size(p_mem, dim=2)
474 write (inunit,
'(*(i0, " "))') (p_mem(j, i), j=1,
size(p_mem, dim=1))
479 write (
errmsg,
'(a,i0)')
'EXPORT unsupported int2d export_dim=', &
490 integer(I4B),
dimension(:, :, :),
contiguous,
intent(in) :: p_mem
491 character(len=*),
intent(in) :: varname
492 character(len=*),
intent(in) :: mempath
493 character(len=*),
intent(in) :: shapestr
494 integer(I4B),
intent(in) :: iout
496 integer(I4B),
dimension(:),
pointer,
contiguous :: model_shape
497 integer(I4B),
pointer :: distype
498 character(LENMEMPATH) :: input_mempath
499 character(LENCOMPONENTNAME) :: comp, subcomp
500 integer(I4B) :: i, j, k, inunit, export_dim
501 logical(LGP) :: is_layered
506 call mem_setptr(distype,
'DISENUM', input_mempath)
507 call mem_setptr(model_shape,
'MODEL_SHAPE', input_mempath)
512 select case (export_dim)
515 do k = 1,
size(p_mem, dim=3)
517 do i = 1,
size(p_mem, dim=2)
518 write (inunit,
'(*(i0, " "))') (p_mem(j, i, k), j=1,
size(p_mem, dim=1))
523 write (
errmsg,
'(a,i0)')
'EXPORT unsupported int3d export_dim=', &
537 real(DP),
dimension(:),
contiguous,
intent(in) :: p_mem
538 character(len=*),
intent(in) :: varname
539 character(len=*),
intent(in) :: mempath
540 character(len=*),
intent(in) :: shapestr
541 integer(I4B),
intent(in) :: iout
543 integer(I4B),
dimension(:),
pointer,
contiguous :: model_shape
544 real(DP),
dimension(:, :, :),
pointer,
contiguous :: dbl3d
545 real(DP),
dimension(:, :),
pointer,
contiguous :: dbl2d
546 integer(I4B),
dimension(3) :: dis3d_shape
547 integer(I4B),
dimension(2) :: dis2d_shape
548 integer(I4B),
pointer :: distype
549 character(LENMEMPATH) :: input_mempath
550 character(LENCOMPONENTNAME) :: comp, subcomp
551 integer(I4B) :: i, j, k, inunit, export_dim
552 logical(LGP) :: is_layered
557 call mem_setptr(distype,
'DISENUM', input_mempath)
558 call mem_setptr(model_shape,
'MODEL_SHAPE', input_mempath)
564 select case (export_dim)
567 dis3d_shape(1) = model_shape(3)
568 dis3d_shape(2) = model_shape(2)
570 dis3d_shape(3) = model_shape(1)
571 allocate (dbl3d(dis3d_shape(1), dis3d_shape(2), dis3d_shape(3)))
572 dbl3d = reshape(p_mem, dis3d_shape)
573 do k = 1, dis3d_shape(3)
576 do i = 1, model_shape(2)
577 write (inunit,
'(*(G0.10, " "))') (dbl3d(j, i, k), j=1, &
586 dis2d_shape(1) = model_shape(2)
587 dis2d_shape(2) = model_shape(1)
589 allocate (dbl2d(dis2d_shape(1), dis2d_shape(2)))
590 dbl2d = reshape(p_mem, dis2d_shape)
593 do i = 1, dis2d_shape(2)
595 write (inunit,
'(*(G0.10, " "))') (dbl2d(j, i), j=1, dis2d_shape(1))
601 do i = 1, dis2d_shape(2)
602 write (inunit,
'(*(G0.10, " "))') (dbl2d(j, i), j=1, dis2d_shape(1))
611 write (inunit,
'(*(G0.10, " "))') p_mem
614 write (
errmsg,
'(a,i0)')
'EXPORT unsupported dbl1d export_dim=', &
625 real(DP),
dimension(:, :),
contiguous,
intent(in) :: p_mem
626 character(len=*),
intent(in) :: varname
627 character(len=*),
intent(in) :: mempath
628 character(len=*),
intent(in) :: shapestr
629 integer(I4B),
intent(in) :: iout
631 integer(I4B),
dimension(:),
pointer,
contiguous :: model_shape
632 integer(I4B),
pointer :: distype
633 character(LENMEMPATH) :: input_mempath
634 character(LENCOMPONENTNAME) :: comp, subcomp
635 integer(I4B) :: i, j, inunit, export_dim
636 logical(LGP) :: is_layered
641 call mem_setptr(distype,
'DISENUM', input_mempath)
642 call mem_setptr(model_shape,
'MODEL_SHAPE', input_mempath)
647 select case (export_dim)
651 do i = 1,
size(p_mem, dim=2)
652 write (inunit,
'(*(G0.10, " "))') (p_mem(j, i), j=1,
size(p_mem, dim=1))
658 do i = 1,
size(p_mem, dim=2)
660 write (inunit,
'(*(G0.10, " "))') (p_mem(j, i), j=1,
size(p_mem, dim=1))
666 do i = 1,
size(p_mem, dim=2)
667 write (inunit,
'(*(G0.10, " "))') (p_mem(j, i), j=1,
size(p_mem, dim=1))
672 write (
errmsg,
'(a,i0)')
'EXPORT unsupported dbl2d export_dim=', &
683 real(DP),
dimension(:, :, :),
contiguous,
intent(in) :: p_mem
684 character(len=*),
intent(in) :: varname
685 character(len=*),
intent(in) :: mempath
686 character(len=*),
intent(in) :: shapestr
687 integer(I4B),
intent(in) :: iout
689 integer(I4B),
dimension(:),
pointer,
contiguous :: model_shape
690 integer(I4B),
pointer :: distype
691 character(LENMEMPATH) :: input_mempath
692 character(LENCOMPONENTNAME) :: comp, subcomp
693 integer(I4B) :: i, j, k, inunit, export_dim
694 logical(LGP) :: is_layered
699 call mem_setptr(distype,
'DISENUM', input_mempath)
700 call mem_setptr(model_shape,
'MODEL_SHAPE', input_mempath)
705 select case (export_dim)
708 do k = 1,
size(p_mem, dim=3)
710 do i = 1,
size(p_mem, dim=2)
711 write (inunit,
'(*(G0.10, " "))') (p_mem(j, i, k), j=1, &
717 write (
errmsg,
'(a,i0)')
'EXPORT unsupported dbl3d export_dim=', &
729 integer(I4B),
pointer,
intent(in) :: distype
730 character(len=*),
intent(in) :: shapestr
731 logical(LGP),
intent(inout) :: is_layered
732 integer(I4B) :: export_dim
737 select case (distype)
739 if (shapestr ==
'NODES')
then
742 else if (shapestr ==
'NCOL NROW NLAY')
then
749 if (shapestr ==
'NODES')
then
752 else if (shapestr ==
'NCPL NLAY')
then
759 if (shapestr ==
'NODES')
then
761 else if (shapestr ==
'NCOL NROW')
then
787 character(len=*),
intent(in) :: varname
788 character(len=*),
intent(in) :: mempath
789 integer(I4B),
intent(in) :: layer
790 integer(I4B),
intent(in) :: iout
791 integer(I4B) :: inunit
793 character(len=LENCOMPONENTNAME) :: comp, subcomp
794 character(len=LINELENGTH) :: filename, suffix
805 write (suffix,
'(a,i0)') trim(suffix)//
'.l', layer
807 suffix = trim(suffix)//
'.txt'
810 filename = trim(comp)//
'-'//trim(subcomp)//
'.'//trim(suffix)
814 call openfile(inunit, 0, filename,
'EXPORT', filstat_opt=
'REPLACE')
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
integer(i4b), parameter lencomponentname
maximum length of a component name
@ disu
DISV6 discretization.
@ dis
DIS6 discretization.
@ disv1d
DISV1D6 discretization.
@ dis2d
DIS2D6 discretization.
@ disv
DISU6 discretization.
@ disundef
undefined discretization
integer(i4b), parameter lenvarname
maximum length of a variable name
integer(i4b), parameter lenmempath
maximum length of the memory path
This module contains the Input Data Model Logger Module.
subroutine idm_log_var_str(p_mem, varname, mempath, iout)
Log type specific information str.
integer(i4b) function create_export_file(varname, mempath, layer, iout)
Create export file.
subroutine idm_log_var_int(p_mem, varname, mempath, datatype, iout)
Log type specific information integer.
integer(i4b) function distype_export_dim(distype, shapestr, is_layered)
Set dis type export_dim.
subroutine idm_export_int2d(p_mem, varname, mempath, shapestr, iout)
Create export file int2d.
subroutine, public idm_log_close(component, subcomponent, iout)
@ brief log the closing message
subroutine idm_export_dbl2d(p_mem, varname, mempath, shapestr, iout)
Create export file dbl2d.
subroutine, public idm_log_period_header(component, iout)
@ brief log a dynamic header message
subroutine idm_log_var_dbl3d(p_mem, varname, mempath, iout)
Log type specific information dbl3d.
subroutine idm_export_int3d(p_mem, varname, mempath, shapestr, iout)
Create export file int3d.
subroutine, public idm_log_header(component, subcomponent, iout)
@ brief log a header message
subroutine idm_log_var_dbl2d(p_mem, varname, mempath, iout)
Log type specific information dbl2d.
subroutine idm_log_var_ts(varname, mempath, iout, is_tas)
@ brief log the period closing message
subroutine idm_export_dbl3d(p_mem, varname, mempath, shapestr, iout)
Create export file dbl3d.
subroutine idm_log_var_int1d(p_mem, varname, mempath, iout)
Log type specific information int1d.
subroutine, public idm_log_period_close(iout)
@ brief log the period closing message
subroutine idm_log_var_dbl(p_mem, varname, mempath, iout)
Log type specific information double.
subroutine idm_log_var_dbl1d(p_mem, varname, mempath, iout)
Log type specific information dbl1d.
subroutine idm_log_var_int2d(p_mem, varname, mempath, iout)
Log type specific information int2d.
subroutine idm_log_var_int3d(p_mem, varname, mempath, iout)
Log type specific information int3d.
subroutine idm_log_var_logical(p_mem, varname, mempath, iout)
Log type specific information logical.
subroutine idm_export_dbl1d(p_mem, varname, mempath, shapestr, iout)
Create export file dbl1d.
subroutine idm_export_int1d(p_mem, varname, mempath, shapestr, iout)
Create export file int1d.
This module defines variable data types.
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
subroutine split_mem_path(mem_path, component, subcomponent)
Split the memory path into component(s)
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string
character(len=linelength) idm_context
integer(i4b) iparamlog
input (idm) parameter logging to simulation listing file
integer(i4b), pointer, public kstp
current time step number
integer(i4b), pointer, public kper
current stress period number