Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
*~
__pycache__/
results/*.png
results/*.txt
processed_data/*.dat
.*.sw?

# ignore build output
*build/
*_build/
user_guide/doc/_build
user_guide/doc/build

# ignore VS Code files
/.idea

# ignore envs
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# UV
uv.lock
.python-version
pyproject.toml
Empty file added README.md
Empty file.
28 changes: 28 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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

REPO := $(notdir $(shell git rev-parse --show-toplevel))
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
DEPLOYDIR = $(HOME)/public_html

# 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)

deploy:
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(DEPLOYDIR)/$(REPO)/$(BRANCH)" $(SPHINXOPTS) $(O)

35 changes: 35 additions & 0 deletions doc/make.bat
Original file line number Diff line number Diff line change
@@ -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

if "%1" == "" goto help

%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
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
214 changes: 214 additions & 0 deletions doc/source/_static/jules-tweaks.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
pre {
background-color: #f2f8ff;
}

tt {
background-color: #f1f5f7;
border: 1px solid #c6c9cb;
padding: 2px 4px;
}

dt tt:only-child {
display: inline-block;
margin-bottom: 2px;
}

h1 tt,
h2 tt,
h3 tt,
h4 tt,
h5 tt,
h6 tt,
a tt,
dl.member dt tt {
border: 0;
padding: 0;
margin: 0;
}

a tt {
color: inherit;
}

p.rubric {
padding-top: 5px;
border-top: 1px solid #c6c9cb;
padding-left: 10px;
}

table.footnote {
margin: 0px 10px;
}

div.sphinxsidebar {
width: 20%;
}

div.bodywrapper {
margin: 0 0 0 20%;
}

div.sphinxsidebarwrapper {
padding-top: 10px;
}

div.sphinxsidebar p {
padding: 5px 10px;
margin-top: 0;
}

/* Namelist member formatting */
dl {
margin: 0;
}

dl > dd {
margin-top: 5px;
margin-bottom: 15px;
}

dl > dd:empty {
margin-top: 0px;
margin-bottom: 0px;
}

dl.member > dt {
font-size: 1.1em;
}

dl.member > dd {
margin-bottom: 25px;
}

dl.member > dd:empty {
margin-bottom: 0px;
}

/* Admonition stuff */
div.admonition {
padding: 7px 15px 15px;
border: 1px solid #c6c9cb;
}

div.admonition p.admonition-title {
position: relative;
top: -7px;
display: block;
background-color: #e1e5e7;
border-bottom: 1px solid #c6c9cb;
margin: -7px -15px 0px;
padding: 5px 15px;
font-size: 1.1em;
}

p.admonition-title:after {
content: "";
}

div.admonition p.admonition-title + p {
display: block;
margin-top: 5px;
}

div.admonition p.admonition-title + * {
margin-top: 5px;
}

div.admonition p.last,
div.admonition div.last,
div.admonition ul.last,
div.admonition ol.last {
margin-bottom: 0px;
}

div.admonition dl.last > dd {
margin-bottom: 0;
}

div.admonition dl.last > dd > :last-child {
margin-bottom: 0;
}

tt.descclassname {
font-weight: normal;
}

dt {
font-weight: bold;
}

div.warning {
border: 1px solid #ff5050;
}

div.warning p.admonition-title {
border-bottom: 1px solid #ff5050;
background-color: #ff8080;
}

/* Tables */
table.docutils th,
table.docutils td {
border: 1px solid #c6c9cb !important;
padding: 7px 10px;
}

table.docutils th {
background-color: #e1e5e7;
}

table.docutils td[colspan] {
background-color: #ebeff1;
font-weight: bold;
}

table.docutils td .last {
margin-bottom: 0;
}

table.docutils tr.row-odd {
background-color: #f2f8ff;
}

table.field-list {
margin-top: 5px;
}

table.field-list tr.row-odd {
background-color: transparent;
}

table.field-list th,
table.field-list td {
padding: 3px 8px 3px 5px;
}

table.field-list th {
text-align: right;
}

table.field-list td.field-body {
text-align: center;
min-width: 150px;
font-family: monospace;
}

/* Figures */
div.figure {
text-align: center;
}

div.figure p.caption {
font-weight: bold;
font-size: 0.9em;
}

div.figure p.caption:before {
content: "Figure: ";
}

div.figure img {
border: 1px solid #c6c9cb;
box-shadow: 1px 1px 1px #d8d8d8;
padding: 10px;
}
2 changes: 2 additions & 0 deletions doc/source/_templates/localtoc.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h3><a href="{{ pathto(master_doc) }}">{{ _('Table Of Contents') }}</a></h3>
{{ toctree() }}
35 changes: 35 additions & 0 deletions doc/source/building-and-running/considerations.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Considerations
==============

Depending on your use case, there are two main things that you need to consider:

Do I need NetCDF?
-----------------

`NetCDF <http://www.unidata.ucar.edu/software/netcdf/>`_ is a data format (and associated software libraries) specifically designed for large-scale scientific data. It has two major benefits over raw binary data:

1. It is machine-independent, so `endianness <http://en.wikipedia.org/wiki/Endianness>`_ is not an issue when moving datasets between machines
2. It is self-describing, so as well as containing raw data, NetCDF files also contain metadata describing the data (e.g. variable names, units, origin). Many tools are capable of exploiting this metadata to simplify processing.

JULES can be built with or without NetCDF, however *building JULES without NetCDF limits the functionality of JULES*. Without NetCDF, JULES will use a dummy NetCDF library which allows the program to build but provides no functionality. Any attempt to use NetCDF files as input with this option will result in a runtime error. All input files must be columnar ASCII, meaning that the user is restricted to running at a single point only. Output files will automatically use a columnar ASCII format with headers. File formats are discussed in more detail in :doc:`/input/overview`.


Do I need parallel processing?
------------------------------

.. note::
For running JULES at a single point, parallel processing provides no advantage. However, if JULES is already compiled with OpenMP or MPI enabled, it is still possible to run a single point by simply specifying the number of OpenMP threads and/or MPI tasks to be 1.

JULES is capable of exploiting parallel processing techniques to reduce processing time for distributed/gridded simulations. There are two different methods JULES can use:

OpenMP
`OpenMP <http://en.wikipedia.org/wiki/OpenMP>`_ is a form of compiler-assisted parallelisation that uses directives for shared-memory, loop-level parallelism across multiple cores on a machine (OpenMP is *not* capable of utilising a cluster of machines).

This form of parallelism is not as effective as MPI, but may provide some speedup and does not require a specially compiled NetCDF library.

MPI
`MPI (Message Passing Interface) <http://en.wikipedia.org/wiki/Message_Passing_Interface>`_ is a standardised message passing interface. MPI coordinates the running of multiple 'tasks' in parallel, potentially on several machines (or nodes), and provides mechanisms for these tasks to communicate with each other.

JULES takes advantage of the parallel I/O features available in `HDF5 <http://www.hdfgroup.org/HDF5/>`_ and `NetCDF4 <http://www.unidata.ucar.edu/software/netcdf/>`_, which enable multiple MPI tasks to read from and write to the same NetCDF file(s) at the same time. These features must be explicitly enabled when NetCDF is compiled (see :doc:`required-software`).

It is also possible to use MPI and OpenMP together, where each MPI task has a number of OpenMP threads, however this is very advanced and beyond the scope of this document.
Loading