From dfca1d773aac2a3e1e383d98cd430b0ffd29b85e Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Fri, 21 Jul 2023 23:10:49 -0500 Subject: [PATCH 1/2] added basic pages and one example --- .gitignore | 1 + docs/Makefile | 20 +++ docs/make.bat | 35 +++++ docs/requirements.txt | 4 + docs/source/aerosol_phases/index.rst | 7 + docs/source/aerosol_representations/index.rst | 7 + docs/source/chemical_species/index.rst | 7 + docs/source/conf.py | 30 ++++ docs/source/examples/index.rst | 57 +++++++ docs/source/index.rst | 37 +++++ docs/source/mechanisms/index.rst | 7 + docs/source/reactions/arrhenius.rst | 25 +++ docs/source/reactions/index.rst | 9 ++ examples/.DS_Store | Bin 0 -> 6148 bytes examples/json/chapman/chapman.zip | Bin 0 -> 2567 bytes examples/json/chapman/config.json | 6 + examples/json/chapman/reactions.json | 148 ++++++++++++++++++ examples/json/chapman/species.json | 49 ++++++ examples/yaml/.DS_Store | Bin 0 -> 6148 bytes examples/yaml/chapman/chapman.zip | Bin 0 -> 1230 bytes examples/yaml/chapman/config.yaml | 3 + examples/yaml/chapman/reactions.yaml | 93 +++++++++++ examples/yaml/chapman/species.yaml | 28 ++++ 23 files changed, 573 insertions(+) create mode 100644 .gitignore create mode 100644 docs/Makefile create mode 100644 docs/make.bat create mode 100644 docs/requirements.txt create mode 100644 docs/source/aerosol_phases/index.rst create mode 100644 docs/source/aerosol_representations/index.rst create mode 100644 docs/source/chemical_species/index.rst create mode 100644 docs/source/conf.py create mode 100644 docs/source/examples/index.rst create mode 100644 docs/source/index.rst create mode 100644 docs/source/mechanisms/index.rst create mode 100644 docs/source/reactions/arrhenius.rst create mode 100644 docs/source/reactions/index.rst create mode 100644 examples/.DS_Store create mode 100644 examples/json/chapman/chapman.zip create mode 100644 examples/json/chapman/config.json create mode 100644 examples/json/chapman/reactions.json create mode 100644 examples/json/chapman/species.json create mode 100644 examples/yaml/.DS_Store create mode 100644 examples/yaml/chapman/chapman.zip create mode 100644 examples/yaml/chapman/config.yaml create mode 100644 examples/yaml/chapman/reactions.yaml create mode 100644 examples/yaml/chapman/species.yaml diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..51b39e72 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +docs/build \ No newline at end of file diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 00000000..d0c3cbf1 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 00000000..747ffb7b --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +if "%1" == "" goto help + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 00000000..4cb3d6ba --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,4 @@ +pydata-sphinx-theme +sphinx +sphinx-design +sphinx-tabs \ No newline at end of file diff --git a/docs/source/aerosol_phases/index.rst b/docs/source/aerosol_phases/index.rst new file mode 100644 index 00000000..6bc3dded --- /dev/null +++ b/docs/source/aerosol_phases/index.rst @@ -0,0 +1,7 @@ +############## +Aerosol Phases +############## + +.. toctree:: + :maxdepth: 2 + :caption: Contents: diff --git a/docs/source/aerosol_representations/index.rst b/docs/source/aerosol_representations/index.rst new file mode 100644 index 00000000..eb8f3858 --- /dev/null +++ b/docs/source/aerosol_representations/index.rst @@ -0,0 +1,7 @@ +###################### +Aerosol Representation +###################### + +.. toctree:: + :maxdepth: 2 + :caption: Contents: diff --git a/docs/source/chemical_species/index.rst b/docs/source/chemical_species/index.rst new file mode 100644 index 00000000..4c9ba52a --- /dev/null +++ b/docs/source/chemical_species/index.rst @@ -0,0 +1,7 @@ +################ +Chemical Species +################ + +.. toctree:: + :maxdepth: 2 + :caption: Contents: diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 00000000..c911b7de --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,30 @@ +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information +project = 'CAMP Configuration' +copyright = '2023, OpenAtmos' +author = 'OpenAtmos' +release = '0.0.0' + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = [ + 'sphinx_design', + 'sphinx_tabs.tabs', +] + +templates_path = ['_templates'] +exclude_patterns = [] + + + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = 'pydata_sphinx_theme' +html_static_path = ['_static'] \ No newline at end of file diff --git a/docs/source/examples/index.rst b/docs/source/examples/index.rst new file mode 100644 index 00000000..b2c1c00d --- /dev/null +++ b/docs/source/examples/index.rst @@ -0,0 +1,57 @@ +########## +Examples +########## + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + +Chapman +======= + +Top Level Config +---------------- + +.. tabs:: + + .. tab:: YAML + + .. literalinclude:: ../../../examples/yaml/chapman/config.yaml + :language: yaml + + .. tab:: JSON + + .. literalinclude:: ../../../examples/json/chapman/config.json + :language: json + + +Reactions +--------- + +.. tabs:: + + .. tab:: YAML + + .. literalinclude:: ../../../examples/yaml/chapman/reactions.yaml + :language: yaml + + .. tab:: JSON + + .. literalinclude:: ../../../examples/json/chapman/reactions.json + :language: json + +Species +--------- + +.. tabs:: + + .. tab:: YAML + + .. literalinclude:: ../../../examples/yaml/chapman/species.yaml + :language: yaml + + .. tab:: JSON + + .. literalinclude:: ../../../examples/json/chapman/species.json + :language: json \ No newline at end of file diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 00000000..14ad159d --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,37 @@ +.. CAMP Configuration documentation master file, created by + sphinx-quickstart on Fri Jul 21 21:05:33 2023. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +.. camp configuration documentation HTML titles +.. +.. # (over and under) for module headings +.. = for sections +.. - for subsections +.. ^ for subsubsections +.. ~ for subsubsubsections +.. " for paragraphs + +############################################## +Welcome to CAMP Configuration's documentation! +############################################## + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + aerosol_phases/index + aerosol_representations/index + chemical_species/index + examples/index + mechanisms/index + reactions/index + + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/source/mechanisms/index.rst b/docs/source/mechanisms/index.rst new file mode 100644 index 00000000..49fbd0d6 --- /dev/null +++ b/docs/source/mechanisms/index.rst @@ -0,0 +1,7 @@ +########## +Mechanisms +########## + +.. toctree:: + :maxdepth: 2 + :caption: Contents: diff --git a/docs/source/reactions/arrhenius.rst b/docs/source/reactions/arrhenius.rst new file mode 100644 index 00000000..353a2faf --- /dev/null +++ b/docs/source/reactions/arrhenius.rst @@ -0,0 +1,25 @@ +========= +Arrhenius +========= + +.. tabs:: + + .. tab:: YAML + + .. code-block:: yaml + + # Your YAML example here + key: value + array: + - item1 + - item2 + + .. tab:: JSON + + .. code-block:: json + + // Your JSON example here + { + "key": "value", + "array": ["item1", "item2"] + } \ No newline at end of file diff --git a/docs/source/reactions/index.rst b/docs/source/reactions/index.rst new file mode 100644 index 00000000..091f38ce --- /dev/null +++ b/docs/source/reactions/index.rst @@ -0,0 +1,9 @@ +######### +Reactions +######### + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + arrhenius diff --git a/examples/.DS_Store b/examples/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..408532eee4c74667467660612daee5e47a51b97c GIT binary patch literal 6148 zcmeH~&1xGl5XVQ!wvn3_d`KaewhOri;;#fkE?d`mfow?*NpW|(CfRnqGG4o;7{k(I zd+6)*(qkY`&{H3#Gt$_xYbS?r1_+Gx`q?p8`zukMUS1^IkqYww`>DQTzbn*k{BywUcI zbu8bpGFeY@TJ}Gvc4r)%jz!Dp2$fBo_D*Y^4A*?4qqymNN-+@Jk!nyB;?=cC{0 zz!wOh4av29u7gSdg2Trym-^%fSAmV|R+D*Y1@4PPUf>eK6%DFRpW}e!3KjZX2zagMuwYAHkO^!ICb84YZ?PXfHylwdw5$;GSHDA zha$YtyWuN5AX1na7(|c)qPQS6IWx6bFRM5|59|qR_uVNljOK~e&w>I1y!_7SUhwtQ z@eJ7%)WOE3p%K#TxgaDiDNidP=C?L>Xlxdq-1WKG%R5Na>r-)1x6tQFj$FLKrM$f#X1#lp@8bQ~ zw&zb~=AQivxqW+=uY732TT!1JHS3+b>~`jp5$mGBK0YhC_r(ODZ$bXT?qg6`$RkG@ zEDh+z6p?BTCU>N8AMTQ)WKgd)Iuk@Hd(B+;Uw(7u_v| z^nSAQeE74kDoIQK62s!ArTV;Q&0@W0$gYrZ72R6nnA!5kUx|Cd^mflZt8be|2j%AT zroX*&XZNz`>EVCQIo~#@tE)LQcM?xMr^c>Zj7KeRF1#ro%%>7@lfiqH$yuTQXOqLW zDe#CTZun}*sM(Yizg}9p*K|$IrwtEwWyd)5TPJ7U+5GLlw`uCaEmu!n$o>4zL%la9 zl5<5PM@DPOq(VUttq2ySB|Ei!&T6*Y5v=q}u6n&%@9NF#Z%p;~T|JkUb$pG?^^k7| z-Hbw~J<+$ZoqmNoM{~}GrEe^J4qUQ7tI4O-kn6l~OMn9B%bEgr|8K!^SI+wd*FA2( zlXxmp;gr|yDci)Arc7CR`_yX-?2Pg~_a_+fe_I?=x5n(w!`#DD--8Og^F=## zQWzN+K(U2LmdNo4N|uV)lO>)g9V{u6kx7IZcWnmr8W_BF1W~YZ4W%x^TDL(=h1G7z zl?JGGgMqh=Za^mKbzOir!hBHGgIq*|sva0v(#Xk(a5c`d7*rXdS16> z<8Po1a38<|h_r$q*)mXhhg=eZ%3&B-(s-H);T>E>9;jr-;~S6#$i4v;s4%dkF&S9N zVet(vyRal;WY2(d33C1cm3A<&q|t~4;Tb#`1yugw@ejxjWdDG2A`C2P{KbmZKX|Oe T>Lpe-kddI|tO^XEGhiM7G}9RJ literal 0 HcmV?d00001 diff --git a/examples/json/chapman/config.json b/examples/json/chapman/config.json new file mode 100644 index 00000000..2b5917a0 --- /dev/null +++ b/examples/json/chapman/config.json @@ -0,0 +1,6 @@ +{ + "camp-files": [ + "species.json", + "reactions.json" + ] +} \ No newline at end of file diff --git a/examples/json/chapman/reactions.json b/examples/json/chapman/reactions.json new file mode 100644 index 00000000..05836a73 --- /dev/null +++ b/examples/json/chapman/reactions.json @@ -0,0 +1,148 @@ +{ + "camp-data": [ + { + "type": "MECHANISM", + "name": "Chapman", + "reactions": [ + { + "type": "PHOTOLYSIS", + "scaling_factor": 1, + "reactants": { + "O2": {} + }, + "products": { + "O": { + "yield": 2 + } + } + }, + { + "type": "PHOTOLYSIS", + "scaling_factor": 1, + "reactants": { + "O3": {} + }, + "products": { + "O1D": { + "yield": 1 + }, + "O2": { + "yield": 1 + } + } + }, + { + "type": "PHOTOLYSIS", + "scaling_factor": 1, + "reactants": { + "O3": {} + }, + "products": { + "O": { + "yield": 1 + }, + "O2": { + "yield": 1 + } + } + }, + { + "type": "ARRHENIUS", + "A": 2.15e-11, + "Ea": -1.518e-21, + "B": 0, + "D": 300, + "E": 0, + "reactants": { + "O1D": { + "qty": 1 + }, + "N2": { + "qty": 1 + } + }, + "products": { + "O": { + "yield": 1 + }, + "N2": { + "yield": 1 + } + } + }, + { + "type": "ARRHENIUS", + "A": 3.3e-11, + "Ea": -7.59e-22, + "B": 0, + "D": 300, + "E": 0, + "reactants": { + "O1D": { + "qty": 1 + }, + "O2": { + "qty": 1 + } + }, + "products": { + "O": { + "yield": 1 + }, + "O2": { + "yield": 1 + } + } + }, + { + "type": "ARRHENIUS", + "A": 8e-12, + "Ea": 2.8428e-20, + "B": 0, + "D": 300, + "E": 0, + "reactants": { + "O": { + "qty": 1 + }, + "O3": { + "qty": 1 + } + }, + "products": { + "O2": { + "yield": 2 + } + } + }, + { + "type": "ARRHENIUS", + "A": 6e-34, + "Ea": 0, + "B": -2.4, + "D": 300, + "E": 0, + "reactants": { + "O": { + "qty": 1 + }, + "O2": { + "qty": 1 + }, + "M": { + "qty": 1 + } + }, + "products": { + "O3": { + "yield": 1 + }, + "M": { + "yield": 1 + } + } + } + ] + } + ] +} \ No newline at end of file diff --git a/examples/json/chapman/species.json b/examples/json/chapman/species.json new file mode 100644 index 00000000..3a60f8a9 --- /dev/null +++ b/examples/json/chapman/species.json @@ -0,0 +1,49 @@ +{ + "camp-data": [ + { + "name": "M", + "type": "CHEM_SPEC", + "tracer type": "CONSTANT" + }, + { + "name": "Ar", + "type": "CHEM_SPEC", + "absolute tolerance": 1e-12 + }, + { + "name": "CO2", + "type": "CHEM_SPEC", + "absolute tolerance": 1e-12 + }, + { + "name": "H2O", + "type": "CHEM_SPEC", + "absolute tolerance": 1e-12 + }, + { + "name": "O1D", + "type": "CHEM_SPEC", + "absolute tolerance": 1e-12 + }, + { + "name": "O", + "type": "CHEM_SPEC", + "absolute tolerance": 1e-12 + }, + { + "name": "O2", + "type": "CHEM_SPEC", + "absolute tolerance": 1e-12 + }, + { + "name": "O3", + "type": "CHEM_SPEC", + "absolute tolerance": 1e-12 + }, + { + "name": "N2", + "type": "CHEM_SPEC", + "absolute tolerance": 1e-12 + } + ] +} \ No newline at end of file diff --git a/examples/yaml/.DS_Store b/examples/yaml/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..af3a70ddb9ac10c1255ac01cfd29e609937539af GIT binary patch literal 6148 zcmeHKu}%Xq47H&WC&AE>F`qyO_Ov<{*8TvrmFUpx-NJr9*0Ep12e9&9>>^IRfdzz+ zEyd4??Iic4OJWhx#p`A!G8K^uji@w6gu|n*3lE+Ewan4Tv+Q>-v*o%SndmPLaqm~M zmMwPP$(Q{%oo%;zJCA7Ex?b(t6+G4a=JEY-f1Hm+ZN3rJZOPVYwL4ohbTAMM1Ovf9 zFz|B>;LfI0*M^~kfnXpQ_+)_RLqa2F$KJ3U9Z;nN0P-1K1U734<|N1L*c-wFQA-6{ zs(Oi`mX7h{aoMpqv~*D~KGat}6)##=$NZ^;i)O>n!9XxDWZ=@eQ{Mj%_+>_m{9#J; zf`MS*pE015dRZ^1E(MDW$>U&Fu*D8a#?z>u7gSdg2Trym-^%fO!JvO6Uoh(UB|1vdjDOaD{` z2C(h`uqhl291P1gAWX4iVqg$KGNrg6H90f2Sg$fMHwSEDru*)cY#;{FXeN65ozcDE z>#5_p=^)y+a#x$1$E~@4do?b-PkiD(v98`({M47= zWwVXW|CSD3a<`x7He-M{J4aC2lILZ>FaWt8;jdgIf0+Pfg^~P~oS&DLnU3(*Keyc} z|A81pWA)bQGoHHJ!2Sx*((~{==c9XVwa=NeflVBuOV!k-r#yRpkOl0Pw(0+-Xaj8n z*@$qnXf)^SopRc*#XzL(yWP>sMzbxf zvbzsU3VE=cS->5>tZ|jfVOKWsBR}4ibu>0Qa&#Sj7gP1=|9wkE5zjuQK(0E*h6QVi zP9EHPZQD!B#??g(D?LK;{%U=4SyH-ef|AZ-ox7i{a^&yb{I|FMw}i#Pa>fMtuGl&I zY;0GnM;>f6nOfE5aXRhP!_S)S{pZytibsBt`xe#5+@LjWcL#H99M|k=PG-$X9@j5M zoUZ(;xAfYbyxh~pa#0(XMKP+ixh#=Q=j7{1XkMeTDEC)e^EDP}KA&vo*E`H|HlP2q zcFit18>?F%tPTDyEIwdx#&2g#;^U~qh3SVc#lKaG_*bO=N{i#I!@`QCmk)2u@D7}r zbm*C}WZ9kn|9PzTP3d?kdt7#LN77&Uy?yWH56nH^;c}4Od`yG%z~HSTh$22KK}>~ZCgkJ@%1kh@q|pt@R8q1Q%-tXxK*<_8k%5vm z3@mAs1Ns!^ZW0nXvIU^DiX3R5v Date: Mon, 24 Jul 2023 10:09:17 -0500 Subject: [PATCH 2/2] ignoring mac files --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 51b39e72..4f8931c0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -docs/build \ No newline at end of file +.DS_Store +docs/build