MODFLOW 6  version 6.8.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, detail)
 @ 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 774 of file IdmLogger.f90.

776  use constantsmodule, only: lenvarname
778  use inputoutputmodule, only: upcase, lowcase
780  character(len=*), intent(in) :: varname !< variable name
781  character(len=*), intent(in) :: mempath !< variable memory path
782  integer(I4B), intent(in) :: layer
783  integer(I4B), intent(in) :: iout
784  integer(I4B) :: inunit
785  character(len=LENCOMPONENTNAME) :: comp, subcomp
786  character(len=LINELENGTH) :: filename, suffix
787 
788  ! split the mempath
789  call split_mem_path(mempath, comp, subcomp)
790  call lowcase(comp)
791  call lowcase(subcomp)
792 
793  ! build suffix
794  suffix = varname
795  call lowcase(suffix)
796  if (layer > 0) then
797  write (suffix, '(a,i0)') trim(suffix)//'.l', layer
798  end if
799  suffix = trim(suffix)//'.txt'
800 
801  ! set filename
802  filename = trim(comp)//'-'//trim(subcomp)//'.'//trim(suffix)
803 
804  ! silently create the array file
805  inunit = getunit()
806  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 720 of file IdmLogger.f90.

722  integer(I4B), pointer, intent(in) :: distype
723  character(len=*), intent(in) :: shapestr !< dfn shape string
724  logical(LGP), intent(inout) :: is_layered !< does this data represent layers
725  integer(I4B) :: export_dim
726 
727  ! initialize is_layered to false
728  is_layered = .false.
729 
730  select case (distype)
731  case (dis)
732  if (shapestr == 'NODES') then
733  export_dim = 3
734  is_layered = .true.
735  else if (shapestr == 'NCOL NROW NLAY') then
736  export_dim = 3
737  is_layered = .true.
738  else
739  export_dim = 1
740  end if
741  case (disv)
742  if (shapestr == 'NODES') then
743  export_dim = 2
744  is_layered = .true.
745  else if (shapestr == 'NCPL NLAY') then
746  export_dim = 2
747  is_layered = .true.
748  else
749  export_dim = 1
750  end if
751  case (dis2d)
752  if (shapestr == 'NODES') then
753  export_dim = 2
754  else if (shapestr == 'NCOL NROW') then
755  export_dim = 2
756  else
757  export_dim = 1
758  end if
759  case (disu, disv1d)
760  export_dim = 1
761  case default
762  export_dim = 0
763  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 530 of file IdmLogger.f90.

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

620  real(DP), dimension(:, :), contiguous, intent(in) :: p_mem !< 2d dbl array
621  character(len=*), intent(in) :: varname !< variable name
622  character(len=*), intent(in) :: mempath !< variable memory path
623  character(len=*), intent(in) :: shapestr !< dfn shape string
624  integer(I4B), intent(in) :: iout
625  integer(I4B), dimension(:), pointer, contiguous :: model_shape
626  integer(I4B), pointer :: distype
627  character(LENMEMPATH) :: input_mempath
628  character(LENCOMPONENTNAME) :: comp, subcomp
629  integer(I4B) :: i, j, inunit, export_dim
630  logical(LGP) :: is_layered
631 
632  ! set pointer to DISENUM
633  call split_mem_path(mempath, comp, subcomp)
634  input_mempath = create_mem_path(component=comp, context=idm_context)
635  call mem_setptr(distype, 'DISENUM', input_mempath)
636  call mem_setptr(model_shape, 'MODEL_SHAPE', input_mempath)
637 
638  ! set export_dim
639  export_dim = distype_export_dim(distype, shapestr, is_layered)
640 
641  select case (export_dim)
642  case (1)
643  ! write export file 1D array
644  inunit = create_export_file(varname, mempath, 0, iout)
645  do i = 1, size(p_mem, dim=2)
646  write (inunit, '(*(G0.10, " "))') (p_mem(j, i), j=1, size(p_mem, dim=1))
647  end do
648  close (inunit)
649  case (2)
650  if (is_layered) then
651  ! write layered export files 2D array
652  do i = 1, size(p_mem, dim=2)
653  inunit = create_export_file(varname, mempath, i, iout)
654  write (inunit, '(*(G0.10, " "))') (p_mem(j, i), j=1, size(p_mem, dim=1))
655  close (inunit)
656  end do
657  else
658  ! write export file 2D array
659  inunit = create_export_file(varname, mempath, 0, iout)
660  do i = 1, size(p_mem, dim=2)
661  write (inunit, '(*(G0.10, " "))') (p_mem(j, i), j=1, size(p_mem, dim=1))
662  end do
663  close (inunit)
664  end if
665  case default
666  write (errmsg, '(a,i0)') 'EXPORT unsupported dbl2d export_dim=', &
667  export_dim
668  call store_error(errmsg, .true.)
669  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 674 of file IdmLogger.f90.

677  real(DP), dimension(:, :, :), contiguous, intent(in) :: p_mem !< 2d dbl array
678  character(len=*), intent(in) :: varname !< variable name
679  character(len=*), intent(in) :: mempath !< variable memory path
680  character(len=*), intent(in) :: shapestr !< dfn shape string
681  integer(I4B), intent(in) :: iout
682  integer(I4B), dimension(:), pointer, contiguous :: model_shape
683  integer(I4B), pointer :: distype
684  character(LENMEMPATH) :: input_mempath
685  character(LENCOMPONENTNAME) :: comp, subcomp
686  integer(I4B) :: i, j, k, inunit, export_dim
687  logical(LGP) :: is_layered
688 
689  ! set pointer to DISENUM
690  call split_mem_path(mempath, comp, subcomp)
691  input_mempath = create_mem_path(component=comp, context=idm_context)
692  call mem_setptr(distype, 'DISENUM', input_mempath)
693  call mem_setptr(model_shape, 'MODEL_SHAPE', input_mempath)
694 
695  ! set export_dim
696  export_dim = distype_export_dim(distype, shapestr, is_layered)
697 
698  select case (export_dim)
699  case (3)
700  ! write export files 3D array
701  do k = 1, size(p_mem, dim=3)
702  inunit = create_export_file(varname, mempath, k, iout)
703  do i = 1, size(p_mem, dim=2)
704  write (inunit, '(*(G0.10, " "))') (p_mem(j, i, k), j=1, &
705  size(p_mem, dim=1))
706  end do
707  close (inunit)
708  end do
709  case default
710  write (errmsg, '(a,i0)') 'EXPORT unsupported dbl3d export_dim=', &
711  export_dim
712  call store_error(errmsg, .true.)
713  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 340 of file IdmLogger.f90.

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

430  integer(I4B), dimension(:, :), contiguous, intent(in) :: p_mem !< 2d dbl array
431  character(len=*), intent(in) :: varname !< variable name
432  character(len=*), intent(in) :: mempath !< variable memory path
433  character(len=*), intent(in) :: shapestr !< dfn shape string
434  integer(I4B), intent(in) :: iout
435  integer(I4B), dimension(:), pointer, contiguous :: model_shape
436  integer(I4B), pointer :: distype
437  character(LENMEMPATH) :: input_mempath
438  character(LENCOMPONENTNAME) :: comp, subcomp
439  integer(I4B) :: i, j, inunit, export_dim
440  logical(LGP) :: is_layered
441 
442  ! set pointer to DISENUM
443  call split_mem_path(mempath, comp, subcomp)
444  input_mempath = create_mem_path(component=comp, context=idm_context)
445  call mem_setptr(distype, 'DISENUM', input_mempath)
446  call mem_setptr(model_shape, 'MODEL_SHAPE', input_mempath)
447 
448  ! set export_dim
449  export_dim = distype_export_dim(distype, shapestr, is_layered)
450 
451  select case (export_dim)
452  case (1)
453  ! write export file 1D array
454  inunit = create_export_file(varname, mempath, 0, iout)
455  do i = 1, size(p_mem, dim=2)
456  write (inunit, '(*(i0, " "))') (p_mem(j, i), j=1, size(p_mem, dim=1))
457  end do
458  close (inunit)
459  case (2)
460  if (is_layered) then
461  ! write layered export files 2D array
462  do i = 1, size(p_mem, dim=2)
463  inunit = create_export_file(varname, mempath, i, iout)
464  write (inunit, '(*(i0, " "))') (p_mem(j, i), j=1, size(p_mem, dim=1))
465  close (inunit)
466  end do
467  else
468  ! write export file 2D array
469  inunit = create_export_file(varname, mempath, 0, iout)
470  do i = 1, size(p_mem, dim=2)
471  write (inunit, '(*(i0, " "))') (p_mem(j, i), j=1, size(p_mem, dim=1))
472  end do
473  close (inunit)
474  end if
475  case default
476  write (errmsg, '(a,i0)') 'EXPORT unsupported int2d export_dim=', &
477  export_dim
478  call store_error(errmsg, .true.)
479  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 484 of file IdmLogger.f90.

487  integer(I4B), dimension(:, :, :), contiguous, intent(in) :: p_mem !< 2d dbl array
488  character(len=*), intent(in) :: varname !< variable name
489  character(len=*), intent(in) :: mempath !< variable memory path
490  character(len=*), intent(in) :: shapestr !< dfn shape string
491  integer(I4B), intent(in) :: iout
492  integer(I4B), dimension(:), pointer, contiguous :: model_shape
493  integer(I4B), pointer :: distype
494  character(LENMEMPATH) :: input_mempath
495  character(LENCOMPONENTNAME) :: comp, subcomp
496  integer(I4B) :: i, j, k, inunit, export_dim
497  logical(LGP) :: is_layered
498 
499  ! set pointer to DISENUM
500  call split_mem_path(mempath, comp, subcomp)
501  input_mempath = create_mem_path(component=comp, context=idm_context)
502  call mem_setptr(distype, 'DISENUM', input_mempath)
503  call mem_setptr(model_shape, 'MODEL_SHAPE', input_mempath)
504 
505  ! set export_dim
506  export_dim = distype_export_dim(distype, shapestr, is_layered)
507 
508  select case (export_dim)
509  case (3)
510  ! write export files 3D array
511  do k = 1, size(p_mem, dim=3)
512  inunit = create_export_file(varname, mempath, k, iout)
513  do i = 1, size(p_mem, dim=2)
514  write (inunit, '(*(i0, " "))') (p_mem(j, i, k), j=1, size(p_mem, dim=1))
515  end do
516  close (inunit)
517  end do
518  case default
519  write (errmsg, '(a,i0)') 'EXPORT unsupported int3d export_dim=', &
520  export_dim
521  call store_error(errmsg, .true.)
522  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 232 of file IdmLogger.f90.

233  real(DP), intent(in) :: p_mem !< dbl scalar
234  character(len=*), intent(in) :: varname !< variable name
235  character(len=*), intent(in) :: mempath !< variable memory path
236  integer(I4B), intent(in) :: iout
237  character(len=LINELENGTH) :: description
238  if (iparamlog > 0 .and. iout > 0) then
239  description = 'Double detected'
240  write (iout, '(3x, a, ": ", a, " = ", G0)') &
241  trim(description), trim(varname), p_mem
242  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 247 of file IdmLogger.f90.

248  real(DP), dimension(:), contiguous, intent(in) :: p_mem !< 1d real array
249  character(len=*), intent(in) :: varname !< variable name
250  character(len=*), intent(in) :: mempath !< variable memory path
251  integer(I4B), intent(in) :: iout
252  real(DP) :: min_val, max_val
253  character(len=LINELENGTH) :: description
254  if (iparamlog > 0 .and. iout > 0) then
255  min_val = minval(p_mem)
256  max_val = maxval(p_mem)
257  if (min_val == max_val) then
258  description = 'Double precision 1D constant array detected'
259  write (iout, '(3x, a, ": ", a, " = ", G0)') &
260  trim(description), trim(varname), min_val
261  else
262  description = 'Double precision 1D array detected'
263  write (iout, '(3x, a, ": ", a, a, G0, a, G0)') &
264  trim(description), trim(varname), &
265  ' ranges from ', min_val, ' to ', max_val
266  end if
267  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 272 of file IdmLogger.f90.

273  real(DP), dimension(:, :), contiguous, intent(in) :: p_mem !< 2d dbl array
274  character(len=*), intent(in) :: varname !< variable name
275  character(len=*), intent(in) :: mempath !< variable memory path
276  integer(I4B), intent(in) :: iout
277  real(DP) :: min_val, max_val
278  character(len=LINELENGTH) :: description
279  if (iparamlog > 0 .and. iout > 0) then
280  min_val = minval(p_mem)
281  max_val = maxval(p_mem)
282  if (min_val == max_val) then
283  description = 'Double precision 2D constant array detected'
284  write (iout, '(3x, a, ": ", a, " = ", G0)') &
285  trim(description), trim(varname), min_val
286  else
287  description = 'Double precision 2D array detected'
288  write (iout, '(3x, a, ": ", a, a, G0, a, G0)') &
289  trim(description), trim(varname), &
290  ' ranges from ', min_val, ' to ', max_val
291  end if
292  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 297 of file IdmLogger.f90.

298  real(DP), dimension(:, :, :), contiguous, intent(in) :: p_mem !< 3d dbl array
299  character(len=*), intent(in) :: varname !< variable name
300  character(len=*), intent(in) :: mempath !< variable memory path
301  integer(I4B), intent(in) :: iout
302  real(DP) :: min_val, max_val
303  character(len=LINELENGTH) :: description
304  if (iparamlog > 0 .and. iout > 0) then
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
311  else
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
316  end if
317  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 136 of file IdmLogger.f90.

137  integer(I4B), intent(in) :: p_mem !< int scalar
138  character(len=*), intent(in) :: varname !< variable name
139  character(len=*), intent(in) :: mempath !< variable memory path
140  character(len=*), intent(in) :: datatype !< variable data type
141  integer(I4B), intent(in) :: iout
142  character(len=LINELENGTH) :: description
143  if (iparamlog > 0 .and. iout > 0) then
144  if (datatype == 'KEYWORD') then
145  description = 'Keyword detected'
146  write (iout, '(3x, a, ": ", a)') trim(description), trim(varname)
147  else
148  description = 'Integer detected'
149  write (iout, '(3x, a, ": ", a, " = ", i0)') &
150  trim(description), trim(varname), p_mem
151  end if
152  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 157 of file IdmLogger.f90.

158  integer(I4B), dimension(:), contiguous, intent(in) :: p_mem !< 1d int array
159  character(len=*), intent(in) :: varname !< variable name
160  character(len=*), intent(in) :: mempath !< variable memory path
161  integer(I4B), intent(in) :: iout
162  integer(I4B) :: min_val, max_val
163  character(len=LINELENGTH) :: description
164  if (iparamlog > 0 .and. iout > 0) then
165  min_val = minval(p_mem)
166  max_val = maxval(p_mem)
167  if (min_val == max_val) then
168  description = 'Integer 1D constant array detected'
169  write (iout, '(3x, a, ": ", a, " = ", i0)') &
170  trim(description), trim(varname), min_val
171  else
172  description = 'Integer 1D array detected'
173  write (iout, '(3x, a, ": ", a, a, i0, a, i0)') &
174  trim(description), trim(varname), &
175  ' ranges from ', min_val, ' to ', max_val
176  end if
177  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 182 of file IdmLogger.f90.

183  integer(I4B), dimension(:, :), contiguous, intent(in) :: p_mem !< 2d int array
184  character(len=*), intent(in) :: varname !< variable name
185  character(len=*), intent(in) :: mempath !< variable memory path
186  integer(I4B), intent(in) :: iout
187  integer(I4B) :: min_val, max_val
188  character(len=LINELENGTH) :: description
189  if (iparamlog > 0 .and. iout > 0) then
190  min_val = minval(p_mem)
191  max_val = maxval(p_mem)
192  if (min_val == max_val) then
193  description = 'Integer 2D constant array detected'
194  write (iout, '(3x, a, ": ", a, " = ", i0)') &
195  trim(description), trim(varname), min_val
196  else
197  description = 'Integer 2D array detected'
198  write (iout, '(3x, a, ": ", a, a, i0, a, i0)') &
199  trim(description), trim(varname), &
200  ' ranges from ', min_val, ' to ', max_val
201  end if
202  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 207 of file IdmLogger.f90.

208  integer(I4B), dimension(:, :, :), contiguous, intent(in) :: p_mem !< 3d int array
209  character(len=*), intent(in) :: varname !< variable name
210  character(len=*), intent(in) :: mempath !< variable memory path
211  integer(I4B), intent(in) :: iout
212  integer(I4B) :: min_val, max_val
213  character(len=LINELENGTH) :: description
214  if (iparamlog > 0 .and. iout > 0) then
215  min_val = minval(p_mem)
216  max_val = maxval(p_mem)
217  if (min_val == max_val) then
218  description = 'Integer 3D constant array detected'
219  write (iout, '(3x, a, ": ", a, " = ", i0)') &
220  trim(description), trim(varname), min_val
221  else
222  description = 'Integer 3D array detected'
223  write (iout, '(3x, a, ": ", a, a, i0, a, i0)') &
224  trim(description), trim(varname), &
225  ' ranges from ', min_val, ' to ', max_val
226  end if
227  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 121 of file IdmLogger.f90.

122  logical(LGP), intent(in) :: p_mem !< logical scalar
123  character(len=*), intent(in) :: varname !< variable name
124  character(len=*), intent(in) :: mempath !< variable memory path
125  integer(I4B), intent(in) :: iout
126  character(len=LINELENGTH) :: description
127  if (iparamlog > 0 .and. iout > 0) then
128  description = 'Logical detected'
129  write (iout, '(3x, a, ": ", a, " = ", l1)') &
130  trim(description), trim(varname), p_mem
131  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 322 of file IdmLogger.f90.

323  character(len=*), intent(in) :: p_mem !< pointer to str scalar
324  character(len=*), intent(in) :: varname !< variable name
325  character(len=*), intent(in) :: mempath !< variable memory path
326  integer(I4B), intent(in) :: iout
327  character(len=LINELENGTH) :: description
328  if (iparamlog > 0 .and. iout > 0) then
329  description = 'String detected'
330  write (iout, '(3x, a, ": ", a, " = ", a)') &
331  trim(description), trim(varname), trim(p_mem)
332  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,
character(len=*), intent(in), optional  detail 
)
Parameters
[in]varnamevariable name
[in]mempathvariable memory path
[in]detailadditional info (ts name or count)

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  character(len=*), intent(in), optional :: detail !< additional info (ts name or count)
95  if (iparamlog > 0 .and. iout > 0) then
96  if (is_tas) then
97  if (present(detail)) then
98  write (iout, '(3x, a, ": ", a, " (", a, ")")') &
99  'Time-array-series controlled dynamic variable detected', &
100  trim(varname), trim(detail)
101  else
102  write (iout, '(3x, a, ": ", a)') &
103  'Time-array-series controlled dynamic variable detected', &
104  trim(varname)
105  end if
106  else
107  if (present(detail)) then
108  write (iout, '(3x, a, ": ", a, " (", a, ")")') &
109  'Time-series controlled dynamic variable detected', &
110  trim(varname), trim(detail)
111  else
112  write (iout, '(3x, a, ": ", a)') &
113  'Time-series controlled dynamic variable detected', trim(varname)
114  end if
115  end if
116  end if