Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_specific_discharge returns discharge at the centers while position='faces' #1340

Closed
OnnoEbbens opened this issue Jan 27, 2022 · 0 comments · Fixed by #1457
Closed

get_specific_discharge returns discharge at the centers while position='faces' #1340

OnnoEbbens opened this issue Jan 27, 2022 · 0 comments · Fixed by #1457
Assignees
Milestone

Comments

@OnnoEbbens
Copy link
Contributor

When I call the function flopy.utils.postprocessing.get_specific_discharge() with position='faces' I get the discharge of the cell centers instead of the cell faces. Calling the function with position='centers' I get exactly the same results.

I tried to use this code to get the specific discharge at the cell faces:

cbcobj = flopy.utils.CellBudgetFile(os.path.join(gwf.model_ws, f"{gwf.name}.cbc"))
spdis = cbcobj.get_data(text="DATA-SPDIS")[0]
qx, qy, qz = flopy.utils.postprocessing.get_specific_discharge(spdis, gwf, position="faces")

Looking into the get_specific_discharge function I can see that the position variable is not used when vertices is a recarray. In my case spdis is a recarray.

It would be nice if the function can return the specific discharge on the cell faces when vertices is a recarray. If that is hard or impossible I think an error should be raised when calling this function with a recarray and position='faces'.

My modelgrid is a locally refined grid with type 'vertex', for all that matters.

@jdhughes-usgs jdhughes-usgs added this to the 3.3.6 milestone Jul 19, 2022
jlarsen-usgs added a commit that referenced this issue Jul 20, 2022
* update read_zone_file() to allow for extraneous text after zone arrays are read
* update get_specific_discharge(); add error for "faces" and "vertices" option

#1433
Closes #1340
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants