welltestpy.data.CoordinatesVar

class CoordinatesVar(lat, lon, symbol='[Lat,Lon]', units='[deg,deg]', description='Coordinates given in degree-North and degree-East')[source]

Bases: Variable

Variable class special for coordinates.

Parameters
  • lat (int or float or numpy.ndarray) – Lateral values of the coordinates.

  • lon (int or float or numpy.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 and lon should have the same shape.

Attributes
info

str: Info about the Variable.

label

str: String containing: symbol in units.

scalar

bool: State if the variable is of scalar type.

value

int or float or numpy.ndarray: Value.

Methods

__call__([value])

Call a variable.

save([path, name])

Save a variable to file.

__call__(value=None)

Call a variable.

Here you can set a new value or you can get the value of the variable.

Parameters
Returns

value – Value of the Variable.

Return type

int or float or numpy.ndarray

save(path='', name=None)

Save a variable to file.

This writes the variable to a csv file.

Parameters
  • path (str, optional) – Path where the variable should be saved. Default: ""

  • name (str, optional) – Name of the file. If None, the name will be generated by "Var_"+name. Default: None

Notes

The file will get the suffix ".var".

property info

Info about the Variable.

Type

str

property label

symbol in units.

Type

str

Type

String containing

property scalar

State if the variable is of scalar type.

Type

bool

property value

Value.

Type

int or float or numpy.ndarray