### Install Beta Release with Pip Source: https://github.com/deltares/imod-python/blob/master/docs/installation.rst Install a specific beta release of iMOD using pip with the --pre flag. ```bash pip install --pre imod=1.0.0rc5 ``` -------------------------------- ### Run CI Tests and Examples Source: https://github.com/deltares/imod-python/blob/master/docs/developing/test-plan.rst Execute the standard test suite and documentation examples using the pixi tool. These are run automatically on code changes. ```console pixi run tests pixi run examples ``` -------------------------------- ### Install Interactive Pixi Environment Source: https://github.com/deltares/imod-python/blob/master/docs/faq/python.rst Installs a Pixi environment with ipython, ipykernel, and jupyter for interactive scripting and plotting. ```bash pixi run --environment interactive install ``` -------------------------------- ### Install iMOD with Pip Source: https://github.com/deltares/imod-python/blob/master/docs/installation.rst Use this command to install iMOD using the pip package manager. ```bash pip install imod ``` -------------------------------- ### Install Beta Release with Pixi Source: https://github.com/deltares/imod-python/blob/master/docs/installation.rst Install a specific beta release of iMOD using pixi. This involves configuring a channel and then adding the specific version. ```bash pixi config prepend default-channels "conda-forge/label/imod_rc" pixi add imod=1.0.0rc5 ``` -------------------------------- ### Test Offline Installation with iMODforge Source: https://github.com/deltares/imod-python/blob/master/docs/developing/test-plan.rst Validate iMOD Python functionality on an air-gapped system using the iMODforge distribution. This example avoids internet-dependent modules like imod.data. ```console python ``ex01_twri.py`` ``` -------------------------------- ### Start Interactive Pixi Shell Source: https://github.com/deltares/imod-python/blob/master/docs/faq/python.rst Starts the interactive shell for the environment configured for interactive use. ```bash pixi shell --environment interactive ``` -------------------------------- ### Install Latest Development Version with Pixi Source: https://github.com/deltares/imod-python/blob/master/docs/installation.rst Clone the repository and use pixi to install the latest development version. This provides an environment identical to what iMOD Python developers use. ```bash git clone https://github.com/Deltares/imod-python.git cd imod-python pixi install ``` -------------------------------- ### Install Latest Development Version with Pip from GitHub Source: https://github.com/deltares/imod-python/blob/master/docs/installation.rst Alternatively, use pip to install the latest source code directly from the GitHub repository. ```bash pip install git+https://github.com/Deltares/imod-python.git ``` -------------------------------- ### Install Beta Release with Conda Source: https://github.com/deltares/imod-python/blob/master/docs/installation.rst Install a specific beta release of iMOD using conda, specifying the release channel. ```bash conda install -c conda-forge/label/imod_rc -c conda-forge imod=1.0.0rc5 ``` -------------------------------- ### Install iMOD with Conda Source: https://github.com/deltares/imod-python/blob/master/docs/installation.rst Use this command to install iMOD using the conda package manager. ```bash conda install imod ``` -------------------------------- ### Install Package from PyPI using Pixi Source: https://github.com/deltares/imod-python/blob/master/docs/faq/python.rst Use this command to install a package from PyPI when it's not available on conda channels. Ensure you have pixi installed and configured. ```bash pixi add --pypi ``` -------------------------------- ### Install Development Version of iMOD Python Source: https://github.com/deltares/imod-python/blob/master/docs/faq/python.rst Installs the latest development version of iMOD Python in editable mode after cloning the repository. ```bash activate imod git clone https://github.com/Deltares/imod-python.git cd imod-python pip install -e . ``` -------------------------------- ### Test Installation in Folder with Special Characters Source: https://github.com/deltares/imod-python/blob/master/docs/developing/test-plan.rst Verify iMOD Python installation and tests function correctly in a directory path containing curly braces, common on Windows Computational Facilities. ```console mkdir "{WCF}" cd "{WCF}" git clone https://github.com/Deltares/imod-python.git cd imod-python pixi run tests ``` -------------------------------- ### Build Docker Image Source: https://github.com/deltares/imod-python/blob/master/docs/developing/docker.rst Builds a Docker image using the specified tag and context. Ensure Docker Desktop is installed and the correct context is selected. The tag should match the Pixi version. ```console docker context use desktop-windows docker build -t windows-pixi:v0.34.0 . -m 2GB ``` -------------------------------- ### Install iMOD with Pixi Source: https://github.com/deltares/imod-python/blob/master/docs/installation.rst Use this command to add iMOD to your project when using the pixi package manager. ```bash pixi add imod ``` -------------------------------- ### Install Package with Pip Source: https://github.com/deltares/imod-python/blob/master/docs/faq/python.rst Use this command to install a package using pip, typically within a conda environment. ```bash pip install ``` -------------------------------- ### Import iMOD5 Model into iMOD Python Source: https://github.com/deltares/imod-python/blob/master/README.rst This example demonstrates how to import models created with iMOD5 into iMOD Python using a project file. It includes specifying simulation times for resampling and setting the time discretization. ```python # Open projectfile data imod5_data, period_data = imod.formats.prj.open_projectfile_data("path/to/projectfile.prj") # Specify times for the simulation, this will be used to resample iMOD5 wells # to and to set the time discretization times = [np.datetime64("2000-01-01"), np.datetime64("2000-01-02"), np.datetime64("2000-01-03")] # Create a simulation object simulation = imod.mf6.Modflow6Simulation.from_imod5_data(imod5_data, period_data, times) ``` -------------------------------- ### Run VSCode in Pixi Environment Source: https://github.com/deltares/imod-python/blob/master/docs/installation.rst Start VSCode within the current pixi environment to ensure all project dependencies are available. ```bash pixi run code ``` -------------------------------- ### Create and Activate Conda Environment for iMOD Source: https://github.com/deltares/imod-python/blob/master/docs/installation.rst Create a new conda environment named 'imodenv' and install iMOD within it. Activating the environment is necessary before running scripts. ```bash conda create -n imodenv conda install -n imodenv imod --channel conda-forge conda activate imodenv ``` -------------------------------- ### FloPy Dependencies Source: https://github.com/deltares/imod-python/blob/master/docs/faq/general.rst Lists the core dependencies required for FloPy. These are typically installed via pip. ```python install_requires = numpy >= 1.15.0 matplotlib >= 1.4.0 ``` -------------------------------- ### Solution.get_regrid_methods Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Gets the available regridding methods for Solution. ```APIDOC ## Solution.get_regrid_methods ### Description Gets the available regridding methods for Solution. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns a list of available regridding methods. ### Response Example None provided. ``` -------------------------------- ### Test Installation on Linux Source: https://github.com/deltares/imod-python/blob/master/docs/developing/test-plan.rst Ensure iMOD Python tests run without errors on a Linux environment, which is less common for users and developers. ```console git clone https://github.com/Deltares/imod-python.git cd imod-python pixi run tests ``` -------------------------------- ### Update Development Version Source: https://github.com/deltares/imod-python/blob/master/docs/faq/python.rst Fetches the latest changes from the repository after a development version has been installed. ```bash git pull ``` -------------------------------- ### Initialize Pixi Project and Add iMOD Source: https://github.com/deltares/imod-python/blob/master/docs/installation.rst Initialize a new project with pixi and add iMOD as a dependency. This sets up the project structure and lockfile. ```bash pixi init my_project cd my_project pixi add imod ``` -------------------------------- ### Build Documentation with Pixi Source: https://github.com/deltares/imod-python/blob/master/docs/developing/documentation.rst Use this Pixi command to build the documentation, ensuring all dependencies are managed. ```console pixi run --environment default docs ``` -------------------------------- ### Solution.from_file Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Creates Solution settings from a file. ```APIDOC ## Solution.from_file ### Description Creates Solution settings from a file. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns a Solution object. ### Response Example None provided. ``` -------------------------------- ### Build Documentation with Sphinx (Unix-like) Source: https://github.com/deltares/imod-python/blob/master/docs/developing/documentation.rst Run this command in the 'docs' directory to build HTML documentation using Sphinx. ```console make html ``` -------------------------------- ### Build Documentation Locally Source: https://github.com/deltares/imod-python/blob/master/docs/developing/test-plan.rst Build the project documentation locally using the pixi run docs command. This is essential for checking build errors and warnings before release. ```console pixi run docs ``` -------------------------------- ### Build Documentation with Sphinx (Windows) Source: https://github.com/deltares/imod-python/blob/master/docs/developing/documentation.rst Execute this command on Windows in the 'docs' directory to build HTML documentation using Sphinx. ```console .\make.bat html ``` -------------------------------- ### Activate User Acceptance Environment Source: https://github.com/deltares/imod-python/blob/master/docs/developing/test-plan.rst Prepare the environment for user acceptance testing by activating the specific pixi shell configuration. ```console pixi shell -e user-acceptance ``` -------------------------------- ### Solution.write Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Writes the Solution settings to files. ```APIDOC ## Solution.write ### Description Writes the Solution settings to files. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response None explicitly documented. ### Response Example None provided. ``` -------------------------------- ### Solution.to_file Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Writes the Solution settings to a file. ```APIDOC ## Solution.to_file ### Description Writes the Solution settings to a file. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response None explicitly documented. ### Response Example None provided. ``` -------------------------------- ### GroundwaterTransportModel.get_diskey Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Gets the discretization key for the GroundwaterTransportModel. ```APIDOC ## GroundwaterTransportModel.get_diskey ### Description Gets the discretization key for the GroundwaterTransportModel. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns the discretization key. ### Response Example None provided. ``` -------------------------------- ### GroundwaterFlowModel.get_diskey Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Gets the discretization key for the GroundwaterFlowModel. ```APIDOC ## GroundwaterFlowModel.get_diskey ### Description Gets the discretization key for the GroundwaterFlowModel. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns the discretization key. ### Response Example None provided. ``` -------------------------------- ### transform Source: https://github.com/deltares/imod-python/blob/master/docs/api/util.rst Gets the affine transform from a dataset. ```APIDOC ## transform ### Description Gets the affine transform from a dataset. ### Function Signature `imod.util.transform(dataset)` ### Parameters * **dataset** (xarray.Dataset) - The dataset to get the transform from. ``` -------------------------------- ### spatial_reference Source: https://github.com/deltares/imod-python/blob/master/docs/api/util.rst Gets the spatial reference from a dataset. ```APIDOC ## spatial_reference ### Description Gets the spatial reference from a dataset. ### Function Signature `imod.util.spatial_reference(dataset)` ### Parameters * **dataset** (xarray.Dataset) - The dataset to get the spatial reference from. ``` -------------------------------- ### Buoyancy.get_regrid_methods Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Gets the available regridding methods for Buoyancy. ```APIDOC ## Buoyancy.get_regrid_methods ### Description Gets the available regridding methods for Buoyancy. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns a list of available regridding methods. ### Response Example None provided. ``` -------------------------------- ### Run iMOD5 Conversion Reference Source: https://github.com/deltares/imod-python/blob/master/docs/developing/test-plan.rst Perform the iMOD5 conversion process to generate reference MODFLOW6 and MetaSWAP input files. This step must be run on a Windows machine. ```console pixi run run_imod5 ``` -------------------------------- ### ApiPackage.get_regrid_methods Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Gets the available regridding methods for ApiPackage. ```APIDOC ## ApiPackage.get_regrid_methods ### Description Gets the available regridding methods for ApiPackage. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns a list of available regridding methods. ### Response Example None provided. ``` -------------------------------- ### InitialConditions Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Represents initial conditions for the model. Supports creation from IMOD5 data, masking, regridding, clipping, writing, reading from files, copying, checking emptiness, and retrieving regridding methods. ```APIDOC ## InitialConditions ### Description Represents initial conditions for the model. Supports creation from IMOD5 data, masking, regridding, clipping, writing, reading from files, copying, checking emptiness, and retrieving regridding methods. ### Methods - **from_imod5_data**: Creates an InitialConditions object from IMOD5 data. - **mask**: Applies a mask to the initial conditions data. - **regrid_like**: Regrids the initial conditions data to match another dataset. - **clip_box**: Clips the initial conditions data to a specified bounding box. - **write**: Writes the initial conditions data to a file. - **from_file**: Reads initial conditions data from a file. - **to_file**: Writes the initial conditions data to a file. - **copy**: Creates a copy of the InitialConditions object. - **is_empty**: Checks if the initial conditions data is empty. - **get_regrid_methods**: Retrieves available regridding methods. ``` -------------------------------- ### OutputControl.get_regrid_methods Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Gets the available regridding methods for OutputControl. ```APIDOC ## OutputControl.get_regrid_methods ### Description Gets the available regridding methods for OutputControl. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns a list of available regridding methods. ### Response Example None provided. ``` -------------------------------- ### ApiPackage.from_file Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Creates ApiPackage settings from a file. ```APIDOC ## ApiPackage.from_file ### Description Creates ApiPackage settings from a file. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns an ApiPackage object. ### Response Example None provided. ``` -------------------------------- ### AdaptiveTimeStepping.get_regrid_methods Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Gets the available regridding methods for AdaptiveTimeStepping. ```APIDOC ## AdaptiveTimeStepping.get_regrid_methods ### Description Gets the available regridding methods for AdaptiveTimeStepping. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns a list of available regridding methods. ### Response Example None provided. ``` -------------------------------- ### TimeDiscretization.get_regrid_methods Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Gets the available regridding methods for TimeDiscretization. ```APIDOC ## TimeDiscretization.get_regrid_methods ### Description Gets the available regridding methods for TimeDiscretization. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns a list of available regridding methods. ### Response Example None provided. ``` -------------------------------- ### OutputControl.from_file Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Creates OutputControl settings from a file. ```APIDOC ## OutputControl.from_file ### Description Creates OutputControl settings from a file. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns an OutputControl object. ### Response Example None provided. ``` -------------------------------- ### Solution.clip_box Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Clips the Solution settings to a bounding box. ```APIDOC ## Solution.clip_box ### Description Clips the Solution settings to a bounding box. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns a new Solution object clipped to the specified box. ### Response Example None provided. ``` -------------------------------- ### VerticesDiscretization.get_regrid_methods Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Gets the available regridding methods for VerticesDiscretization. ```APIDOC ## VerticesDiscretization.get_regrid_methods ### Description Gets the available regridding methods for VerticesDiscretization. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns a list of available regridding methods. ### Response Example None provided. ``` -------------------------------- ### StructuredDiscretization.get_regrid_methods Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Gets the available regridding methods for StructuredDiscretization. ```APIDOC ## StructuredDiscretization.get_regrid_methods ### Description Gets the available regridding methods for StructuredDiscretization. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns a list of available regridding methods. ### Response Example None provided. ``` -------------------------------- ### SolutionPresetSimple Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Represents a simple solution preset. ```APIDOC ## SolutionPresetSimple ### Description Represents a simple solution preset. ### Method Not applicable (class) ### Endpoint Not applicable (class) ### Parameters None explicitly documented in this section. ### Response None explicitly documented. ### Response Example None provided. ``` -------------------------------- ### Modflow6Simulation.get_models Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Gets all models from the MODFLOW 6 simulation. ```APIDOC ## Modflow6Simulation.get_models ### Description Gets all models from the MODFLOW 6 simulation. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns a list of all models in the simulation. ### Response Example None provided. ``` -------------------------------- ### coord_reference Source: https://github.com/deltares/imod-python/blob/master/docs/api/util.rst Gets the coordinate reference system from a dataset. ```APIDOC ## coord_reference ### Description Gets the coordinate reference system from a dataset. ### Function Signature `imod.util.coord_reference(dataset)` ### Parameters * **dataset** (xarray.Dataset) - The dataset to get the CRS from. ``` -------------------------------- ### Solution.is_empty Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Checks if the Solution settings are empty. ```APIDOC ## Solution.is_empty ### Description Checks if the Solution settings are empty. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns True if the settings are empty, False otherwise. ### Response Example None provided. ``` -------------------------------- ### AdaptiveTimeStepping.from_file Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Creates AdaptiveTimeStepping settings from a file. ```APIDOC ## AdaptiveTimeStepping.from_file ### Description Creates AdaptiveTimeStepping settings from a file. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns an AdaptiveTimeStepping object. ### Response Example None provided. ``` -------------------------------- ### Modflow6Simulation.get_models_of_type Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Gets all models of a specific type from the MODFLOW 6 simulation. ```APIDOC ## Modflow6Simulation.get_models_of_type ### Description Gets all models of a specific type from the MODFLOW 6 simulation. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns a list of models of the specified type. ### Response Example None provided. ``` -------------------------------- ### Modflow6Simulation.get_exchange_relationships Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Gets the exchange relationships between models in the MODFLOW 6 simulation. ```APIDOC ## Modflow6Simulation.get_exchange_relationships ### Description Gets the exchange relationships between models in the MODFLOW 6 simulation. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns information about exchange relationships. ### Response Example None provided. ``` -------------------------------- ### Buoyancy.from_file Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Creates Buoyancy settings from a file. ```APIDOC ## Buoyancy.from_file ### Description Creates Buoyancy settings from a file. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns a Buoyancy object. ### Response Example None provided. ``` -------------------------------- ### List Available Pixi Tasks Source: https://github.com/deltares/imod-python/blob/master/docs/developing/ci.rst To see a full list of available tasks defined in the `pixi.toml` file, use the `pixi task list` command. ```console pixi task list ``` -------------------------------- ### grid_boundary_xy Source: https://github.com/deltares/imod-python/blob/master/docs/api/select.rst Gets the boundary coordinates of the model grid in the XY plane. This is useful for spatial analysis and visualization. ```APIDOC ## grid_boundary_xy ### Description Gets the boundary coordinates of the model grid in the XY plane. ### Method (Not specified, likely a function call within the imod-python library) ### Parameters (Parameters not explicitly detailed in the provided text, but would typically include model data) ### Request Example (Example not provided in the source text) ### Response (Response details not provided in the source text) ``` -------------------------------- ### points_values Source: https://github.com/deltares/imod-python/blob/master/docs/api/select.rst Retrieves the values associated with specific points. This function is used to get data at discrete locations. ```APIDOC ## points_values ### Description Retrieves the values associated with specific points. ### Method (Not specified, likely a function call within the imod-python library) ### Parameters (Parameters not explicitly detailed in the provided text, but would typically include model data and point coordinates) ### Request Example (Example not provided in the source text) ### Response (Response details not provided in the source text) ``` -------------------------------- ### InitialConditionsRootzonePressureHead Source: https://github.com/deltares/imod-python/blob/master/docs/api/msw.rst Represents rootzone pressure head initial conditions for MetaSWAP. Supports regridding, clipping, initialization from iMOD5 data, and writing. ```APIDOC ## InitialConditionsRootzonePressureHead ### Description Represents rootzone pressure head initial conditions for MetaSWAP. Supports regridding, clipping, initialization from iMOD5 data, and writing. ### Methods - `regrid_like(other_grid)`: Regrids the initial conditions to match the grid of another object. - `clip_box(x_min, x_max, y_min, y_max)`: Clips the initial conditions to a specified bounding box. - `from_imod5_data(directory)`: Initializes initial conditions from iMOD5 data in the specified directory. - `get_regrid_methods()`: Retrieves available regridding methods. - `write(directory)`: Writes the initial conditions to disk. ``` -------------------------------- ### Run VSCode in Conda Environment Source: https://github.com/deltares/imod-python/blob/master/docs/installation.rst Start VSCode within the activated conda environment. This ensures that iMOD and its dependencies are accessible. ```bash code ``` -------------------------------- ### SolutionPresetModerate Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Represents a moderate solution preset. ```APIDOC ## SolutionPresetModerate ### Description Represents a moderate solution preset. ### Method Not applicable (class) ### Endpoint Not applicable (class) ### Parameters None explicitly documented in this section. ### Response None explicitly documented. ### Response Example None provided. ``` -------------------------------- ### Solution.copy Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Creates a copy of the Solution object. ```APIDOC ## Solution.copy ### Description Creates a copy of the Solution object. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns a new Solution object that is a copy of the original. ### Response Example None provided. ``` -------------------------------- ### get_upper_active_layer_number Source: https://github.com/deltares/imod-python/blob/master/docs/api/select.rst Gets the layer number of the upper active grid cells. This provides information about the vertical extent of active cells. ```APIDOC ## get_upper_active_layer_number ### Description Gets the layer number of the upper active grid cells. ### Method (Not specified, likely a function call within the imod-python library) ### Parameters (Parameters not explicitly detailed in the provided text, but would typically include model data) ### Request Example (Example not provided in the source text) ### Response (Response details not provided in the source text) ``` -------------------------------- ### get_lower_active_layer_number Source: https://github.com/deltares/imod-python/blob/master/docs/api/select.rst Gets the layer number of the lower active grid cells. This provides information about the vertical extent of active cells. ```APIDOC ## get_lower_active_layer_number ### Description Gets the layer number of the lower active grid cells. ### Method (Not specified, likely a function call within the imod-python library) ### Parameters (Parameters not explicitly detailed in the provided text, but would typically include model data) ### Request Example (Example not provided in the source text) ### Response (Response details not provided in the source text) ``` -------------------------------- ### Run User Acceptance Tests Source: https://github.com/deltares/imod-python/blob/master/docs/developing/test-plan.rst Execute the user acceptance tests, which will generate MODFLOW6 and MetaSWAP input files in specified directories. ```console pixi run user_acceptance ``` -------------------------------- ### points_indices Source: https://github.com/deltares/imod-python/blob/master/docs/api/select.rst Gets the indices of points within the model grid. This can be used to map point locations to grid cell identifiers. ```APIDOC ## points_indices ### Description Gets the indices of points within the model grid. ### Method (Not specified, likely a function call within the imod-python library) ### Parameters (Parameters not explicitly detailed in the provided text, but would typically include point coordinates and grid information) ### Request Example (Example not provided in the source text) ### Response (Response details not provided in the source text) ``` -------------------------------- ### interpolate_value_boundaries Source: https://github.com/deltares/imod-python/blob/master/docs/api/evaluate.rst Interpolates values across model boundaries. This function is useful for creating continuous datasets or for boundary condition setup. ```APIDOC ## interpolate_value_boundaries ### Description Interpolates values across model boundaries. ### Method Not applicable (Python function) ### Endpoint Not applicable (Python function) ### Parameters (Specific parameters for interpolate_value_boundaries are not detailed in the provided text, but would typically include data to interpolate and boundary information.) ### Request Example (Not applicable for Python functions) ### Response (Specific response details are not detailed in the provided text.) ``` -------------------------------- ### Run Docker Build Container Interactively Source: https://github.com/deltares/imod-python/blob/master/docs/developing/ci.rst Spin up the Docker build container interactively. This command automatically removes the container upon exit and provides an environment identical to the build server. ```console docker run --rm -it windows-pixi:latest ``` -------------------------------- ### Generate Unstructured Mesh with Pandamesh Source: https://github.com/deltares/imod-python/blob/master/docs/faq/how-do-i/unstructured.rst Generates an unstructured mesh from GeoDataFrames using the pandamesh package. Ensure pandamesh is installed via pip. ```python import geopandas as gpd import pandamesh as pm import xugrid as xu gdf = gpd.read_file("my-study-area.shp") gdf["cellsize"] = 100.0 mesher = pm.TriangleMesher(gdf) vertices, cells = mesher.generate() grid = xugrid.Ugrid2d(vertices, -1, cells) ``` -------------------------------- ### InitialConditionsEquilibrium Source: https://github.com/deltares/imod-python/blob/master/docs/api/msw.rst Represents equilibrium initial conditions for MetaSWAP. Supports regridding, clipping, initialization from iMOD5 data, and writing. ```APIDOC ## InitialConditionsEquilibrium ### Description Represents equilibrium initial conditions for MetaSWAP. Supports regridding, clipping, initialization from iMOD5 data, and writing. ### Methods - `regrid_like(other_grid)`: Regrids the initial conditions to match the grid of another object. - `clip_box(x_min, x_max, y_min, y_max)`: Clips the initial conditions to a specified bounding box. - `from_imod5_data(directory)`: Initializes initial conditions from iMOD5 data in the specified directory. - `get_regrid_methods()`: Retrieves available regridding methods. - `write(directory)`: Writes the initial conditions to disk. ``` -------------------------------- ### active_grid_boundary_xy Source: https://github.com/deltares/imod-python/blob/master/docs/api/select.rst Gets the boundary coordinates of the active cells within the model grid in the XY plane. This focuses on the relevant parts of the model domain. ```APIDOC ## active_grid_boundary_xy ### Description Gets the boundary coordinates of the active cells within the model grid in the XY plane. ### Method (Not specified, likely a function call within the imod-python library) ### Parameters (Parameters not explicitly detailed in the provided text, but would typically include model data) ### Request Example (Example not provided in the source text) ### Response (Response details not provided in the source text) ``` -------------------------------- ### InitialConditionsRegridMethod Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Settings for regridding initial conditions. ```APIDOC ## InitialConditionsRegridMethod ### Description Configuration for regridding initial conditions of the model. This ensures that the starting state of the model is correctly represented on the new grid. ### Method Not applicable (class configuration) ### Endpoint Not applicable (class configuration) ### Parameters This class likely defines how initial head, saturation, or other state variables are interpolated or aggregated. Specific parameters are not detailed in the source. ### Request Example ```json { "example": "Configuration details for InitialConditionsRegridMethod would go here" } ``` ### Response #### Success Response Configuration object for InitialConditionsRegridMethod. #### Response Example ```json { "example": "Configuration details for InitialConditionsRegridMethod" } ``` ``` -------------------------------- ### open_cbc Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Opens the Cell-by-Cell (CBC) budget file for reading simulation output. ```APIDOC ## open_cbc ### Description Opens the Cell-by-Cell (CBC) budget file for reading simulation output. ### Method Not applicable (function call) ### Endpoint Not applicable (function call) ### Parameters None explicitly documented in this section. ### Response Returns an object that allows reading budget data. ### Response Example None provided. ``` -------------------------------- ### AdaptiveTimeStepping.write Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Writes the AdaptiveTimeStepping settings to files. ```APIDOC ## AdaptiveTimeStepping.write ### Description Writes the AdaptiveTimeStepping settings to files. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response None explicitly documented. ### Response Example None provided. ``` -------------------------------- ### Get a single scalar value from a DataArray Source: https://github.com/deltares/imod-python/blob/master/docs/faq/how-do-i/modification.rst Extracts a single scalar value from a DataArray, typically after an aggregation like mean. Use `.item()` to convert the xarray scalar to a Python scalar. ```python single_value = da.mean().item() ``` -------------------------------- ### Buoyancy.write Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Writes the Buoyancy settings to files. ```APIDOC ## Buoyancy.write ### Description Writes the Buoyancy settings to files. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response None explicitly documented. ### Response Example None provided. ``` -------------------------------- ### InitialConditionsPercolation Source: https://github.com/deltares/imod-python/blob/master/docs/api/msw.rst Represents percolation initial conditions for MetaSWAP. Supports regridding, clipping, initialization from iMOD5 data, and writing. ```APIDOC ## InitialConditionsPercolation ### Description Represents percolation initial conditions for MetaSWAP. Supports regridding, clipping, initialization from iMOD5 data, and writing. ### Methods - `regrid_like(other_grid)`: Regrids the initial conditions to match the grid of another object. - `clip_box(x_min, x_max, y_min, y_max)`: Clips the initial conditions to a specified bounding box. - `from_imod5_data(directory)`: Initializes initial conditions from iMOD5 data in the specified directory. - `get_regrid_methods()`: Retrieves available regridding methods. - `write(directory)`: Writes the initial conditions to disk. ``` -------------------------------- ### Tag and Push Docker Image Source: https://github.com/deltares/imod-python/blob/master/docs/developing/docker.rst Tags the locally built Docker image with the remote repository path and then pushes it. Ensure the tags match the Pixi version defined in the Dockerfile. ```console docker tag windows-pixi:v0.34.0 containers.deltares.nl/hydrology_product_line_imod/windows-pixi:v0.34.0 docker push containers.deltares.nl/hydrology_product_line_imod/windows-pixi:v0.34.0 ``` -------------------------------- ### ConstantHead.from_file Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Creates a ConstantHead package from a file. ```APIDOC ## ConstantHead.from_file ### Description Creates a ConstantHead package from a file. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns a ConstantHead package object. ### Response Example None provided. ``` -------------------------------- ### Import IDF file Source: https://github.com/deltares/imod-python/blob/master/docs/faq/how-do-i/in-out.rst Opens a single IDF file into a DataArray. Requires the imod.idf module. ```python da = imod.idf.open("bottom_l1.idf") ``` -------------------------------- ### ConstantHead.from_imod5_shd_data Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Creates a ConstantHead package from iMOD5 SHD data. ```APIDOC ## ConstantHead.from_imod5_shd_data ### Description Creates a ConstantHead package from iMOD5 SHD data. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns a ConstantHead package object. ### Response Example None provided. ``` -------------------------------- ### GroundwaterFlowModel.prepare_wel_for_mf6 Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Prepares the WEL package for MODFLOW 6. ```APIDOC ## GroundwaterFlowModel.prepare_wel_for_mf6 ### Description Prepares the WEL package for MODFLOW 6. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response None explicitly documented. ### Response Example None provided. ``` -------------------------------- ### Create Pixi Environment Source: https://github.com/deltares/imod-python/blob/master/docs/faq/python.rst Run this command in the imod folder to create a new conda environment managed by Pixi. ```bash pixi install ``` -------------------------------- ### ApiPackage.to_file Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Writes the ApiPackage settings to a file. ```APIDOC ## ApiPackage.to_file ### Description Writes the ApiPackage settings to a file. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response None explicitly documented. ### Response Example None provided. ``` -------------------------------- ### ConstantHead.from_imod5_data Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Creates a ConstantHead package from iMOD5 data. ```APIDOC ## ConstantHead.from_imod5_data ### Description Creates a ConstantHead package from iMOD5 data. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns a ConstantHead package object. ### Response Example None provided. ``` -------------------------------- ### imod Dependencies Source: https://github.com/deltares/imod-python/blob/master/docs/faq/general.rst Lists the core dependencies for imod. Many of these have binary dependencies and may require conda or pixi for full functionality. ```python install_requires = affine dask cftime >=1 Jinja2 matplotlib numba numpy pandas pooch tqdm scipy toolz xarray >=0.15 xugrid ``` -------------------------------- ### Modflow6Simulation.from_file Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Creates a MODFLOW 6 simulation from a file. ```APIDOC ## Modflow6Simulation.from_file ### Description Creates a MODFLOW 6 simulation from a file. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns a MODFLOW 6 simulation object. ### Response Example None provided. ``` -------------------------------- ### waterbalance_barchart Source: https://github.com/deltares/imod-python/blob/master/docs/api/visualize.rst Creates a bar chart visualizing water balance for imod models. ```APIDOC ## waterbalance_barchart ### Description Creates a bar chart visualizing water balance for imod models. ### Method (Not specified, likely a Python function call) ### Endpoint (Not applicable, Python function) ### Parameters (Parameters not explicitly detailed in the provided text. Refer to the imod-python documentation for specifics.) ### Request Example (Not applicable, Python function) ### Response (Not specified, likely a plot object or display) ``` -------------------------------- ### Login to Docker Registry Source: https://github.com/deltares/imod-python/blob/master/docs/developing/docker.rst Connects to the Deltares Docker registry using your email and CLI secret. This step only needs to be performed once. ```console docker login -u <> -p <> https://containers.deltares.nl ``` -------------------------------- ### Run Unit Tests Locally Source: https://github.com/deltares/imod-python/blob/master/docs/developing/ci.rst If the unit tests fail in the CI pipeline, you can execute them locally with the `pixi run` command. ```console pixi run --environment default unittests ``` -------------------------------- ### GroundwaterTransportModel.from_file Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Creates a GroundwaterTransportModel from a file. ```APIDOC ## GroundwaterTransportModel.from_file ### Description Creates a GroundwaterTransportModel from a file. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response Returns a GroundwaterTransportModel object. ### Response Example None provided. ``` -------------------------------- ### Run MyPy Lint Locally Source: https://github.com/deltares/imod-python/blob/master/docs/developing/ci.rst If the MyPy linting step fails in the CI pipeline, you can run the same command locally using `pixi run`. ```console pixi run --environment default mypy_lint ``` -------------------------------- ### ApiPackage.write Source: https://github.com/deltares/imod-python/blob/master/docs/api/mf6.rst Writes the ApiPackage settings to files. ```APIDOC ## ApiPackage.write ### Description Writes the ApiPackage settings to files. ### Method Not applicable (method call) ### Endpoint Not applicable (method call) ### Parameters None explicitly documented in this section. ### Response None explicitly documented. ### Response Example None provided. ``` -------------------------------- ### StaticGridAnimation3D Source: https://github.com/deltares/imod-python/blob/master/docs/api/visualize.rst Creates a static 3D animation of the imod grid. ```APIDOC ## StaticGridAnimation3D ### Description Creates a static 3D animation of the imod grid. ### Method (Not specified, likely a Python class) ### Endpoint (Not applicable, Python class) ### Parameters (Parameters not explicitly detailed in the provided text. Refer to the imod-python documentation for specifics.) ### Request Example (Not applicable, Python class) ### Response (Not specified, likely an animation object) ```