module gwlocs

This module contains the object GwLocs

class acequia.gwlocs.GwLocs(filedir=None, pathlist=None, filetype=None, groups=None)

Manage multiple groundwater heads series from one well location

  • filedir (str) – directory with source files

  • pathlist (list, optional) – list of sourcefile names (without path)

  • filetype (['.csv','.json'], optional) – source file type

  • groups (list, optional) – list of location names, sublists are allowed (see examples)


return list of location and heads series names

gwseries(self, loc=None)

return list of GwSeries objects


Create GwLocs object:

>>>locs = GwLocs(filedir=<jsondir>)

Return table of locations and series:

>>>tbl = locs.loctable()

Return al series for location B16D0037:

>>>gws = GwLocs.gwseries(loc=’B16D0037’)

Return list of GwSeries objects for locations in list:

>>>names = [‘B16D0037’,’B27G0237’,[‘B28D1635’,’B28B1388’],’B28B1389’]

>>>for loc in GwLocs(filedir=<jsondir>,groups=names):

print(f’{names[i]} group size is {len(gws)}’)

Explicitly iterate over locations:

>>>locs = GwLocs(filedir=<jsondir>,groups=names)

>>>for i in range(len(locs)):

gws = next(locs)

print(f’{names[i]} group size is {len(gws)}’)


Return table of source files for all series


Return list of GwSeries objects with location name <loc>


loc (str) – name of location


Return type

list of GwSeries objects


When parameter loc is a list of locations names, GwSeries objects for all these locations will be returned.