MODFLOW 6  version 6.7.0.dev2
USGS Modular Hydrologic Model
TerminationEvent.f90
Go to the documentation of this file.
2  use kindmodule, only: dp, i4b, lgp
4  use errorutilmodule, only: pstop
7  implicit none
8 
9  private
10  public :: terminationeventtype
11 
13  contains
14  procedure :: get_code
15  procedure :: get_verb
16  procedure :: get_text
17  end type terminationeventtype
18 
19 contains
20 
21  function get_code(this) result(code)
22  class(terminationeventtype), intent(in) :: this
23  integer(I4B) :: code
24  code = terminate
25  end function get_code
26 
27  function get_verb(this) result(verb)
28  class(terminationeventtype), intent(in) :: this
29  character(len=:), allocatable :: verb
30  verb = 'terminated'
31  end function get_verb
32 
33  function get_text(this) result(text)
34  class(terminationeventtype), intent(in) :: this
35  character(len=:), allocatable :: text
36  character(len=LENHUGELINE) :: temp
37 
38  write (temp, '(*(G0))') &
39  'Particle from model ', this%imdl, &
40  ', package ', this%iprp, &
41  ', point ', this%irpt, &
42  ', time ', this%trelease, &
43  ' '//this%get_verb()// &
44  ' in layer ', this%ilay, &
45  ', cell ', this%icu, &
46  ', zone ', this%izone, &
47  ' at x ', this%x, &
48  ', y ', this%y, &
49  ', z ', this%z, &
50  ', time ', this%ttrack, &
51  ', period ', this%kper, &
52  ', timestep ', this%kstp, &
53  ' with status ', this%istatus
54  text = trim(adjustl(temp))
55  end function get_text
56 
57 end module terminationeventmodule
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 terminate
particle terminated
integer(i4b) function get_code(this)
character(len=:) function, allocatable get_text(this)
character(len=:) function, allocatable get_verb(this)
Base type for particle events.
Particle tracked by the PRT model.
Definition: Particle.f90:56