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

This module defines variable data types. More...

Functions/Subroutines

subroutine, public write_kindinfo (iout)
 Write variable data types. More...
 

Detailed Description

This module defines the precision of logical, integer, long integer, and real data types used in MODFLOW 6 and are available to all other modules.

Function/Subroutine Documentation

◆ write_kindinfo()

subroutine, public kindmodule::write_kindinfo ( integer(i4b), intent(in)  iout)

This subroutine writes the precision of logical, integer, long integer, and real data types used in MODFLOW 6.

Parameters
[in]ioutfile unit to output kind variables

Definition at line 26 of file kind.f90.

27  ! -- dummy variables
28  integer(I4B), intent(in) :: iout !< file unit to output kind variables
29  ! -- local variables
30  integer(LGP) :: ldum = 0
31  integer(I4B) :: idum = 0
32  integer(I8B) :: long_idum = 0
33  integer(DP) :: irdum = 0 ! for bit size of real variables
34  real(DP) :: rdum = 0._dp
35  !
36  ! -- write kind information
37  write (iout, '(/a)') 'Real Variables'
38  write (iout, '(2x,a,i0)') 'KIND: ', dp
39  write (iout, '(2x,a,1pg15.6)') 'TINY (smallest non-zero value): ', &
40  tiny(rdum)
41  write (iout, '(2x,a,1pg15.6)') 'HUGE (largest value): ', huge(rdum)
42  write (iout, '(2x,a,i0)') 'PRECISION: ', precision(rdum)
43  write (iout, '(2x,a,i0)') 'SIZE IN BITS: ', bit_size(irdum)
44 
45  write (iout, '(/a)') 'Integer Variables'
46  write (iout, '(2x,a,i0)') 'KIND: ', i4b
47  write (iout, '(2x,a,i0)') 'HUGE (largest value): ', huge(idum)
48  write (iout, '(2x,a,i0)') 'SIZE IN BITS: ', bit_size(idum)
49 
50  write (iout, '(/a)') 'Long Integer Variables'
51  write (iout, '(2x,a,i0)') 'KIND: ', i8b
52  write (iout, '(2x,a,i0)') 'HUGE (largest value): ', huge(long_idum)
53  write (iout, '(2x,a,i0)') 'SIZE IN BITS: ', bit_size(long_idum)
54 
55  write (iout, '(/a)') 'Logical Variables'
56  write (iout, '(2x,a,i0)') 'KIND: ', lgp
57  write (iout, '(2x,a,i0)') 'SIZE IN BITS: ', bit_size(ldum)
Here is the caller graph for this function: