MODFLOW 6  version 6.7.0.dev0
USGS Modular Hydrologic Model
GwfVscInputData.f90
Go to the documentation of this file.
2  use kindmodule, only: i4b, dp
4 
5  implicit none
6  private
7 
8  !> Data structure to transfer input configuration to the
9  !< VSC package, as opposed to reading from file
10  type, public :: gwfvscinputdatatype
11 
12  ! options
13  real(dp) :: viscref !< see VSC for description
14  ! dim
15  integer(I4B) :: nviscspecies !< see VSC for description
16  ! pkg data
17  integer(I4B), dimension(:), pointer :: ivisc => null() !< indicates if species uses linear or nonlinear relationship
18  real(dp), dimension(:), pointer, contiguous :: dviscdc => null() !< see VSC for description
19  real(dp), dimension(:), pointer, contiguous :: cviscref => null() !< see VSC for description
20  character(len=LENMODELNAME), dimension(:), allocatable :: cmodelname !< see VSC for description
21  character(len=LENAUXNAME), dimension(:), allocatable :: cauxspeciesname !< see VSC for description
22 
23  contains
24  procedure, pass(this) :: construct
25  procedure, pass(this) :: destruct
26  end type gwfvscinputdatatype
27 
28 contains
29 
30 !> @brief Allocate the input data
31 !<
32  subroutine construct(this, nviscspecies)
33  class(gwfvscinputdatatype) :: this !< the input data block
34  integer(I4B) :: nviscspecies !< the number of species
35 
36  allocate (this%ivisc(nviscspecies))
37  allocate (this%dviscdc(nviscspecies))
38  allocate (this%cviscref(nviscspecies))
39  allocate (this%cmodelname(nviscspecies))
40  allocate (this%cauxspeciesname(nviscspecies))
41 
42  end subroutine construct
43 
44  !> @brief clean up
45  !<
46  subroutine destruct(this)
47  class(gwfvscinputdatatype) :: this !< the input data block
48 
49  deallocate (this%ivisc)
50  deallocate (this%dviscdc)
51  deallocate (this%cviscref)
52  deallocate (this%cmodelname)
53  deallocate (this%cauxspeciesname)
54 
55  end subroutine destruct
56 
57 end module gwfvscinputdatamodule
This module contains simulation constants.
Definition: Constants.f90:9
integer(i4b), parameter lenmodelname
maximum length of the model name
Definition: Constants.f90:22
integer(i4b), parameter lenauxname
maximum length of a aux variable
Definition: Constants.f90:35
real(dp), parameter dzero
real constant zero
Definition: Constants.f90:65
subroutine destruct(this)
clean up
subroutine construct(this, nviscspecies)
Allocate the input data.
This module defines variable data types.
Definition: kind.f90:8
Data structure to transfer input configuration to the.