Skip to content

Commit

Permalink
fix: correct typos using codespell, add configuration and CI check (#233
Browse files Browse the repository at this point in the history
)

- Add a configuration and "ignore" list of words for [codespell](https://github.com/codespell-project/codespell)
- Run codespell interactively to correct typos throughout the codebase
- Add a CI check to prevent new typos from entering repo
  • Loading branch information
mwtoews authored Nov 20, 2024
1 parent aaf5c74 commit 5972bc2
Show file tree
Hide file tree
Showing 40 changed files with 69 additions and 46 deletions.
3 changes: 3 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[codespell]
skip = ./examples,*.list,*.log,*.fem,*.grb,*.png,*.jpg,*.tif
ignore-words = etc/codespell.ignore
4 changes: 4 additions & 0 deletions .github/workflows/ex-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ jobs:
- name: Format
run: ruff format . --check

- name: Check spelling
run: codespell
# add false-positives to etc/codespell.ignore

dist:
name: Build example models
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion doc/mf6examples.bib
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ @book{konikow1977
author = {Konikow, Leonard F and Grove, D.B.},
date-added = {2019-01-07 10:06:42 -0600},
date-modified = {2019-01-07 10:20:13 -0600},
series = {{U.S. Geological Survey Techniquest of Water-Resources Investigations Report 77-19, [Revised 1984], 30 p.}},
series = {{U.S. Geological Survey Techniques of Water-Resources Investigations Report 77-19, [Revised 1984], 30 p.}},
title = {Derivation of equations describing solute transport in ground water},
year = {1977},
bdsk-url-1 = {http://dx.doi.org/10.3133/wri7719}}
Expand Down
2 changes: 1 addition & 1 deletion doc/sections/ex-gwe-geotherm.tex
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ \section{Interacting Borehole Heat Exchangers in a Geothermal Setting}

\subsection{Example description}

For this example nine BHEs are arranged in a 3 $\times$ 3 configuration with a spacing of 5 $m$ from each other. The grid extent is 90 $m \times$ 60 $m$. Each BHE represents a cyclindrical source of heat with energy being added at a rate of 100 $\tfrac{W}{m}$ using the energy source loading (ESL) package. In order to better simulate the outward propagation of heat from each BHE, the discretization by vertices (DISV) grid type for both the groundwater flow (GWF) and GWE models was employed (fig~\ref{fig:ex-gwe-geotherm-grid}). Grid refinement was added around each BHE (fig~\ref{fig:ex-gwe-geotherm-grid-inset}). Grid discretization is coarsened toward the perimeter of the model grid.
For this example nine BHEs are arranged in a 3 $\times$ 3 configuration with a spacing of 5 $m$ from each other. The grid extent is 90 $m \times$ 60 $m$. Each BHE represents a cylindrical source of heat with energy being added at a rate of 100 $\tfrac{W}{m}$ using the energy source loading (ESL) package. In order to better simulate the outward propagation of heat from each BHE, the discretization by vertices (DISV) grid type for both the groundwater flow (GWF) and GWE models was employed (fig~\ref{fig:ex-gwe-geotherm-grid}). Grid refinement was added around each BHE (fig~\ref{fig:ex-gwe-geotherm-grid-inset}). Grid discretization is coarsened toward the perimeter of the model grid.

% a figure
\begin{StandardFigure}{
Expand Down
4 changes: 2 additions & 2 deletions doc/sections/ex-gwe-radial.tex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
\section{Radial Heat Transport}

% Describe source of problem
A dedicated heat transport model referred to as the groundwater energy transport (GWE) model was released with version 6.5.0 of \mf. Previously, to simulate groundwater heat transport in \mf, a user could use the groundwater solute transport model, commonly referred to as simply groundwater transport (without specifying ``solute'' transport), to mimick heat transport by using its input parameters as surrogates for heat transport parameters \citep{modflow6gwt, ma2010, langevin2008seawat}. Now, with GWE, users may specify native heat transport parameter values in the appropriate GWE package.
A dedicated heat transport model referred to as the groundwater energy transport (GWE) model was released with version 6.5.0 of \mf. Previously, to simulate groundwater heat transport in \mf, a user could use the groundwater solute transport model, commonly referred to as simply groundwater transport (without specifying ``solute'' transport), to mimic heat transport by using its input parameters as surrogates for heat transport parameters \citep{modflow6gwt, ma2010, langevin2008seawat}. Now, with GWE, users may specify native heat transport parameter values in the appropriate GWE package.

\subsection{Example description}

Expand All @@ -17,7 +17,7 @@ \subsection{Example description}
A zoomed-in view showing the refined discretization in close proximity to the BHE. Cell dimensions are sub-centimeter scale around the perimeter of the BHE. The radius of the BHE is 7.5 $cm$.}{fig:ex-gwe-radial-slow-gridinset}{../figures/ex-gwe-radial-slow-gridinset.png}
\end{StandardFigure}

Constant heads on the left and right sides of the model domain are specified such that the resulting left-to-right groundwater velocity is $1 \times 10^{-5} \tfrac{m}{s}$ (fig.~\ref{fig:ex-gwe-radial-slow-head}). The heat source located in the center of the numerical model is represented using the energy source loading (ESL) package with a known rate of energy input [refered to as a Dirichlet boundary condition in \cite{alKhoury2020}]. The initial temperature throughout the model domain is 0.0 $^{\circ}C$. Energy is added to the grid cell in the middle of the model domain at a rate of 100 $\tfrac{W}{m}$. Parameters used for the \mf simulation of the heat transport problem that uses a radially-symmetric grid are shown in table~\ref{tab:ex-gwe-radial-01}.
Constant heads on the left and right sides of the model domain are specified such that the resulting left-to-right groundwater velocity is $1 \times 10^{-5} \tfrac{m}{s}$ (fig.~\ref{fig:ex-gwe-radial-slow-head}). The heat source located in the center of the numerical model is represented using the energy source loading (ESL) package with a known rate of energy input [referred to as a Dirichlet boundary condition in \cite{alKhoury2020}]. The initial temperature throughout the model domain is 0.0 $^{\circ}C$. Energy is added to the grid cell in the middle of the model domain at a rate of 100 $\tfrac{W}{m}$. Parameters used for the \mf simulation of the heat transport problem that uses a radially-symmetric grid are shown in table~\ref{tab:ex-gwe-radial-01}.

% add static parameter table(s)
\input{../tables/ex-gwe-radial-01}
Expand Down
2 changes: 1 addition & 1 deletion doc/sections/ex-gwf-csub-p02.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ \section{Delay Interbed Drainage}

\subsection{Theory}

The equilibration of hydraulic heads in thick interbeds imbedded in an aquifer system typically lags head changes in the surrounding aquifer as a result of the characteristically low vertical hydraulic conductivity of fine-grained silts and clays that constitute the interbeds. Similarly, the hydraulic gradient within the interbeds can be treated as vertical if the horizontal extents of the interbeds are much greater than their thicknesses, the delayed dissipation of unequilibrated heads within the interbeds can be described by the one-dimensional diffusion equation,
The equilibration of hydraulic heads in thick interbeds embedded in an aquifer system typically lags head changes in the surrounding aquifer as a result of the characteristically low vertical hydraulic conductivity of fine-grained silts and clays that constitute the interbeds. Similarly, the hydraulic gradient within the interbeds can be treated as vertical if the horizontal extents of the interbeds are much greater than their thicknesses, the delayed dissipation of unequilibrated heads within the interbeds can be described by the one-dimensional diffusion equation,

\begin{equation}
\frac{\partial ^2 h}{\partial z^2} = \frac{S^{\prime}_{S}}{K^{\prime}_{v}} \frac{\partial h}{\partial t},
Expand Down
2 changes: 1 addition & 1 deletion doc/sections/ex-gwf-drn-p01.tex
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ \subsection{Example Description}
An initial head of 1,050 $ft$ is specified in all model layers. Any initial head exceeding the bottom of each cell could be specified since the first stress period is steady-state.

% boundary conditions
The UZF Package was used to simulated delayed groundwater recharge through the unsaturated zone. A UZF boundary cell is simulated in every active model cell. Constant vertical hydraulic conductivity, saturated water content, initial water content, and Brooks-Corey epsilon exponent \citep{brookscorey1966} are specified for each UZF boundary cell (table~\ref{tab:ex-gwf-drn-p01-02}). The specified evapotranspiration extinction water content (table~\ref{tab:ex-gwf-drn-p01-02} is multipled by a factor of 1 in the valley lowland and 2 elsewhere.
The UZF Package was used to simulated delayed groundwater recharge through the unsaturated zone. A UZF boundary cell is simulated in every active model cell. Constant vertical hydraulic conductivity, saturated water content, initial water content, and Brooks-Corey epsilon exponent \citep{brookscorey1966} are specified for each UZF boundary cell (table~\ref{tab:ex-gwf-drn-p01-02}). The specified evapotranspiration extinction water content (table~\ref{tab:ex-gwf-drn-p01-02} is multiplied by a factor of 1 in the valley lowland and 2 elsewhere.

\input{../tables/ex-gwf-drn-p01-02}

Expand Down
2 changes: 1 addition & 1 deletion doc/sections/ex-gwf-sagehen.tex
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ \section{Sagehen UZF1 Package Problem 1}

\subsection{Example description}

For this \mf demonstration of the Sagehen model, a single model layer ranging between 53 $m$ and 899 $m$ thick is used to represent both the saturated and unsaturated zones. Spatially, 73 rows and 81 columns with uniform 90 $\times$ 90 $m$ grid cells are used to represent the watershed. The simulated period uses daily stress periods with one time-step per stress period, starting on December 1st and ending on November 30th. The first stress period is steady state, while all others are transient. Because the perimeter of the active model domain follows a topographic watershed divide, a no-flow boundary is used around the perimeter and bottom of the groundwater flow model. However, the cell hosting Sagehen Creek at its exit point as well as the two adjecent cells were specified constant head cells. The specified vertical hydraulic conductivity of the unsaturated zone was set equal to the vertical hydraulic conductivity used in the node-property flow (NPF) package. The stream network is represented with 213 inter-connected stream reaches, all with a constant width of 3 $m$ and range from 30 to 114 $m$ in length.
For this \mf demonstration of the Sagehen model, a single model layer ranging between 53 $m$ and 899 $m$ thick is used to represent both the saturated and unsaturated zones. Spatially, 73 rows and 81 columns with uniform 90 $\times$ 90 $m$ grid cells are used to represent the watershed. The simulated period uses daily stress periods with one time-step per stress period, starting on December 1st and ending on November 30th. The first stress period is steady state, while all others are transient. Because the perimeter of the active model domain follows a topographic watershed divide, a no-flow boundary is used around the perimeter and bottom of the groundwater flow model. However, the cell hosting Sagehen Creek at its exit point as well as the two adjacent cells were specified constant head cells. The specified vertical hydraulic conductivity of the unsaturated zone was set equal to the vertical hydraulic conductivity used in the node-property flow (NPF) package. The stream network is represented with 213 inter-connected stream reaches, all with a constant width of 3 $m$ and range from 30 to 114 $m$ in length.

A set of infiltration factors shown in figure~\ref{fig:ex-gwf-sagehen-finfFact} tie precipitation rates to land-surface altitude to account for the orographically-driven variations in precipitation. Infiltration factors are three times greater along the western crest of the watershed compared to the lower valley elevations near the outlet. The infiltration factors were multiplied by infiltration rates that varied daily as shown by the ``infiltration'' time series shown in figure~\ref{fig:ex-gwf-sagehen-uzFlow}.

Expand Down
2 changes: 1 addition & 1 deletion doc/sections/ex-gwf-sfr-p01b.tex
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ \section{Advanced Packages with MVR}
% for examples without scenarios
\subsection{Example Results}

Unlike the original UZF1 Package \citep{UZF} for MODFLOW-2005, the UZF Package for MODFLOW 6 can simulate unsaturated flow separately for each layer. Thus, rather than simulating homogenous unsaturated flow between the water table and land surface, the unsaturated zone in cells in different MODFLOW layers can be specified with different unsaturated hydraulic properties to represent vertical heterogeneity. Results from the UZF Package are shown below for the cell at row 5, column 2, layers 1 and 2 (the infiltration is shown for the cell in layer 1 while the recharge occurs in layer 2. The moisture content is for the cell located in layer 1). The unsaturated-zone package is ideal for simulating the delay between when water infiltrates at land-surface and recharges the saturated zone.
Unlike the original UZF1 Package \citep{UZF} for MODFLOW-2005, the UZF Package for MODFLOW 6 can simulate unsaturated flow separately for each layer. Thus, rather than simulating homogeneous unsaturated flow between the water table and land surface, the unsaturated zone in cells in different MODFLOW layers can be specified with different unsaturated hydraulic properties to represent vertical heterogeneity. Results from the UZF Package are shown below for the cell at row 5, column 2, layers 1 and 2 (the infiltration is shown for the cell in layer 1 while the recharge occurs in layer 2. The moisture content is for the cell located in layer 1). The unsaturated-zone package is ideal for simulating the delay between when water infiltrates at land-surface and recharges the saturated zone.

% a figure
\begin{StandardFigure}
Expand Down
2 changes: 1 addition & 1 deletion doc/sections/ex-gwt-mt3dms-p01.tex
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ \subsection{Example Results}
{fig:ex-gwt-mt3dms-p01a}{../figures/ex-gwt-mt3dms-p01a.png}
\end{StandardFigure}

A comparison of MT3DMS and \mf for scenario 2 in the MT3DMS manual represents a more common situation whereby dispersion acts to spread or smooth the advancing concentration front. For this problem, the dispersion term $\alpha_L$ is set equal to the length of the grid cell in the direction of flow, 10 cm, resulting in a Peclet number equal to one ($P_e$ = $v\Delta x/D_{xx} = 10/10 = 1$). Owing to the presense of dispersion, the finite-difference solutions employed by both MT3DMS and \mf for this problem are more accurate, and as a result are in closer agreement (figure \ref{fig:ex-gwt-mt3dms-p01b}).
A comparison of MT3DMS and \mf for scenario 2 in the MT3DMS manual represents a more common situation whereby dispersion acts to spread or smooth the advancing concentration front. For this problem, the dispersion term $\alpha_L$ is set equal to the length of the grid cell in the direction of flow, 10 cm, resulting in a Peclet number equal to one ($P_e$ = $v\Delta x/D_{xx} = 10/10 = 1$). Owing to the presence of dispersion, the finite-difference solutions employed by both MT3DMS and \mf for this problem are more accurate, and as a result are in closer agreement (figure \ref{fig:ex-gwt-mt3dms-p01b}).

% a figure
\begin{StandardFigure}
Expand Down
4 changes: 2 additions & 2 deletions doc/sections/ex-gwt-mt3dms-p04.tex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\section{MT3DMS Problem 4}

The third demonstrated MT3DMS-\mf transport comparson is for a two-dimensional transport in a diagonal flow field. This problem is similar to the preceding problem with two important changes. First, the flow direction is now oriented at a 45-degree angle relative to rows and columns of the numerical grid. Owing the use of MT3DMS for comparison, the \mf solution uses the traditional DIS package (not DISU or DISV). The second notable change is that the number of rows and columns has been expanded in order to accomodate a longer simulation period of 1,000 days. Because of the orientation of the flow field relative to the model grid, and the sharpness of the migrating concentration front, this test problem presents a challenging set of conditions to simulate. Three scenarios test alternative advection formulations, as summarized in table~\ref{tab:ex-gwt-mt3dms-p04-scenario}
The third demonstrated MT3DMS-\mf transport comparson is for a two-dimensional transport in a diagonal flow field. This problem is similar to the preceding problem with two important changes. First, the flow direction is now oriented at a 45-degree angle relative to rows and columns of the numerical grid. Owing the use of MT3DMS for comparison, the \mf solution uses the traditional DIS package (not DISU or DISV). The second notable change is that the number of rows and columns has been expanded in order to accommodate a longer simulation period of 1,000 days. Because of the orientation of the flow field relative to the model grid, and the sharpness of the migrating concentration front, this test problem presents a challenging set of conditions to simulate. Three scenarios test alternative advection formulations, as summarized in table~\ref{tab:ex-gwt-mt3dms-p04-scenario}

% add scenario table
\input{../tables/ex-gwt-mt3dms-p04-scenario}
Expand All @@ -10,7 +10,7 @@ \section{MT3DMS Problem 4}
% add 2nd static parameter value table
\input{../tables/ex-gwt-mt3dms-p04-01}

The same analytical solution used in the previous problem can be used for this problem after applying the necessary updates to select parameters - most noteably the dispersion and porosity terms and that an inter-model comparison is drawn after 1,000 days instead of 365 days. Figure 36 in \cite{zheng1999mt3dms} shows four different solutions for this problem: (1) analytical, (2) Method of Characteristics (MOC), (3) upstream finite difference (FD), and (4) Total Variation Dimishing (TVD) or ``ULTIMATE'' scheme. Both the MOC and TVD solutions demonstrate a reasonable agreement with the analytical solution. However, the upstream finite difference solution reflects considerably more spread from simulation of too much dispersion - in this case numerical dispersion instead of hydrodynamic dispersion.
The same analytical solution used in the previous problem can be used for this problem after applying the necessary updates to select parameters - most notably the dispersion and porosity terms and that an inter-model comparison is drawn after 1,000 days instead of 365 days. Figure 36 in \cite{zheng1999mt3dms} shows four different solutions for this problem: (1) analytical, (2) Method of Characteristics (MOC), (3) upstream finite difference (FD), and (4) Total Variation Dimishing (TVD) or ``ULTIMATE'' scheme. Both the MOC and TVD solutions demonstrate a reasonable agreement with the analytical solution. However, the upstream finite difference solution reflects considerably more spread from simulation of too much dispersion - in this case numerical dispersion instead of hydrodynamic dispersion.

The \mf transport solution is compared to all three numerical solutions (FD, TVD, and MOC) presented in \cite{zheng1999mt3dms}. The first comparison shows complete agreement between MT3DMS and the \mf transport solution when the finite difference approach is applied (figure~\ref{fig:ex-gwt-mt3dms-p04a}).

Expand Down
Loading

0 comments on commit 5972bc2

Please sign in to comment.