MODFLOW 6  version 6.7.0.dev2
USGS Modular Hydrologic Model
SubcellExitEvent.f90
Go to the documentation of this file.
2  use kindmodule, only: dp, i4b, lgp
4  use errorutilmodule, only: pstop
8  implicit none
9 
10  private
11  public :: subcellexiteventtype
12 
14  integer(I4B) :: isc ! subcell index
15  integer(I4B) :: exit_face ! face through which the particle exited
16  contains
17  procedure :: get_code
18  procedure :: get_verb
19  procedure :: get_text
20  end type subcellexiteventtype
21 
22 contains
23 
24  function get_code(this) result(code)
25  class(subcellexiteventtype), intent(in) :: this
26  integer(I4B) :: code
27  code = featexit
28  end function get_code
29 
30  function get_verb(this) result(verb)
31  class(subcellexiteventtype), intent(in) :: this
32  character(len=:), allocatable :: verb
33  verb = 'exited subcell'
34  end function get_verb
35 
36  function get_text(this) result(text)
37  class(subcellexiteventtype), intent(in) :: this
38  character(len=:), allocatable :: text
39  character(len=LENHUGELINE) :: temp
40 
41  write (temp, '(*(G0))') &
42  'Particle from model ', this%imdl, &
43  ', package ', this%iprp, &
44  ', point ', this%irpt, &
45  ', time ', this%trelease, &
46  ' '//this%get_verb()// &
47  ' in layer ', this%ilay, &
48  ', cell ', this%icu, &
49  ', subcell ', this%isc, &
50  ', zone ', this%izone, &
51  ' through face ', this%exit_face, &
52  ' at x ', this%x, &
53  ', y ', this%y, &
54  ', z ', this%z, &
55  ', time ', this%ttrack, &
56  ', period ', this%kper, &
57  ', timestep ', this%kstp, &
58  ' with status ', this%istatus
59  text = trim(adjustl(temp))
60  end function get_text
61 
62 end module subcellexiteventmodule
This module contains simulation constants.
Definition: Constants.f90:9
integer(i4b), parameter lenhugeline
maximum length of a huge line
Definition: Constants.f90:16
subroutine pstop(status, message)
Stop the program, optionally specifying an error status code.
Definition: ErrorUtil.f90:24
This module defines variable data types.
Definition: kind.f90:8
@, public featexit
particle exited a grid feature
character(len=:) function, allocatable get_verb(this)
integer(i4b) function get_code(this)
character(len=:) function, allocatable get_text(this)
Particle tracked by the PRT model.
Definition: Particle.f90:56