From 1fa44d59dec885a5c695a13be1150122675ff92d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ruben=20Calj=C3=A9?= Date: Mon, 30 Oct 2023 17:09:49 +0100 Subject: [PATCH 1/9] replace three methods by _get_flopy_data_object --- nlmod/gwf/output.py | 73 +++++++------------------------------ nlmod/gwt/output.py | 47 +++++++++++------------- nlmod/mfoutput/mfoutput.py | 74 +++++++++++++++++++++++++++++++++++++- 3 files changed, 107 insertions(+), 87 deletions(-) diff --git a/nlmod/gwf/output.py b/nlmod/gwf/output.py index 5b271b03..3e73d86b 100644 --- a/nlmod/gwf/output.py +++ b/nlmod/gwf/output.py @@ -1,5 +1,4 @@ import logging -import os import warnings import flopy @@ -9,16 +8,20 @@ from shapely.geometry import Point from ..dims.grid import modelgrid_from_ds -from ..mfoutput.mfoutput import _get_budget_da, _get_heads_da, _get_time_index +from ..mfoutput.mfoutput import ( + _get_budget_da, + _get_heads_da, + _get_time_index, + _get_flopy_data_object, +) logger = logging.getLogger(__name__) def get_headfile(ds=None, gwf=None, fname=None, grbfile=None): - """Get modflow HeadFile object. + """Get flopy HeadFile object. - Provide one of ds, gwf or fname_hds. Not that it really matters but if - all are provided hierarchy is as follows: fname_hds > ds > gwf + Provide one of ds, gwf or fname. Parameters ---------- @@ -36,31 +39,7 @@ def get_headfile(ds=None, gwf=None, fname=None, grbfile=None): headobj : flopy.utils.HeadFile HeadFile object handle """ - msg = "Load the heads using either the ds, gwf or fname_hds" - assert ((ds is not None) + (gwf is not None) + (fname is not None)) >= 1, msg - - if fname is None: - if ds is None: - return gwf.output.head() - else: - fname = os.path.join(ds.model_ws, ds.model_name + ".hds") - # get grb file - if ds.gridtype == "vertex": - grbfile = os.path.join(ds.model_ws, ds.model_name + ".disv.grb") - elif ds.gridtype == "structured": - grbfile = os.path.join(ds.model_ws, ds.model_name + ".dis.grb") - else: - grbfile = None - - if fname is not None: - if grbfile is not None: - mg = flopy.mf6.utils.MfGrdFile(grbfile).modelgrid - else: - logger.warning(msg) - warnings.warn(msg) - mg = None - headobj = flopy.utils.HeadFile(fname, modelgrid=mg) - return headobj + return _get_flopy_data_object("head", ds, gwf, fname, grbfile) def get_heads_da( @@ -121,10 +100,9 @@ def get_heads_da( def get_cellbudgetfile(ds=None, gwf=None, fname=None, grbfile=None): - """Get modflow CellBudgetFile object. + """Get flopy CellBudgetFile object. - Provide one of ds, gwf or fname_cbc. Not that it really matters but if - all are provided hierarchy is as follows: fname_cbc > ds > gwf + Provide one of ds, gwf or fname. Parameters ---------- @@ -140,35 +118,10 @@ def get_cellbudgetfile(ds=None, gwf=None, fname=None, grbfile=None): Returns ------- - cbc : flopy.utils.CellBudgetFile + cbc : flopy.utils.HeadFile, flopy.utils.CellBudgetFile or CellBudgetFile object """ - msg = "Load the budgets using either the ds or the gwf" - assert ((ds is not None) + (gwf is not None) + (fname is not None)) == 1, msg - - if fname is None: - if ds is None: - return gwf.output.budget() - else: - fname = os.path.join(ds.model_ws, ds.model_name + ".cbc") - # get grb file - if ds.gridtype == "vertex": - grbfile = os.path.join(ds.model_ws, ds.model_name + ".disv.grb") - elif ds.gridtype == "structured": - grbfile = os.path.join(ds.model_ws, ds.model_name + ".dis.grb") - else: - grbfile = None - if fname is not None: - if grbfile is not None: - mg = flopy.mf6.utils.MfGrdFile(grbfile).modelgrid - else: - logger.error("Cannot create budget data-array without grid information.") - raise ValueError( - "Please provide grid information by passing path to the " - "binary grid file with `grbfile=`." - ) - cbc = flopy.utils.CellBudgetFile(fname, modelgrid=mg) - return cbc + return _get_flopy_data_object("budget", ds, gwf, fname, grbfile) def get_budget_da( diff --git a/nlmod/gwt/output.py b/nlmod/gwt/output.py index 87cf580d..96c5f72b 100644 --- a/nlmod/gwt/output.py +++ b/nlmod/gwt/output.py @@ -1,41 +1,36 @@ import logging -import os -import warnings -import flopy import numpy as np import xarray as xr from ..dims.layers import calculate_thickness -from ..mfoutput.mfoutput import _get_heads_da, _get_time_index +from ..mfoutput.mfoutput import _get_heads_da, _get_time_index, _get_flopy_data_object logger = logging.getLogger(__name__) def get_concentration_obj(ds=None, gwt=None, fname=None, grbfile=None): - msg = "Load the concentration using either the ds, gwt or a fname_conc" - assert ((ds is not None) + (gwt is not None) + (fname is not None)) == 1, msg + """Get flopy HeadFile object connected to the file with the concetration of cells. - if fname is None: - if ds is None: - return gwt.output.concentration() - else: - fname = os.path.join(ds.model_ws, f"{ds.model_name}_gwt.ucn") - # get grb file - if ds.gridtype == "vertex": - grbfile = os.path.join(ds.model_ws, ds.model_name + ".disv.grb") - elif ds.gridtype == "structured": - grbfile = os.path.join(ds.model_ws, ds.model_name + ".dis.grb") - else: - grbfile = None - if fname is not None: - if grbfile is not None: - mg = flopy.mf6.utils.MfGrdFile(grbfile).modelgrid - else: - logger.warning(msg) - warnings.warn(msg) - mg = None - concobj = flopy.utils.HeadFile(fname, text="concentration", modelgrid=mg) + Provide one of ds, gwf or fname. + + Parameters + ---------- + ds : xarray.Dataset, optional + model dataset, by default None + gwf : flopy.mf6.ModflowGwf, optional + groundwater flow model, by default None + fname : str, optional + path to heads file, by default None + grbfile : str + path to file containing binary grid information + + Returns + ------- + headobj : flopy.utils.HeadFile + HeadFile object handle + """ + concobj = _get_flopy_data_object("concentration", ds, gwt, fname, grbfile) return concobj diff --git a/nlmod/mfoutput/mfoutput.py b/nlmod/mfoutput/mfoutput.py index 69bc5164..7a7676fe 100644 --- a/nlmod/mfoutput/mfoutput.py +++ b/nlmod/mfoutput/mfoutput.py @@ -1,9 +1,12 @@ +import os import logging import dask import xarray as xr -from ..dims.grid import get_dims_coords_from_modelgrid +import flopy + +from ..dims.grid import get_dims_coords_from_modelgrid, modelgrid_from_ds from ..dims.resample import get_affine_mod_to_world from ..dims.time import ds_time_idx from .binaryfile import _get_binary_budget_data, _get_binary_head_data @@ -217,3 +220,72 @@ def _get_budget_da( da = _create_da(stacked_arr, modelgrid, cbcobj.get_times()) return da + + +def _get_flopy_data_object(var, ds=None, gwml=None, fname=None, grbfile=None): + """Get modflow HeadFile or CellBudgetFile object, containg heads, budgets or + concentrations + + Provide one of ds, gwf or fname. + + Parameters + ---------- + var : str + The name of the variable. Can be 'head', 'budget' or 'concentration'. + ds : xarray.Dataset, optional + model dataset, by default None + gwf : flopy.mf6.ModflowGwf, optional + groundwater flow model, by default None + fname_cbc : str, optional + path to cell budget file, by default None\ + grbfile : str, optional + path to file containing binary grid information, only needed if + fname_cbc is passed as only argument. + + Returns + ------- + flopy.utils.HeadFile or flopy.utils.CellBudgetFile + """ + if var == "head": + ml_name = "gwf" + extension = ".hds" + flopy_class = flopy.utils.HeadFile + elif var == "budget": + ml_name = "gwf" + extension = ".cbc" + flopy_class = flopy.utils.CellBudgetFile + elif var == "concentration": + ml_name = "gwt" + extension = "_gwt.ucn" + flopy_class = flopy.utils.HeadFile + else: + raise (ValueError(f"Unknown variable {var}")) + msg = f"Load the {var}s using either ds, {ml_name} or fname" + assert ((ds is not None) + (gwml is not None) + (fname is not None)) == 1, msg + if fname is None: + if ds is None: + # return gwf.output.head(), gwf.output.budget() or gwt.output.concentration() + return getattr(gwml.output, var)() + fname = os.path.join(ds.model_ws, ds.model_name + extension) + if grbfile is None: + # get grb file + if ds.gridtype == "vertex": + grbfile = os.path.join(ds.model_ws, ds.model_name + ".disv.grb") + elif ds.gridtype == "structured": + grbfile = os.path.join(ds.model_ws, ds.model_name + ".dis.grb") + else: + grbfile = None + if grbfile is not None and os.path.exists(grbfile): + mg = flopy.mf6.utils.MfGrdFile(grbfile).modelgrid + elif ds is not None: + mg = modelgrid_from_ds(ds) + else: + logger.error(f"Cannot create {var} data-array without grid information.") + raise ValueError( + "Please provide grid information by passing path to the " + "binary grid file with `grbfile=`." + ) + if isinstance(flopy_class, flopy.utils.HeadFile): + return flopy_class(fname, modelgrid=mg, text=var) + else: + return flopy_class(fname, modelgrid=mg) From 92a9a7134a74fca125bcf3626e25a9db94f1cf03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ruben=20Calj=C3=A9?= Date: Tue, 31 Oct 2023 09:56:05 +0100 Subject: [PATCH 2/9] Fix bug, imporve documentation and simplify code --- nlmod/gwt/output.py | 4 ++-- nlmod/mfoutput/mfoutput.py | 21 +++++++++------------ 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/nlmod/gwt/output.py b/nlmod/gwt/output.py index 96c5f72b..ec179a26 100644 --- a/nlmod/gwt/output.py +++ b/nlmod/gwt/output.py @@ -18,8 +18,8 @@ def get_concentration_obj(ds=None, gwt=None, fname=None, grbfile=None): ---------- ds : xarray.Dataset, optional model dataset, by default None - gwf : flopy.mf6.ModflowGwf, optional - groundwater flow model, by default None + gwt : flopy.mf6.ModflowGwt, optional + groundwater transport model, by default None fname : str, optional path to heads file, by default None grbfile : str diff --git a/nlmod/mfoutput/mfoutput.py b/nlmod/mfoutput/mfoutput.py index 7a7676fe..c053f30a 100644 --- a/nlmod/mfoutput/mfoutput.py +++ b/nlmod/mfoutput/mfoutput.py @@ -234,12 +234,12 @@ def _get_flopy_data_object(var, ds=None, gwml=None, fname=None, grbfile=None): The name of the variable. Can be 'head', 'budget' or 'concentration'. ds : xarray.Dataset, optional model dataset, by default None - gwf : flopy.mf6.ModflowGwf, optional - groundwater flow model, by default None + gwml : flopy.mf6.ModflowGwf or flopy.mf6.ModflowGwt, optional + groundwater flow or transport model, by default None fname_cbc : str, optional - path to cell budget file, by default None\ + path to cell budget file, by default None grbfile : str, optional - path to file containing binary grid information, only needed if + path to file containing binary grid information, only needed if fname_cbc is passed as only argument. Returns @@ -249,15 +249,12 @@ def _get_flopy_data_object(var, ds=None, gwml=None, fname=None, grbfile=None): if var == "head": ml_name = "gwf" extension = ".hds" - flopy_class = flopy.utils.HeadFile elif var == "budget": ml_name = "gwf" extension = ".cbc" - flopy_class = flopy.utils.CellBudgetFile elif var == "concentration": ml_name = "gwt" extension = "_gwt.ucn" - flopy_class = flopy.utils.HeadFile else: raise (ValueError(f"Unknown variable {var}")) msg = f"Load the {var}s using either ds, {ml_name} or fname" @@ -276,16 +273,16 @@ def _get_flopy_data_object(var, ds=None, gwml=None, fname=None, grbfile=None): else: grbfile = None if grbfile is not None and os.path.exists(grbfile): - mg = flopy.mf6.utils.MfGrdFile(grbfile).modelgrid + modelgrid = flopy.mf6.utils.MfGrdFile(grbfile).modelgrid elif ds is not None: - mg = modelgrid_from_ds(ds) + modelgrid = modelgrid_from_ds(ds) else: logger.error(f"Cannot create {var} data-array without grid information.") raise ValueError( "Please provide grid information by passing path to the " "binary grid file with `grbfile=`." ) - if isinstance(flopy_class, flopy.utils.HeadFile): - return flopy_class(fname, modelgrid=mg, text=var) + if var == "budget": + return flopy.utils.CellBudgetFile(fname, modelgrid=modelgrid) else: - return flopy_class(fname, modelgrid=mg) + return flopy.utils.HeadFile(fname, text=var, modelgrid=modelgrid) From 887e184c09889dd5941e41265a24937b08ff1a3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ruben=20Calj=C3=A9?= Date: Tue, 31 Oct 2023 10:17:16 +0100 Subject: [PATCH 3/9] Update mfoutput.py --- nlmod/mfoutput/mfoutput.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nlmod/mfoutput/mfoutput.py b/nlmod/mfoutput/mfoutput.py index c053f30a..f692adcc 100644 --- a/nlmod/mfoutput/mfoutput.py +++ b/nlmod/mfoutput/mfoutput.py @@ -264,14 +264,12 @@ def _get_flopy_data_object(var, ds=None, gwml=None, fname=None, grbfile=None): # return gwf.output.head(), gwf.output.budget() or gwt.output.concentration() return getattr(gwml.output, var)() fname = os.path.join(ds.model_ws, ds.model_name + extension) - if grbfile is None: + if grbfile is None and ds is not None: # get grb file if ds.gridtype == "vertex": grbfile = os.path.join(ds.model_ws, ds.model_name + ".disv.grb") elif ds.gridtype == "structured": grbfile = os.path.join(ds.model_ws, ds.model_name + ".dis.grb") - else: - grbfile = None if grbfile is not None and os.path.exists(grbfile): modelgrid = flopy.mf6.utils.MfGrdFile(grbfile).modelgrid elif ds is not None: From 4adf501a1301ff27006e840d576734b264fe8ece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ruben=20Calj=C3=A9?= Date: Tue, 31 Oct 2023 12:30:12 +0100 Subject: [PATCH 4/9] only error for budgets without grid information --- nlmod/mfoutput/mfoutput.py | 15 ++++++++++----- tests/test_015_gwf_output.py | 5 +---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/nlmod/mfoutput/mfoutput.py b/nlmod/mfoutput/mfoutput.py index f692adcc..5b6d5f7d 100644 --- a/nlmod/mfoutput/mfoutput.py +++ b/nlmod/mfoutput/mfoutput.py @@ -1,5 +1,6 @@ import os import logging +import warnings import dask import xarray as xr @@ -275,12 +276,16 @@ def _get_flopy_data_object(var, ds=None, gwml=None, fname=None, grbfile=None): elif ds is not None: modelgrid = modelgrid_from_ds(ds) else: - logger.error(f"Cannot create {var} data-array without grid information.") - raise ValueError( - "Please provide grid information by passing path to the " - "binary grid file with `grbfile=`." - ) + modelgrid = None + + msg = f"Cannot create {var} data-array without grid information." if var == "budget": + if modelgrid is None: + logger.error(msg) + raise ValueError(msg) return flopy.utils.CellBudgetFile(fname, modelgrid=modelgrid) else: + if modelgrid is None: + logger.warning(msg) + warnings.warn(msg) return flopy.utils.HeadFile(fname, text=var, modelgrid=modelgrid) diff --git a/tests/test_015_gwf_output.py b/tests/test_015_gwf_output.py index 8e31eba3..7fa41eaf 100644 --- a/tests/test_015_gwf_output.py +++ b/tests/test_015_gwf_output.py @@ -12,10 +12,7 @@ tmpdir = tempfile.gettempdir() tst_model_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "data") -grberror = ( - "Please provide grid information by passing path to the " - "binary grid file with `grbfile=`." -) +grberror = "Cannot create budget data-array without grid information." def test_create_small_model_grid_only(tmpdir, model_name="test"): From 9fee34a44d8af4f16b81c60c0267d7d55bd46547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ruben=20Calj=C3=A9?= Date: Tue, 31 Oct 2023 13:23:39 +0100 Subject: [PATCH 5/9] Last improvements of documentation --- nlmod/gwf/output.py | 8 ++++---- nlmod/gwt/output.py | 7 +++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/nlmod/gwf/output.py b/nlmod/gwf/output.py index 3e73d86b..7024c333 100644 --- a/nlmod/gwf/output.py +++ b/nlmod/gwf/output.py @@ -36,7 +36,7 @@ def get_headfile(ds=None, gwf=None, fname=None, grbfile=None): Returns ------- - headobj : flopy.utils.HeadFile + flopy.utils.HeadFile HeadFile object handle """ return _get_flopy_data_object("head", ds, gwf, fname, grbfile) @@ -72,7 +72,7 @@ def get_heads_da( Returns ------- - head_da : xarray.DataArray + da : xarray.DataArray heads data array. """ hobj = get_headfile(ds=ds, gwf=gwf, fname=fname, grbfile=grbfile) @@ -118,8 +118,8 @@ def get_cellbudgetfile(ds=None, gwf=None, fname=None, grbfile=None): Returns ------- - cbc : flopy.utils.HeadFile, flopy.utils.CellBudgetFile or - CellBudgetFile object + flopy.utils.CellBudgetFile + CellBudgetFile object handle """ return _get_flopy_data_object("budget", ds, gwf, fname, grbfile) diff --git a/nlmod/gwt/output.py b/nlmod/gwt/output.py index ec179a26..955c2061 100644 --- a/nlmod/gwt/output.py +++ b/nlmod/gwt/output.py @@ -27,11 +27,10 @@ def get_concentration_obj(ds=None, gwt=None, fname=None, grbfile=None): Returns ------- - headobj : flopy.utils.HeadFile + flopy.utils.HeadFile HeadFile object handle """ - concobj = _get_flopy_data_object("concentration", ds, gwt, fname, grbfile) - return concobj + return _get_flopy_data_object("concentration", ds, gwt, fname, grbfile) def get_concentration_da( @@ -64,7 +63,7 @@ def get_concentration_da( Returns ------- - conc_da : xarray.DataArray + da : xarray.DataArray concentration data array. """ cobj = get_concentration_obj(ds=ds, gwt=gwt, fname=fname, grbfile=grbfile) From 6226d4dc6c0dacd06f683b0b8815adf32cb9b58c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ruben=20Calj=C3=A9?= Date: Tue, 31 Oct 2023 14:28:42 +0100 Subject: [PATCH 6/9] Update pyproject.toml --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d63b685c..6d7ca77d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,8 +50,8 @@ classifiers = [ ] [project.urls] -homepage = "https://github.com/ArtesiaWater/nlmod" -repository = "https://github.com/ArtesiaWater/nlmod" +homepage = "https://github.com/gwmod/nlmod" +repository = "https://github.com/gwmod/nlmod" documentation = "https://nlmod.readthedocs.io/en/latest/" [project.optional-dependencies] From 472aae0344cdfecfc03cdddb00763af8f8f46a67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ruben=20Calj=C3=A9?= Date: Tue, 31 Oct 2023 16:04:09 +0100 Subject: [PATCH 7/9] some more replacements of ArtesiaWater to gwmod --- README.md | 6 +++--- docs/conf.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 32c5f17c..a8973062 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ -[![nlmod](https://github.com/ArtesiaWater/nlmod/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/ArtesiaWater/nlmod/actions/workflows/ci.yml) -[![Codacy Badge](https://app.codacy.com/project/badge/Grade/6fadea550ea04ea28b6ccde88fc56f35)](https://www.codacy.com/gh/ArtesiaWater/nlmod/dashboard?utm_source=github.com&utm_medium=referral&utm_content=ArtesiaWater/nlmod&utm_campaign=Badge_Grade) -[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/6fadea550ea04ea28b6ccde88fc56f35)](https://www.codacy.com/gh/ArtesiaWater/nlmod/dashboard?utm_source=github.com&utm_medium=referral&utm_content=ArtesiaWater/nlmod&utm_campaign=Badge_Coverage) +[![nlmod](https://github.com/gwmod/nlmod/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/gwmod/nlmod/actions/workflows/ci.yml) +[![Codacy Badge](https://app.codacy.com/project/badge/Grade/6fadea550ea04ea28b6ccde88fc56f35)](https://www.codacy.com/gh/gwmod/nlmod/dashboard?utm_source=github.com&utm_medium=referral&utm_content=gwmod/nlmod&utm_campaign=Badge_Grade) +[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/6fadea550ea04ea28b6ccde88fc56f35)](https://www.codacy.com/gh/gwmod/nlmod/dashboard?utm_source=github.com&utm_medium=referral&utm_content=gwmod/nlmod&utm_campaign=Badge_Coverage) [![PyPI version](https://badge.fury.io/py/nlmod.svg)](https://badge.fury.io/py/nlmod) [![Documentation Status](https://readthedocs.org/projects/nlmod/badge/?version=stable)](https://nlmod.readthedocs.io/en/stable/?badge=stable) diff --git a/docs/conf.py b/docs/conf.py index cd08b271..b2798667 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -77,7 +77,7 @@ "navigation_depth": 4, "includehidden": True, "titles_only": False, - # "github_url": "https://github.com/ArtesiaWater/nlmod", + # "github_url": "https://github.com/gwmod/nlmod", } # Add any paths that contain custom static files (such as style sheets) here, From 09d7c32123cf87de3d9f55dd73885453e760ce58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ruben=20Calj=C3=A9?= Date: Tue, 31 Oct 2023 16:20:14 +0100 Subject: [PATCH 8/9] Update codacy badges --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a8973062..2a6a0511 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ [![nlmod](https://github.com/gwmod/nlmod/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/gwmod/nlmod/actions/workflows/ci.yml) -[![Codacy Badge](https://app.codacy.com/project/badge/Grade/6fadea550ea04ea28b6ccde88fc56f35)](https://www.codacy.com/gh/gwmod/nlmod/dashboard?utm_source=github.com&utm_medium=referral&utm_content=gwmod/nlmod&utm_campaign=Badge_Grade) -[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/6fadea550ea04ea28b6ccde88fc56f35)](https://www.codacy.com/gh/gwmod/nlmod/dashboard?utm_source=github.com&utm_medium=referral&utm_content=gwmod/nlmod&utm_campaign=Badge_Coverage) +[![Codacy Badge](https://app.codacy.com/project/badge/Grade/f1797b66e98b42b294bc1c5fc233dbf3)](https://app.codacy.com/gh/gwmod/nlmod/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) +[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/f1797b66e98b42b294bc1c5fc233dbf3)](https://app.codacy.com/gh/gwmod/nlmod/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage) [![PyPI version](https://badge.fury.io/py/nlmod.svg)](https://badge.fury.io/py/nlmod) [![Documentation Status](https://readthedocs.org/projects/nlmod/badge/?version=stable)](https://nlmod.readthedocs.io/en/stable/?badge=stable) From cfa2e1452dcdba9ef5d21b754af855fb32f59c8e Mon Sep 17 00:00:00 2001 From: OnnoEbbens Date: Wed, 1 Nov 2023 13:33:04 +0100 Subject: [PATCH 9/9] fix docs typo --- nlmod/mfoutput/mfoutput.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nlmod/mfoutput/mfoutput.py b/nlmod/mfoutput/mfoutput.py index 5b6d5f7d..4f0ef27e 100644 --- a/nlmod/mfoutput/mfoutput.py +++ b/nlmod/mfoutput/mfoutput.py @@ -237,11 +237,11 @@ def _get_flopy_data_object(var, ds=None, gwml=None, fname=None, grbfile=None): model dataset, by default None gwml : flopy.mf6.ModflowGwf or flopy.mf6.ModflowGwt, optional groundwater flow or transport model, by default None - fname_cbc : str, optional - path to cell budget file, by default None + fname : str, optional + path to Head- or CellBudgetFile, by default None grbfile : str, optional - path to file containing binary grid information, only needed if - fname_cbc is passed as only argument. + path to file containing binary grid information, if None modelgrid + information is obtained from ds. By default None Returns -------