Skip to content

Commit 3598862

Browse files
authored
doc: add IMS complexity options table to readthedocs (#1941)
* add GWE and PRT to readthedocs Input Guide * add IMS complexity options table to readthedocs - updated mf6ivar.py to read LaTeX table
1 parent 01fbaa7 commit 3598862

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

.build_rtd_docs/mf6io.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,26 @@ Groundwater Transport
4545
_mf6io/gwt-*
4646

4747

48+
Groundwater Energy Transport
49+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50+
51+
.. toctree::
52+
:maxdepth: 1
53+
:glob:
54+
55+
_mf6io/gwe-*
56+
57+
58+
Particle Tracking
59+
^^^^^^^^^^^^^^^^^
60+
61+
.. toctree::
62+
:maxdepth: 1
63+
:glob:
64+
65+
_mf6io/prt-*
66+
67+
4868
Model Exchanges
4969
^^^^^^^^^^^^^^^
5070

doc/mf6io/mf6ivar/mf6ivar.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,13 @@ def md_replace(s):
494494
}
495495
for key, value in replace_dict.items():
496496
s = s.replace(key, value)
497+
498+
# delete lines
499+
delete_tuple = (r"{tabular}", r"hline")
500+
for value in delete_tuple:
501+
if value in s:
502+
s = ""
503+
497504
return s
498505

499506

@@ -802,6 +809,36 @@ def write_variables():
802809
if len(s) > 0:
803810
f.write(s)
804811

812+
# special cases
813+
if "sln-ims" in mdname:
814+
with open("../ims_table.tex", "r") as fims:
815+
lines = fims.readlines()
816+
s = "\n\n#### IMS variable values for the available complexity options\n"
817+
for line in lines:
818+
line = md_replace(line.rstrip())
819+
save_line = True
820+
if len(line) < 1:
821+
save_line = False
822+
elif line.strip().startswith("%"):
823+
save_line = False
824+
if save_line:
825+
if "Variable" in line:
826+
prepend = "\n\n"
827+
postpend = (
828+
"|----------------"
829+
+ "|----------------"
830+
+ "|----------------"
831+
+ "|----------------|\n"
832+
)
833+
else:
834+
prepend = ""
835+
postpend = ""
836+
s += f"{prepend}| {line.replace('&', '|')} |\n{postpend}"
837+
838+
if len(s) > 0:
839+
s += "\n\n"
840+
f.write(s)
841+
805842
# write markdown
806843
write_md(fmd, vardict, component, package)
807844

0 commit comments

Comments
 (0)