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

Data Types

type  trackfiletype
 Output file containing all or some particle pathlines. More...
 

Functions/Subroutines

subroutine, public save_record (iun, particle, kper, kstp, reason, csv)
 Save a particle track record to a binary or CSV file. More...
 

Variables

character(len= *), parameter, public trackheader = 'kper,kstp,imdl,iprp,irpt,ilay,icell,izone,istatus,ireason,trelease,t,x,y,z,name'
 
character(len= *), parameter, public trackdtypes = '<i4,<i4,<i4,<i4,<i4,<i4,<i4,<i4,<i4,<i4,<f8,<f8,<f8,<f8,<f8,|S40'
 

Function/Subroutine Documentation

◆ save_record()

subroutine, public trackfilemodule::save_record ( integer(i4b), intent(in)  iun,
type(particletype), intent(in), pointer  particle,
integer(i4b), intent(in)  kper,
integer(i4b), intent(in)  kstp,
integer(i4b), intent(in)  reason,
logical(lgp), intent(in)  csv 
)

Definition at line 88 of file TrackFile.f90.

89  ! dummy
90  integer(I4B), intent(in) :: iun
91  type(ParticleType), pointer, intent(in) :: particle
92  integer(I4B), intent(in) :: kper
93  integer(I4B), intent(in) :: kstp
94  integer(I4B), intent(in) :: reason
95  logical(LGP), intent(in) :: csv
96  ! local
97  real(DP) :: x, y, z
98  integer(I4B) :: status
99 
100  ! Convert from cell-local to model coordinates if needed
101  call particle%get_model_coords(x, y, z)
102 
103  ! Set status
104  if (particle%istatus .lt. 0) then
105  status = 1
106  else
107  status = particle%istatus
108  end if
109 
110  if (csv) then
111  write (iun, '(*(G0,:,","))') &
112  kper, &
113  kstp, &
114  particle%imdl, &
115  particle%iprp, &
116  particle%irpt, &
117  particle%ilay, &
118  particle%icu, &
119  particle%izone, &
120  status, &
121  reason, &
122  particle%trelease, &
123  particle%ttrack, &
124  x, &
125  y, &
126  z, &
127  trim(adjustl(particle%name))
128  else
129  write (iun) &
130  kper, &
131  kstp, &
132  particle%imdl, &
133  particle%iprp, &
134  particle%irpt, &
135  particle%ilay, &
136  particle%icu, &
137  particle%izone, &
138  status, &
139  reason, &
140  particle%trelease, &
141  particle%ttrack, &
142  x, &
143  y, &
144  z, &
145  particle%name
146  end if
Here is the caller graph for this function:

Variable Documentation

◆ trackdtypes

character(len=*), parameter, public trackfilemodule::trackdtypes = '<i4,<i4,<i4,<i4,<i4,<i4,<i4,<i4,<i4,<i4,<f8,<f8,<f8,<f8,<f8,|S40'

Definition at line 81 of file TrackFile.f90.

81  character(len=*), parameter, public :: TRACKDTYPES = &
82  '<i4,<i4,<i4,<i4,<i4,<i4,<i4,<i4,&
83  &<i4,<i4,<f8,<f8,<f8,<f8,<f8,|S40'

◆ trackheader

character(len=*), parameter, public trackfilemodule::trackheader = 'kper,kstp,imdl,iprp,irpt,ilay,icell,izone,istatus,ireason,trelease,t,x,y,z,name'

Definition at line 77 of file TrackFile.f90.

77  character(len=*), parameter, public :: TRACKHEADER = &
78  'kper,kstp,imdl,iprp,irpt,ilay,icell,izone,&
79  &istatus,ireason,trelease,t,x,y,z,name'