welltestpy.data.varlib¶
welltestpy subpackage providing flow datastructures for variables.
The following classes and functions are provided
Variable (name, value[, symbol, units, …]) |
Class for a variable. |
TimeVar (value[, symbol, units, description]) |
Variable class special for time series. |
HeadVar (value[, symbol, units, description]) |
Variable class special for groundwater head. |
TemporalVar ([value]) |
Variable class for a temporal variable. |
CoordinatesVar (lat, lon[, symbol, units, …]) |
Variable class special for coordinates. |
Observation (name, observation[, time, …]) |
Class for a observation. |
StdyObs (name, observation[, description]) |
Observation class special for steady observations. |
DrawdownObs (name, observation, time[, …]) |
Observation class special for drawdown observations. |
StdyHeadObs (name, observation[, description]) |
Observation class special for steady drawdown observations. |
TimeSeries (name, values, time[, description]) |
Time series obeservation. |
Well (name, radius, coordinates[, welldepth, …]) |
Class for a pumping-/observation-well. |
-
class
Variable
(name, value, symbol='x', units='-', description='no description')[source]¶ Bases:
object
Class for a variable.
This is a class for a physical variable which is either a scalar or an array.
It has a name, a value, a symbol, a unit and a descrition string.
Parameters: - name (
str
) – Name of the Variable. - value (
int
orfloat
ornumpy.ndarray
) – Value of the Variable. - symbole (
str
, optional) – Name of the Variable. Default:"x"
- units (
str
, optional) – Units of the Variable. Default:"-"
- description (
str
, optional) – Description of the Variable. Default:"no description"
Attributes: Methods
__call__
([value])Call a variable. save
([path, name])Save a variable to file. -
__call__
(value=None)[source]¶ Call a variable.
Here you can set a new value or you can get the value of the variable.
Parameters: - value (
int
orfloat
ornumpy.ndarray
,) – - optional – Value of the Variable. Default:
None
Returns: value – Value of the Variable.
Return type: int
orfloat
ornumpy.ndarray
- value (
-
save
(path='', name=None)[source]¶ Save a variable to file.
This writes the variable to a csv file.
Parameters: Notes
The file will get the suffix
".var"
.
-
value
¶ Value.
Type: int
orfloat
ornumpy.ndarray
- name (
-
class
TimeVar
(value, symbol='t', units='s', description='time given in seconds')[source]¶ Bases:
welltestpy.data.varlib.Variable
Variable class special for time series.
Parameters: Notes
Here the variable should be at most 1 dimensional and the name is fix set to
"time"
.Attributes: Methods
__call__
([value])Call a variable. save
([path, name])Save a variable to file.
-
class
HeadVar
(value, symbol='h', units='m', description='head given in meters')[source]¶ Bases:
welltestpy.data.varlib.Variable
Variable class special for groundwater head.
Parameters: Notes
Here the variable name is fix set to
"head"
.Attributes: Methods
__call__
([value])Call a variable. save
([path, name])Save a variable to file.
-
class
TemporalVar
(value=0.0)[source]¶ Bases:
welltestpy.data.varlib.Variable
Variable class for a temporal variable.
Parameters: - value (
int
orfloat
ornumpy.ndarray
,) – - optional – Value of the Variable. Default:
0.0
Attributes: Methods
__call__
([value])Call a variable. save
([path, name])Save a variable to file. - value (
-
class
CoordinatesVar
(lat, lon, symbol='[Lat, Lon]', units='[deg, deg]', description='Coordinates given in degree-North and degree-East')[source]¶ Bases:
welltestpy.data.varlib.Variable
Variable class special for coordinates.
Parameters: - lat (
int
orfloat
ornumpy.ndarray
) – Lateral values of the coordinates. - lon (
int
orfloat
ornumpy.ndarray
) – Longitutional values of the coordinates. - symbole (
str
, optional) – Name of the Variable. Default:"[Lat,Lon]"
- units (
str
, optional) – Units of the Variable. Default:"[deg,deg]"
- description (
str
, optional) – Description of the Variable. Default:"Coordinates given in degree-North and degree-East"
Notes
Here the variable name is fix set to
"coordinates"
.lat
andlon
should have the same shape.Attributes: Methods
__call__
([value])Call a variable. save
([path, name])Save a variable to file. - lat (
-
class
Observation
(name, observation, time=None, description='Observation')[source]¶ Bases:
object
Class for a observation.
This is a class for time-dependent observations. It has a name and a descrition.
Parameters: Attributes: Methods
__call__
([observation, time])Call a variable. reshape
()Reshape obeservations to flat array. save
([path, name])Save an observation to file. -
__call__
(observation=None, time=None)[source]¶ Call a variable.
Here you can set a new value or you can get the value of the variable.
Parameters: - observation (scalar,
numpy.ndarray
,Variable
, optional) – New Value for observation. Default:"None"
- time (scalar,
numpy.ndarray
,Variable
, optional) – New Value for time. Default:"None"
Returns: - [
tuple
of]int
orfloat
- or
numpy.ndarray
–(time, observation)
orobservation
.
- observation (scalar,
-
save
(path='', name=None)[source]¶ Save an observation to file.
This writes the observation to a csv file.
Parameters: Notes
The file will get the suffix
".obs"
.
-
info
¶ Get informations about the observation.
Here you can display informations about the observation.
-
observation
¶ Observed values of the observation.
int
orfloat
ornumpy.ndarray
-
time
¶ Time values of the observation.
int
orfloat
ornumpy.ndarray
-
value
¶ Value of the Observation.
[
tuple
of]int
orfloat
ornumpy.ndarray
-
-
class
StdyObs
(name, observation, description='Steady observation')[source]¶ Bases:
welltestpy.data.varlib.Observation
Observation class special for steady observations.
Parameters: Attributes: Methods
__call__
([observation, time])Call a variable. reshape
()Reshape obeservations to flat array. save
([path, name])Save an observation to file.
-
class
DrawdownObs
(name, observation, time, description='Drawdown observation')[source]¶ Bases:
welltestpy.data.varlib.Observation
Observation class special for drawdown observations.
Parameters: Attributes: Methods
__call__
([observation, time])Call a variable. reshape
()Reshape obeservations to flat array. save
([path, name])Save an observation to file.
-
class
StdyHeadObs
(name, observation, description='Steady State Drawdown observation')[source]¶ Bases:
welltestpy.data.varlib.Observation
Observation class special for steady drawdown observations.
Parameters: Attributes: Methods
__call__
([observation, time])Call a variable. reshape
()Reshape obeservations to flat array. save
([path, name])Save an observation to file.
-
class
TimeSeries
(name, values, time, description='Timeseries.')[source]¶ Bases:
welltestpy.data.varlib.Observation
Time series obeservation.
Parameters: Attributes: Methods
__call__
([observation, time])Call a variable. reshape
()Reshape obeservations to flat array. save
([path, name])Save an observation to file.
-
class
Well
(name, radius, coordinates, welldepth=1.0, aquiferdepth=None)[source]¶ Bases:
object
Class for a pumping-/observation-well.
This is a class for a well within a aquifer-testing campaign.
It has a name, a radius, coordinates and a depth.
Parameters: - name (
str
) – Name of the Variable. - radius (
Variable
orfloat
) – Value of the Variable. - coordinates (
Variable
ornumpy.ndarray
) – Value of the Variable. - welldepth (
Variable
orfloat
, optional) – Depth of the well. Default: 1.0 - aquiferdepth (
Variable
orfloat
, optional) – Depth of the aquifer at the well. Default:"None"
Notes
You can calculate the distance between two wells
w1
andw2
by simply calculating the differencew1 - w2
.Attributes: aquiferdepth
float
: Aquifer depth at the well.coordinates
numpy.ndarray
: Coordinates variable of the well.depth
float
: Depth of the well.info
Get informations about the variable.
pos
numpy.ndarray
: Position of the well.radius
float
: Radius of the well.welldepth
float
: Depth variable of the well.wellradius
float
: Radius variable of the well.
Methods
distance
(well)Calculate distance to the well. save
([path, name])Save a well to file. -
distance
(well)[source]¶ Calculate distance to the well.
Parameters: well ( Well
ortuple
offloat
) – Coordinates to calculate the distance to or another well.
-
save
(path='', name=None)[source]¶ Save a well to file.
This writes the variable to a csv file.
Parameters: Notes
The file will get the suffix
".wel"
.
-
coordinates
¶ Coordinates variable of the well.
Type: numpy.ndarray
-
info
¶ Get informations about the variable.
Here you can display informations about the variable.
-
pos
¶ Position of the well.
Type: numpy.ndarray
- name (