MODFLOW 6
version 6.7.0.dev0
USGS Modular Hydrologic Model
|
Specify times for some event to occur.
Data Types | |
type | timeselecttype |
Represents a series of instants at which some event should occur. More... | |
Functions/Subroutines | |
subroutine | deallocate (this) |
Deallocate the time selection object. More... | |
subroutine | expand (this, increment) |
Expand capacity by the given amount. Resets the current slice. More... | |
subroutine | init (this) |
Initialize or clear the time selection object. More... | |
logical(lgp) function | increasing (this) |
Determine if times strictly increase. More... | |
subroutine | log (this, iout, verb) |
Show the current time selection, if any. More... | |
subroutine | select (this, t0, t1, changed) |
Select times between t0 and t1 (inclusive). More... | |
subroutine | advance (this) |
Update the selection to the current time step. More... | |
logical(lgp) function | any (this) |
Check if any times are currently selected. More... | |
integer(i4b) function | count (this) |
Return the number of times currently selected. More... | |
subroutine | sort (this) |
Sort the time selection in increasing order. More... | |
subroutine | extend (this, a) |
Extend the time selection with the given array. More... | |
subroutine timeselectmodule::advance | ( | class(timeselecttype) | this | ) |
Definition at line 197 of file TimeSelect.f90.
logical(lgp) function timeselectmodule::any | ( | class(timeselecttype) | this | ) |
Indicates whether any times are selected for the current time step.
Note that this routine does NOT indicate whether the times array has nonzero size; use the size intrinsic for that.
Definition at line 221 of file TimeSelect.f90.
integer(i4b) function timeselectmodule::count | ( | class(timeselecttype) | this | ) |
Returns the number of times selected for the current time step.
Note that this routine does NOT return the total size of the times array; use the size intrinsic for that.
Definition at line 236 of file TimeSelect.f90.
subroutine timeselectmodule::deallocate | ( | class(timeselecttype) | this | ) |
Definition at line 50 of file TimeSelect.f90.
subroutine timeselectmodule::expand | ( | class(timeselecttype) | this, |
integer(i4b), intent(in), optional | increment | ||
) |
Definition at line 56 of file TimeSelect.f90.
subroutine timeselectmodule::extend | ( | class(timeselecttype) | this, |
real(dp), dimension(:) | a | ||
) |
This routine sorts the selection after appending the elements of the given array, but users should likely still call increasing() to check for duplicate times.
Definition at line 267 of file TimeSelect.f90.
logical(lgp) function timeselectmodule::increasing | ( | class(timeselecttype) | this | ) |
Returns true if the times array strictly increases, as well as if the times array is empty, or not yet allocated. Note that this function operates on the entire times array, not the current selection. Note also that this function conducts exact comparisons; deduplication with tolerance must be done manually.
Definition at line 82 of file TimeSelect.f90.
subroutine timeselectmodule::init | ( | class(timeselecttype) | this | ) |
Definition at line 65 of file TimeSelect.f90.
subroutine timeselectmodule::log | ( | class(timeselecttype) | this, |
integer(i4b), intent(in) | iout, | ||
character(len=*), intent(in) | verb | ||
) |
this | this instance | |
[in] | iout | output unit |
[in] | verb | selection name |
Definition at line 103 of file TimeSelect.f90.
subroutine timeselectmodule::select | ( | class(timeselecttype) | this, |
real(dp), intent(in) | t0, | ||
real(dp), intent(in) | t1, | ||
logical(lgp), intent(inout), optional | changed | ||
) |
Finds and stores the index of the first time at the same instant as or following the start time, and of the last time at the same instant as or preceding the end time. Allows filtering the times for e.g. a particular stress period and time step. Array indices are assumed to start at 1. If no times are found to fall within the selection (i.e. it falls entirely between two consecutive times or beyond the time range), indices are set to [-1, -1].
The given start and end times are first checked against currently stored indices to avoid recalculating them if possible, allowing multiple consuming components (e.g., subdomain particle tracking solutions) to share the object efficiently, provided all proceed through stress periods and time steps in lockstep, i.e. they all solve any given period/step before any will proceed to the next.
Definition at line 136 of file TimeSelect.f90.
subroutine timeselectmodule::sort | ( | class(timeselecttype) | this | ) |
Note that this routine does NOT remove duplicate times. Call increasing() to check for duplicates in the array.
Definition at line 252 of file TimeSelect.f90.