MODFLOW 6  version 6.7.0.dev0
USGS Modular Hydrologic Model
idmloggermodule Module Reference

This module contains the Input Data Model Logger Module. More...

Data Types

interface  idm_log_var
 
interface  idm_export
 

Functions/Subroutines

subroutine, public idm_log_header (component, subcomponent, iout)
 @ brief log a header message More...
 
subroutine, public idm_log_close (component, subcomponent, iout)
 @ brief log the closing message More...
 
subroutine, public idm_log_period_header (component, iout)
 @ brief log a dynamic header message More...
 
subroutine, public idm_log_period_close (iout)
 @ brief log the period closing message More...
 
subroutine idm_log_var_ts (varname, mempath, iout, is_tas)
 @ brief log the period closing message More...
 
subroutine idm_log_var_logical (p_mem, varname, mempath, iout)
 Log type specific information logical. More...
 
subroutine idm_log_var_int (p_mem, varname, mempath, datatype, iout)
 Log type specific information integer. More...
 
subroutine idm_log_var_int1d (p_mem, varname, mempath, iout)
 Log type specific information int1d. More...
 
subroutine idm_log_var_int2d (p_mem, varname, mempath, iout)
 Log type specific information int2d. More...
 
subroutine idm_log_var_int3d (p_mem, varname, mempath, iout)
 Log type specific information int3d. More...
 
subroutine idm_log_var_dbl (p_mem, varname, mempath, iout)
 Log type specific information double. More...
 
subroutine idm_log_var_dbl1d (p_mem, varname, mempath, iout)
 Log type specific information dbl1d. More...
 
subroutine idm_log_var_dbl2d (p_mem, varname, mempath, iout)
 Log type specific information dbl2d. More...
 
subroutine idm_log_var_dbl3d (p_mem, varname, mempath, iout)
 Log type specific information dbl3d. More...
 
subroutine idm_log_var_str (p_mem, varname, mempath, iout)
 Log type specific information str. More...
 
subroutine idm_export_int1d (p_mem, varname, mempath, shapestr, iout)
 Create export file int1d. More...
 
subroutine idm_export_int2d (p_mem, varname, mempath, shapestr, iout)
 Create export file int2d. More...
 
subroutine idm_export_int3d (p_mem, varname, mempath, shapestr, iout)
 Create export file int3d. More...
 
subroutine idm_export_dbl1d (p_mem, varname, mempath, shapestr, iout)
 Create export file dbl1d. More...
 
subroutine idm_export_dbl2d (p_mem, varname, mempath, shapestr, iout)
 Create export file dbl2d. More...
 
subroutine idm_export_dbl3d (p_mem, varname, mempath, shapestr, iout)
 Create export file dbl3d. More...
 
integer(i4b) function distype_export_dim (distype, shapestr, is_layered)
 Set dis type export_dim. More...
 
integer(i4b) function create_export_file (varname, mempath, layer, iout)
 Create export file. More...
 

Detailed Description

This module contains the subroutines for logging messages to the list file as the input data model loads model input.

Function/Subroutine Documentation

◆ create_export_file()

integer(i4b) function idmloggermodule::create_export_file ( character(len=*), intent(in)  varname,
character(len=*), intent(in)  mempath,
integer(i4b), intent(in)  layer,
integer(i4b), intent(in)  iout 
)
private

Name formats where l=layer, a=auxiliary, p=period : <comp>-<subcomp>.varname.txt : <comp>-<subcomp>.varname.l<num>.txt : <comp>-<subcomp>.varname.p<num>.txt : <comp>-<subcomp>.varname.a<num>.p<num>.txt

Parameters
[in]varnamevariable name
[in]mempathvariable memory path

Definition at line 760 of file IdmLogger.f90.

762  use constantsmodule, only: lenvarname
764  use inputoutputmodule, only: upcase, lowcase
766  character(len=*), intent(in) :: varname !< variable name
767  character(len=*), intent(in) :: mempath !< variable memory path
768  integer(I4B), intent(in) :: layer
769  integer(I4B), intent(in) :: iout
770  integer(I4B) :: inunit
771  character(len=LENCOMPONENTNAME) :: comp, subcomp
772  character(len=LINELENGTH) :: filename, suffix
773 
774  ! split the mempath
775  call split_mem_path(mempath, comp, subcomp)
776  call lowcase(comp)
777  call lowcase(subcomp)
778 
779  ! build suffix
780  suffix = varname
781  call lowcase(suffix)
782  if (layer > 0) then
783  write (suffix, '(a,i0)') trim(suffix)//'.l', layer
784  end if
785  suffix = trim(suffix)//'.txt'
786 
787  ! set filename
788  filename = trim(comp)//'-'//trim(subcomp)//'.'//trim(suffix)
789 
790  ! silently create the array file
791  inunit = getunit()
792  call openfile(inunit, 0, filename, 'EXPORT', filstat_opt='REPLACE')
This module contains simulation constants.
Definition: Constants.f90:9
integer(i4b), parameter lenvarname
maximum length of a variable name
Definition: Constants.f90:17
integer(i4b) function, public getunit()
Get a free unit number.
subroutine, public lowcase(word)
Convert to lower case.
subroutine, public upcase(word)
Convert to upper case.
subroutine, public openfile(iu, iout, fname, ftype, fmtarg_opt, accarg_opt, filstat_opt, mode_opt)
Open a file.
Definition: InputOutput.f90:30
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)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ distype_export_dim()

integer(i4b) function idmloggermodule::distype_export_dim ( integer(i4b), intent(in), pointer  distype,
character(len=*), intent(in)  shapestr,
logical(lgp), intent(inout)  is_layered 
)

Set the dimension of the export

Parameters
[in]shapestrdfn shape string
[in,out]is_layereddoes this data represent layers

Definition at line 706 of file IdmLogger.f90.

708  integer(I4B), pointer, intent(in) :: distype
709  character(len=*), intent(in) :: shapestr !< dfn shape string
710  logical(LGP), intent(inout) :: is_layered !< does this data represent layers
711  integer(I4B) :: export_dim
712 
713  ! initialize is_layered to false
714  is_layered = .false.
715 
716  select case (distype)
717  case (dis)
718  if (shapestr == 'NODES') then
719  export_dim = 3
720  is_layered = .true.
721  else if (shapestr == 'NCOL NROW NLAY') then
722  export_dim = 3
723  is_layered = .true.
724  else
725  export_dim = 1
726  end if
727  case (disv)
728  if (shapestr == 'NODES') then
729  export_dim = 2
730  is_layered = .true.
731  else if (shapestr == 'NCPL NLAY') then
732  export_dim = 2
733  is_layered = .true.
734  else
735  export_dim = 1
736  end if
737  case (dis2d)
738  if (shapestr == 'NODES') then
739  export_dim = 2
740  else if (shapestr == 'NCOL NROW') then
741  export_dim = 2
742  else
743  export_dim = 1
744  end if
745  case (disu, disv1d)
746  export_dim = 1
747  case default
748  export_dim = 0
749  end select
Here is the caller graph for this function:

◆ idm_export_dbl1d()

subroutine idmloggermodule::idm_export_dbl1d ( real(dp), dimension(:), intent(in), contiguous  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  mempath,
character(len=*), intent(in)  shapestr,
integer(i4b), intent(in)  iout 
)

export layered dbl1d parameters with NODES shape

Parameters
[in]p_mem1d dbl array
[in]varnamevariable name
[in]mempathvariable memory path
[in]shapestrdfn shape string

Definition at line 516 of file IdmLogger.f90.

519  real(DP), dimension(:), contiguous, intent(in) :: p_mem !< 1d dbl array
520  character(len=*), intent(in) :: varname !< variable name
521  character(len=*), intent(in) :: mempath !< variable memory path
522  character(len=*), intent(in) :: shapestr !< dfn shape string
523  integer(I4B), intent(in) :: iout
524  integer(I4B), dimension(:), pointer, contiguous :: model_shape
525  real(DP), dimension(:, :, :), pointer, contiguous :: dbl3d
526  real(DP), dimension(:, :), pointer, contiguous :: dbl2d
527  integer(I4B), dimension(3) :: dis3d_shape
528  integer(I4B), dimension(2) :: dis2d_shape
529  integer(I4B), pointer :: distype
530  character(LENMEMPATH) :: input_mempath
531  character(LENCOMPONENTNAME) :: comp, subcomp
532  integer(I4B) :: i, j, k, inunit, export_dim
533  logical(LGP) :: is_layered
534 
535  ! set pointer to DISENUM and MODEL_SHAPE
536  call split_mem_path(mempath, comp, subcomp)
537  input_mempath = create_mem_path(component=comp, context=idm_context)
538  call mem_setptr(distype, 'DISENUM', input_mempath)
539  call mem_setptr(model_shape, 'MODEL_SHAPE', input_mempath)
540 
541  ! set export_dim
542  export_dim = distype_export_dim(distype, shapestr, is_layered)
543 
544  ! create export file(s)
545  select case (export_dim)
546  case (3)
547  ! set reshape array
548  dis3d_shape(1) = model_shape(3)
549  dis3d_shape(2) = model_shape(2)
550  ! allocate and reshape
551  dis3d_shape(3) = model_shape(1)
552  allocate (dbl3d(dis3d_shape(1), dis3d_shape(2), dis3d_shape(3)))
553  dbl3d = reshape(p_mem, dis3d_shape)
554  do k = 1, dis3d_shape(3)
555  ! write export files 3D array
556  inunit = create_export_file(varname, mempath, k, iout)
557  do i = 1, model_shape(2)
558  write (inunit, '(*(G0.10, " "))') (dbl3d(j, i, k), j=1, &
559  dis3d_shape(1))
560  end do
561  close (inunit)
562  end do
563  ! cleanup
564  deallocate (dbl3d)
565  case (2)
566  ! set reshape array
567  dis2d_shape(1) = model_shape(2)
568  dis2d_shape(2) = model_shape(1)
569  ! allocate and reshape
570  allocate (dbl2d(dis2d_shape(1), dis2d_shape(2)))
571  dbl2d = reshape(p_mem, dis2d_shape)
572  if (is_layered) then
573  ! write layered export files 2D array
574  do i = 1, dis2d_shape(2)
575  inunit = create_export_file(varname, mempath, i, iout)
576  write (inunit, '(*(G0.10, " "))') (dbl2d(j, i), j=1, dis2d_shape(1))
577  close (inunit)
578  end do
579  else
580  ! write export file 2D array
581  inunit = create_export_file(varname, mempath, 0, iout)
582  do i = 1, dis2d_shape(2)
583  write (inunit, '(*(G0.10, " "))') (dbl2d(j, i), j=1, dis2d_shape(1))
584  end do
585  close (inunit)
586  end if
587  ! cleanup
588  deallocate (dbl2d)
589  case (1)
590  ! write export file 1D array
591  inunit = create_export_file(varname, mempath, 0, iout)
592  write (inunit, '(*(G0.10, " "))') p_mem
593  close (inunit)
594  case default
595  write (errmsg, '(a,i0)') 'EXPORT unsupported dbl1d export_dim=', &
596  export_dim
597  call store_error(errmsg, .true.)
598  end select

◆ idm_export_dbl2d()

subroutine idmloggermodule::idm_export_dbl2d ( real(dp), dimension(:, :), intent(in), contiguous  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  mempath,
character(len=*), intent(in)  shapestr,
integer(i4b), intent(in)  iout 
)
Parameters
[in]p_mem2d dbl array
[in]varnamevariable name
[in]mempathvariable memory path
[in]shapestrdfn shape string

Definition at line 603 of file IdmLogger.f90.

606  real(DP), dimension(:, :), contiguous, intent(in) :: p_mem !< 2d dbl array
607  character(len=*), intent(in) :: varname !< variable name
608  character(len=*), intent(in) :: mempath !< variable memory path
609  character(len=*), intent(in) :: shapestr !< dfn shape string
610  integer(I4B), intent(in) :: iout
611  integer(I4B), dimension(:), pointer, contiguous :: model_shape
612  integer(I4B), pointer :: distype
613  character(LENMEMPATH) :: input_mempath
614  character(LENCOMPONENTNAME) :: comp, subcomp
615  integer(I4B) :: i, j, inunit, export_dim
616  logical(LGP) :: is_layered
617 
618  ! set pointer to DISENUM
619  call split_mem_path(mempath, comp, subcomp)
620  input_mempath = create_mem_path(component=comp, context=idm_context)
621  call mem_setptr(distype, 'DISENUM', input_mempath)
622  call mem_setptr(model_shape, 'MODEL_SHAPE', input_mempath)
623 
624  ! set export_dim
625  export_dim = distype_export_dim(distype, shapestr, is_layered)
626 
627  select case (export_dim)
628  case (1)
629  ! write export file 1D array
630  inunit = create_export_file(varname, mempath, 0, iout)
631  do i = 1, size(p_mem, dim=2)
632  write (inunit, '(*(G0.10, " "))') (p_mem(j, i), j=1, size(p_mem, dim=1))
633  end do
634  close (inunit)
635  case (2)
636  if (is_layered) then
637  ! write layered export files 2D array
638  do i = 1, size(p_mem, dim=2)
639  inunit = create_export_file(varname, mempath, i, iout)
640  write (inunit, '(*(G0.10, " "))') (p_mem(j, i), j=1, size(p_mem, dim=1))
641  close (inunit)
642  end do
643  else
644  ! write export file 2D array
645  inunit = create_export_file(varname, mempath, 0, iout)
646  do i = 1, size(p_mem, dim=2)
647  write (inunit, '(*(G0.10, " "))') (p_mem(j, i), j=1, size(p_mem, dim=1))
648  end do
649  close (inunit)
650  end if
651  case default
652  write (errmsg, '(a,i0)') 'EXPORT unsupported dbl2d export_dim=', &
653  export_dim
654  call store_error(errmsg, .true.)
655  end select

◆ idm_export_dbl3d()

subroutine idmloggermodule::idm_export_dbl3d ( real(dp), dimension(:, :, :), intent(in), contiguous  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  mempath,
character(len=*), intent(in)  shapestr,
integer(i4b), intent(in)  iout 
)
Parameters
[in]p_mem2d dbl array
[in]varnamevariable name
[in]mempathvariable memory path
[in]shapestrdfn shape string

Definition at line 660 of file IdmLogger.f90.

663  real(DP), dimension(:, :, :), contiguous, intent(in) :: p_mem !< 2d dbl array
664  character(len=*), intent(in) :: varname !< variable name
665  character(len=*), intent(in) :: mempath !< variable memory path
666  character(len=*), intent(in) :: shapestr !< dfn shape string
667  integer(I4B), intent(in) :: iout
668  integer(I4B), dimension(:), pointer, contiguous :: model_shape
669  integer(I4B), pointer :: distype
670  character(LENMEMPATH) :: input_mempath
671  character(LENCOMPONENTNAME) :: comp, subcomp
672  integer(I4B) :: i, j, k, inunit, export_dim
673  logical(LGP) :: is_layered
674 
675  ! set pointer to DISENUM
676  call split_mem_path(mempath, comp, subcomp)
677  input_mempath = create_mem_path(component=comp, context=idm_context)
678  call mem_setptr(distype, 'DISENUM', input_mempath)
679  call mem_setptr(model_shape, 'MODEL_SHAPE', input_mempath)
680 
681  ! set export_dim
682  export_dim = distype_export_dim(distype, shapestr, is_layered)
683 
684  select case (export_dim)
685  case (3)
686  ! write export files 3D array
687  do k = 1, size(p_mem, dim=3)
688  inunit = create_export_file(varname, mempath, k, iout)
689  do i = 1, size(p_mem, dim=2)
690  write (inunit, '(*(G0.10, " "))') (p_mem(j, i, k), j=1, &
691  size(p_mem, dim=1))
692  end do
693  close (inunit)
694  end do
695  case default
696  write (errmsg, '(a,i0)') 'EXPORT unsupported dbl3d export_dim=', &
697  export_dim
698  call store_error(errmsg, .true.)
699  end select

◆ idm_export_int1d()

subroutine idmloggermodule::idm_export_int1d ( integer(i4b), dimension(:), intent(in), contiguous  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  mempath,
character(len=*), intent(in)  shapestr,
integer(i4b), intent(in)  iout 
)
private

export layered int1d parameter files

Parameters
[in]p_mem1d integer array
[in]varnamevariable name
[in]mempathvariable memory path
[in]shapestrdfn shape string

Definition at line 326 of file IdmLogger.f90.

329  integer(I4B), dimension(:), contiguous, intent(in) :: p_mem !< 1d integer array
330  character(len=*), intent(in) :: varname !< variable name
331  character(len=*), intent(in) :: mempath !< variable memory path
332  character(len=*), intent(in) :: shapestr !< dfn shape string
333  integer(I4B), intent(in) :: iout
334  integer(I4B), dimension(:), pointer, contiguous :: model_shape
335  integer(I4B), dimension(:, :, :), pointer, contiguous :: int3d
336  integer(I4B), dimension(:, :), pointer, contiguous :: int2d
337  integer(I4B), dimension(3) :: dis3d_shape
338  integer(I4B), dimension(2) :: dis2d_shape
339  integer(I4B), pointer :: distype
340  character(LENMEMPATH) :: input_mempath
341  character(LENCOMPONENTNAME) :: comp, subcomp
342  integer(I4B) :: i, j, k, inunit, export_dim
343  logical(LGP) :: is_layered
344 
345  ! set pointer to DISENUM and MODEL_SHAPE
346  call split_mem_path(mempath, comp, subcomp)
347  input_mempath = create_mem_path(component=comp, context=idm_context)
348  call mem_setptr(distype, 'DISENUM', input_mempath)
349  call mem_setptr(model_shape, 'MODEL_SHAPE', input_mempath)
350 
351  ! set export_dim
352  export_dim = distype_export_dim(distype, shapestr, is_layered)
353 
354  ! create export file(s)
355  select case (export_dim)
356  case (3)
357  ! set reshape array
358  dis3d_shape(1) = model_shape(3)
359  dis3d_shape(2) = model_shape(2)
360  dis3d_shape(3) = model_shape(1)
361  ! allocate and reshape
362  allocate (int3d(dis3d_shape(1), dis3d_shape(2), dis3d_shape(3)))
363  int3d = reshape(p_mem, dis3d_shape)
364  ! write export files 3D array
365  do k = 1, dis3d_shape(3)
366  inunit = create_export_file(varname, mempath, k, iout)
367  do i = 1, model_shape(2)
368  write (inunit, '(*(i0, " "))') (int3d(j, i, k), j=1, &
369  dis3d_shape(1))
370  end do
371  close (inunit)
372  end do
373  ! cleanup
374  deallocate (int3d)
375  case (2)
376  ! set reshape array
377  dis2d_shape(1) = model_shape(2)
378  dis2d_shape(2) = model_shape(1)
379  ! allocate and reshape
380  allocate (int2d(dis2d_shape(1), dis2d_shape(2)))
381  int2d = reshape(p_mem, dis2d_shape)
382  if (is_layered) then
383  ! write layered export files 2D array
384  do i = 1, dis2d_shape(2)
385  inunit = create_export_file(varname, mempath, i, iout)
386  write (inunit, '(*(i0, " "))') (int2d(j, i), j=1, dis2d_shape(1))
387  close (inunit)
388  end do
389  else
390  ! write export file 2D array
391  inunit = create_export_file(varname, mempath, 0, iout)
392  do i = 1, dis2d_shape(2)
393  write (inunit, '(*(i0, " "))') (int2d(j, i), j=1, dis2d_shape(1))
394  end do
395  close (inunit)
396  end if
397  ! cleanup
398  deallocate (int2d)
399  case (1)
400  ! write export file 1D array
401  inunit = create_export_file(varname, mempath, 0, iout)
402  write (inunit, '(*(i0, " "))') p_mem
403  close (inunit)
404  case default
405  write (errmsg, '(a,i0)') 'EXPORT unsupported int1d export_dim=', &
406  export_dim
407  call store_error(errmsg, .true.)
408  end select

◆ idm_export_int2d()

subroutine idmloggermodule::idm_export_int2d ( integer(i4b), dimension(:, :), intent(in), contiguous  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  mempath,
character(len=*), intent(in)  shapestr,
integer(i4b), intent(in)  iout 
)
Parameters
[in]p_mem2d dbl array
[in]varnamevariable name
[in]mempathvariable memory path
[in]shapestrdfn shape string

Definition at line 413 of file IdmLogger.f90.

416  integer(I4B), dimension(:, :), contiguous, intent(in) :: p_mem !< 2d dbl array
417  character(len=*), intent(in) :: varname !< variable name
418  character(len=*), intent(in) :: mempath !< variable memory path
419  character(len=*), intent(in) :: shapestr !< dfn shape string
420  integer(I4B), intent(in) :: iout
421  integer(I4B), dimension(:), pointer, contiguous :: model_shape
422  integer(I4B), pointer :: distype
423  character(LENMEMPATH) :: input_mempath
424  character(LENCOMPONENTNAME) :: comp, subcomp
425  integer(I4B) :: i, j, inunit, export_dim
426  logical(LGP) :: is_layered
427 
428  ! set pointer to DISENUM
429  call split_mem_path(mempath, comp, subcomp)
430  input_mempath = create_mem_path(component=comp, context=idm_context)
431  call mem_setptr(distype, 'DISENUM', input_mempath)
432  call mem_setptr(model_shape, 'MODEL_SHAPE', input_mempath)
433 
434  ! set export_dim
435  export_dim = distype_export_dim(distype, shapestr, is_layered)
436 
437  select case (export_dim)
438  case (1)
439  ! write export file 1D array
440  inunit = create_export_file(varname, mempath, 0, iout)
441  do i = 1, size(p_mem, dim=2)
442  write (inunit, '(*(i0, " "))') (p_mem(j, i), j=1, size(p_mem, dim=1))
443  end do
444  close (inunit)
445  case (2)
446  if (is_layered) then
447  ! write layered export files 2D array
448  do i = 1, size(p_mem, dim=2)
449  inunit = create_export_file(varname, mempath, i, iout)
450  write (inunit, '(*(i0, " "))') (p_mem(j, i), j=1, size(p_mem, dim=1))
451  close (inunit)
452  end do
453  else
454  ! write export file 2D array
455  inunit = create_export_file(varname, mempath, 0, iout)
456  do i = 1, size(p_mem, dim=2)
457  write (inunit, '(*(i0, " "))') (p_mem(j, i), j=1, size(p_mem, dim=1))
458  end do
459  close (inunit)
460  end if
461  case default
462  write (errmsg, '(a,i0)') 'EXPORT unsupported int2d export_dim=', &
463  export_dim
464  call store_error(errmsg, .true.)
465  end select

◆ idm_export_int3d()

subroutine idmloggermodule::idm_export_int3d ( integer(i4b), dimension(:, :, :), intent(in), contiguous  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  mempath,
character(len=*), intent(in)  shapestr,
integer(i4b), intent(in)  iout 
)
Parameters
[in]p_mem2d dbl array
[in]varnamevariable name
[in]mempathvariable memory path
[in]shapestrdfn shape string

Definition at line 470 of file IdmLogger.f90.

473  integer(I4B), dimension(:, :, :), contiguous, intent(in) :: p_mem !< 2d dbl array
474  character(len=*), intent(in) :: varname !< variable name
475  character(len=*), intent(in) :: mempath !< variable memory path
476  character(len=*), intent(in) :: shapestr !< dfn shape string
477  integer(I4B), intent(in) :: iout
478  integer(I4B), dimension(:), pointer, contiguous :: model_shape
479  integer(I4B), pointer :: distype
480  character(LENMEMPATH) :: input_mempath
481  character(LENCOMPONENTNAME) :: comp, subcomp
482  integer(I4B) :: i, j, k, inunit, export_dim
483  logical(LGP) :: is_layered
484 
485  ! set pointer to DISENUM
486  call split_mem_path(mempath, comp, subcomp)
487  input_mempath = create_mem_path(component=comp, context=idm_context)
488  call mem_setptr(distype, 'DISENUM', input_mempath)
489  call mem_setptr(model_shape, 'MODEL_SHAPE', input_mempath)
490 
491  ! set export_dim
492  export_dim = distype_export_dim(distype, shapestr, is_layered)
493 
494  select case (export_dim)
495  case (3)
496  ! write export files 3D array
497  do k = 1, size(p_mem, dim=3)
498  inunit = create_export_file(varname, mempath, k, iout)
499  do i = 1, size(p_mem, dim=2)
500  write (inunit, '(*(i0, " "))') (p_mem(j, i, k), j=1, size(p_mem, dim=1))
501  end do
502  close (inunit)
503  end do
504  case default
505  write (errmsg, '(a,i0)') 'EXPORT unsupported int3d export_dim=', &
506  export_dim
507  call store_error(errmsg, .true.)
508  end select

◆ idm_log_close()

subroutine, public idmloggermodule::idm_log_close ( character(len=*), intent(in)  component,
character(len=*), intent(in)  subcomponent,
integer(i4b), intent(in)  iout 
)
Parameters
[in]componentcomponent name
[in]subcomponentsubcomponent name

Definition at line 55 of file IdmLogger.f90.

56  character(len=*), intent(in) :: component !< component name
57  character(len=*), intent(in) :: subcomponent !< subcomponent name
58  integer(I4B), intent(in) :: iout
59  if (iparamlog > 0 .and. iout > 0) then
60  write (iout, '(1x,a)') 'Loading input complete...'
61  end if
Here is the caller graph for this function:

◆ idm_log_header()

subroutine, public idmloggermodule::idm_log_header ( character(len=*), intent(in)  component,
character(len=*), intent(in)  subcomponent,
integer(i4b), intent(in)  iout 
)
Parameters
[in]componentcomponent name
[in]subcomponentsubcomponent name

Definition at line 43 of file IdmLogger.f90.

44  character(len=*), intent(in) :: component !< component name
45  character(len=*), intent(in) :: subcomponent !< subcomponent name
46  integer(I4B), intent(in) :: iout
47  if (iparamlog > 0 .and. iout > 0) then
48  write (iout, '(1x,a)') 'Loading input for '//trim(component)//&
49  &'/'//trim(subcomponent)
50  end if
Here is the caller graph for this function:

◆ idm_log_period_close()

subroutine, public idmloggermodule::idm_log_period_close ( integer(i4b), intent(in)  iout)

Definition at line 78 of file IdmLogger.f90.

79  use tdismodule, only: kstp
80  integer(I4B), intent(in) :: iout
81  if (iparamlog > 0 .and. iout > 0 .and. kstp == 1) then
82  !backspace iout
83  write (iout, '(1x,a,/)') 'IDP component dynamic load complete...'
84  end if
integer(i4b), pointer, public kstp
current time step number
Definition: tdis.f90:24
Here is the caller graph for this function:

◆ idm_log_period_header()

subroutine, public idmloggermodule::idm_log_period_header ( character(len=*), intent(in)  component,
integer(i4b), intent(in)  iout 
)
Parameters
[in]componentcomponent name

Definition at line 66 of file IdmLogger.f90.

67  use tdismodule, only: kper, kstp
68  character(len=*), intent(in) :: component !< component name
69  integer(I4B), intent(in) :: iout
70  if (iparamlog > 0 .and. iout > 0 .and. kstp == 1) then
71  write (iout, '(/1x,a,i0,a)') 'IDP PERIOD ', kper, &
72  ' load for component: '//trim(component)
73  end if
integer(i4b), pointer, public kper
current stress period number
Definition: tdis.f90:23
Here is the caller graph for this function:

◆ idm_log_var_dbl()

subroutine idmloggermodule::idm_log_var_dbl ( real(dp), intent(in)  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  mempath,
integer(i4b), intent(in)  iout 
)
private
Parameters
[in]p_memdbl scalar
[in]varnamevariable name
[in]mempathvariable memory path

Definition at line 218 of file IdmLogger.f90.

219  real(DP), intent(in) :: p_mem !< dbl scalar
220  character(len=*), intent(in) :: varname !< variable name
221  character(len=*), intent(in) :: mempath !< variable memory path
222  integer(I4B), intent(in) :: iout
223  character(len=LINELENGTH) :: description
224  if (iparamlog > 0 .and. iout > 0) then
225  description = 'Double detected'
226  write (iout, '(3x, a, ": ", a, " = ", G0)') &
227  trim(description), trim(varname), p_mem
228  end if

◆ idm_log_var_dbl1d()

subroutine idmloggermodule::idm_log_var_dbl1d ( real(dp), dimension(:), intent(in), contiguous  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  mempath,
integer(i4b), intent(in)  iout 
)
private
Parameters
[in]p_mem1d real array
[in]varnamevariable name
[in]mempathvariable memory path

Definition at line 233 of file IdmLogger.f90.

234  real(DP), dimension(:), contiguous, intent(in) :: p_mem !< 1d real array
235  character(len=*), intent(in) :: varname !< variable name
236  character(len=*), intent(in) :: mempath !< variable memory path
237  integer(I4B), intent(in) :: iout
238  real(DP) :: min_val, max_val
239  character(len=LINELENGTH) :: description
240  if (iparamlog > 0 .and. iout > 0) then
241  min_val = minval(p_mem)
242  max_val = maxval(p_mem)
243  if (min_val == max_val) then
244  description = 'Double precision 1D constant array detected'
245  write (iout, '(3x, a, ": ", a, " = ", G0)') &
246  trim(description), trim(varname), min_val
247  else
248  description = 'Double precision 1D array detected'
249  write (iout, '(3x, a, ": ", a, a, G0, a, G0)') &
250  trim(description), trim(varname), &
251  ' ranges from ', min_val, ' to ', max_val
252  end if
253  end if

◆ idm_log_var_dbl2d()

subroutine idmloggermodule::idm_log_var_dbl2d ( real(dp), dimension(:, :), intent(in), contiguous  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  mempath,
integer(i4b), intent(in)  iout 
)
private
Parameters
[in]p_mem2d dbl array
[in]varnamevariable name
[in]mempathvariable memory path

Definition at line 258 of file IdmLogger.f90.

259  real(DP), dimension(:, :), contiguous, intent(in) :: p_mem !< 2d dbl array
260  character(len=*), intent(in) :: varname !< variable name
261  character(len=*), intent(in) :: mempath !< variable memory path
262  integer(I4B), intent(in) :: iout
263  real(DP) :: min_val, max_val
264  character(len=LINELENGTH) :: description
265  if (iparamlog > 0 .and. iout > 0) then
266  min_val = minval(p_mem)
267  max_val = maxval(p_mem)
268  if (min_val == max_val) then
269  description = 'Double precision 2D constant array detected'
270  write (iout, '(3x, a, ": ", a, " = ", G0)') &
271  trim(description), trim(varname), min_val
272  else
273  description = 'Double precision 2D array detected'
274  write (iout, '(3x, a, ": ", a, a, G0, a, G0)') &
275  trim(description), trim(varname), &
276  ' ranges from ', min_val, ' to ', max_val
277  end if
278  end if

◆ idm_log_var_dbl3d()

subroutine idmloggermodule::idm_log_var_dbl3d ( real(dp), dimension(:, :, :), intent(in), contiguous  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  mempath,
integer(i4b), intent(in)  iout 
)
private
Parameters
[in]p_mem3d dbl array
[in]varnamevariable name
[in]mempathvariable memory path

Definition at line 283 of file IdmLogger.f90.

284  real(DP), dimension(:, :, :), contiguous, intent(in) :: p_mem !< 3d dbl array
285  character(len=*), intent(in) :: varname !< variable name
286  character(len=*), intent(in) :: mempath !< variable memory path
287  integer(I4B), intent(in) :: iout
288  real(DP) :: min_val, max_val
289  character(len=LINELENGTH) :: description
290  if (iparamlog > 0 .and. iout > 0) then
291  min_val = minval(p_mem)
292  max_val = maxval(p_mem)
293  if (min_val == max_val) then
294  description = 'Double precision 3D constant array detected'
295  write (iout, '(3x, a, ": ", a, " = ", G0)') &
296  trim(description), trim(varname), min_val
297  else
298  description = 'Double precision 3D array detected'
299  write (iout, '(3x, a, ": ", a, a, G0, a, G0)') &
300  trim(description), trim(varname), &
301  ' ranges from ', min_val, ' to ', max_val
302  end if
303  end if

◆ idm_log_var_int()

subroutine idmloggermodule::idm_log_var_int ( integer(i4b), intent(in)  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  mempath,
character(len=*), intent(in)  datatype,
integer(i4b), intent(in)  iout 
)
private
Parameters
[in]p_memint scalar
[in]varnamevariable name
[in]mempathvariable memory path
[in]datatypevariable data type

Definition at line 122 of file IdmLogger.f90.

123  integer(I4B), intent(in) :: p_mem !< int scalar
124  character(len=*), intent(in) :: varname !< variable name
125  character(len=*), intent(in) :: mempath !< variable memory path
126  character(len=*), intent(in) :: datatype !< variable data type
127  integer(I4B), intent(in) :: iout
128  character(len=LINELENGTH) :: description
129  if (iparamlog > 0 .and. iout > 0) then
130  if (datatype == 'KEYWORD') then
131  description = 'Keyword detected'
132  write (iout, '(3x, a, ": ", a)') trim(description), trim(varname)
133  else
134  description = 'Integer detected'
135  write (iout, '(3x, a, ": ", a, " = ", i0)') &
136  trim(description), trim(varname), p_mem
137  end if
138  end if

◆ idm_log_var_int1d()

subroutine idmloggermodule::idm_log_var_int1d ( integer(i4b), dimension(:), intent(in), contiguous  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  mempath,
integer(i4b), intent(in)  iout 
)
private
Parameters
[in]p_mem1d int array
[in]varnamevariable name
[in]mempathvariable memory path

Definition at line 143 of file IdmLogger.f90.

144  integer(I4B), dimension(:), contiguous, intent(in) :: p_mem !< 1d int array
145  character(len=*), intent(in) :: varname !< variable name
146  character(len=*), intent(in) :: mempath !< variable memory path
147  integer(I4B), intent(in) :: iout
148  integer(I4B) :: min_val, max_val
149  character(len=LINELENGTH) :: description
150  if (iparamlog > 0 .and. iout > 0) then
151  min_val = minval(p_mem)
152  max_val = maxval(p_mem)
153  if (min_val == max_val) then
154  description = 'Integer 1D constant array detected'
155  write (iout, '(3x, a, ": ", a, " = ", i0)') &
156  trim(description), trim(varname), min_val
157  else
158  description = 'Integer 1D array detected'
159  write (iout, '(3x, a, ": ", a, a, i0, a, i0)') &
160  trim(description), trim(varname), &
161  ' ranges from ', min_val, ' to ', max_val
162  end if
163  end if

◆ idm_log_var_int2d()

subroutine idmloggermodule::idm_log_var_int2d ( integer(i4b), dimension(:, :), intent(in), contiguous  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  mempath,
integer(i4b), intent(in)  iout 
)
private
Parameters
[in]p_mem2d int array
[in]varnamevariable name
[in]mempathvariable memory path

Definition at line 168 of file IdmLogger.f90.

169  integer(I4B), dimension(:, :), contiguous, intent(in) :: p_mem !< 2d int array
170  character(len=*), intent(in) :: varname !< variable name
171  character(len=*), intent(in) :: mempath !< variable memory path
172  integer(I4B), intent(in) :: iout
173  integer(I4B) :: min_val, max_val
174  character(len=LINELENGTH) :: description
175  if (iparamlog > 0 .and. iout > 0) then
176  min_val = minval(p_mem)
177  max_val = maxval(p_mem)
178  if (min_val == max_val) then
179  description = 'Integer 2D constant array detected'
180  write (iout, '(3x, a, ": ", a, " = ", i0)') &
181  trim(description), trim(varname), min_val
182  else
183  description = 'Integer 2D array detected'
184  write (iout, '(3x, a, ": ", a, a, i0, a, i0)') &
185  trim(description), trim(varname), &
186  ' ranges from ', min_val, ' to ', max_val
187  end if
188  end if

◆ idm_log_var_int3d()

subroutine idmloggermodule::idm_log_var_int3d ( integer(i4b), dimension(:, :, :), intent(in), contiguous  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  mempath,
integer(i4b), intent(in)  iout 
)
private
Parameters
[in]p_mem3d int array
[in]varnamevariable name
[in]mempathvariable memory path

Definition at line 193 of file IdmLogger.f90.

194  integer(I4B), dimension(:, :, :), contiguous, intent(in) :: p_mem !< 3d int array
195  character(len=*), intent(in) :: varname !< variable name
196  character(len=*), intent(in) :: mempath !< variable memory path
197  integer(I4B), intent(in) :: iout
198  integer(I4B) :: min_val, max_val
199  character(len=LINELENGTH) :: description
200  if (iparamlog > 0 .and. iout > 0) then
201  min_val = minval(p_mem)
202  max_val = maxval(p_mem)
203  if (min_val == max_val) then
204  description = 'Integer 3D constant array detected'
205  write (iout, '(3x, a, ": ", a, " = ", i0)') &
206  trim(description), trim(varname), min_val
207  else
208  description = 'Integer 3D array detected'
209  write (iout, '(3x, a, ": ", a, a, i0, a, i0)') &
210  trim(description), trim(varname), &
211  ' ranges from ', min_val, ' to ', max_val
212  end if
213  end if

◆ idm_log_var_logical()

subroutine idmloggermodule::idm_log_var_logical ( logical(lgp), intent(in)  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  mempath,
integer(i4b), intent(in)  iout 
)
private
Parameters
[in]p_memlogical scalar
[in]varnamevariable name
[in]mempathvariable memory path

Definition at line 107 of file IdmLogger.f90.

108  logical(LGP), intent(in) :: p_mem !< logical scalar
109  character(len=*), intent(in) :: varname !< variable name
110  character(len=*), intent(in) :: mempath !< variable memory path
111  integer(I4B), intent(in) :: iout
112  character(len=LINELENGTH) :: description
113  if (iparamlog > 0 .and. iout > 0) then
114  description = 'Logical detected'
115  write (iout, '(3x, a, ": ", a, " = ", l1)') &
116  trim(description), trim(varname), p_mem
117  end if

◆ idm_log_var_str()

subroutine idmloggermodule::idm_log_var_str ( character(len=*), intent(in)  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  mempath,
integer(i4b), intent(in)  iout 
)
private
Parameters
[in]p_mempointer to str scalar
[in]varnamevariable name
[in]mempathvariable memory path

Definition at line 308 of file IdmLogger.f90.

309  character(len=*), intent(in) :: p_mem !< pointer to str scalar
310  character(len=*), intent(in) :: varname !< variable name
311  character(len=*), intent(in) :: mempath !< variable memory path
312  integer(I4B), intent(in) :: iout
313  character(len=LINELENGTH) :: description
314  if (iparamlog > 0 .and. iout > 0) then
315  description = 'String detected'
316  write (iout, '(3x, a, ": ", a, " = ", a)') &
317  trim(description), trim(varname), trim(p_mem)
318  end if

◆ idm_log_var_ts()

subroutine idmloggermodule::idm_log_var_ts ( character(len=*), intent(in)  varname,
character(len=*), intent(in)  mempath,
integer(i4b), intent(in)  iout,
logical(lgp), intent(in)  is_tas 
)
Parameters
[in]varnamevariable name
[in]mempathvariable memory path

Definition at line 89 of file IdmLogger.f90.

90  character(len=*), intent(in) :: varname !< variable name
91  character(len=*), intent(in) :: mempath !< variable memory path
92  integer(I4B), intent(in) :: iout
93  logical(LGP), intent(in) :: is_tas
94  if (iparamlog > 0 .and. iout > 0) then
95  if (is_tas) then
96  write (iout, '(3x, a, ": ", a)') &
97  'Time-array-series controlled dynamic variable detected', trim(varname)
98  else
99  write (iout, '(3x, a, ": ", a)') &
100  'Time-series controlled dynamic variable detected', trim(varname)
101  end if
102  end if