Extract Water heads in MODFLOW-NWT using FloPy

49 Views Asked by At

I am using MODFLOW-NWT using FloPy to model groundwater system. I am aiming to extract the water heads for each kper (stress period). I used this code (below) to read all heads,but not sure how to save each heads for each period and calculate the mean value as a function of space.

hds_file = "hist.bhd"
hds = bf.HeadFile(hds_file,text='head', precision='single')
print(hds)

for k in range(348):
    kper = k
    times = hds.get_times()
    head = hds.get_data(totim=times[k])   

    print(head)

I am expecting to save the heads for each stress period and how to calculate the average as a fuction of space for each model node (cell).

0

There are 0 best solutions below