Skip to content
Merged
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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.inc linguist-language=Fortran
126 changes: 126 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# PR Summary

Sci/Tech Reviewer: <!-- SR id, filled when known -->
Code Reviewer: <!-- CR id, filled by SSD -->

<!-- To be completed by the developer -->

<!-- Provide a brief description of the changes in this PR, including any notes
useful for reviewers -->

<!-- List any linked PRs here
- linked MetOffice/<REPO-NAME>#<pr-number>
-->

<!-- List any blocking PRs or issues to be closed here
- is blocked-by #pr-number
- blocks #pr-number
- closes #issue-number
- fixes #issue-number
- is related to #issue-number
-->

## Code Quality Checklist

(_Some checks are automatically carried out via the CI pipeline_)

- [ ] I have performed a self-review of my own code
- [ ] My code follows the project's style guidelines
- [ ] Comments have been included that aid undertanding and enhance the
readability of the code
- [ ] My changes generate no new warnings
- [ ] If editing `rose-meta/jules-shared` then have you supplied a linked UM PR?

## Testing

- [ ] I have tested this change locally, using the JULES rose-stem suite
- [ ] If shared files have been modified, I have run the UM and LFRic Apps rose
stem suites
- [ ] If any tests fail (rose-stem or CI) the reason is understood and
acceptable (eg. kgo changes)
- [ ] I have added tests to cover new functionality as appropriate (eg. system
tests, unit tests, etc.)

<!-- Describe other testing performed (if applicable) -->

### trac.log

<!-- Paste your trac.log from testing output here -->

## Security Considerations

- [ ] I have reviewed my changes for potential security issues
- [ ] Sensitive data is properly handled (if applicable)
- [ ] Authentication and authorisation are properly implemented (if applicable)

## Performance Impact

- [ ] Performance of the code has been considered and, if applicable, suitable
performance measurements have been conducted

## AI Assistance and Attribution

- [ ] Some of the content of this change has been produced with the assistance
of _Generative AI tool name_ (e.g., Met Office Github Copilot Enterprise,
Github Copilot Personal, ChatGPT GPT-4, etc) and I have followed the
[Simulation Systems AI policy](https://metoffice.github.io/simulation-systems/FurtherDetails/ai.html)
(including attribution labels)

<!-- If AI has been used, please provide more details here -->

## Documentation

- [ ] Where appropriate I have updated documentation related to this change and
confirmed that it builds correctly

## Approvals

Please request all relevant approvals. See the CodeOwners.txt file for section
owners.

### Technical

- [ ] JULES Code Owner
- [ ] OpenMP
- [ ] River Routing
- [ ] Rose Stem
- [ ] Rose Metadata
- [ ] Upgrade Macros

### Scientific

- [ ] Surface
- [ ] Hydrology
- [ ] Vegetation
- [ ] Veg3 RED Demography
- [ ] Biogechemistry
- [ ] Biogenic fluxes
- [ ] Fire
- [ ] Lakes
- [ ] Evaluation
- [ ] Imogen

# Sci/Tech Review

<!-- To be completed by the Sci/Tech Reviewer -->
<!-- May be skipped for trivial tickets -->

- [ ] I understand this area of code and the changes being added
- [ ] The proposed changes correspond to the pull request description
- [ ] Documentation is sufficient (do documentation papers need updating)
- [ ] Sufficient testing has been completed

_Please alert the code reviewer via a tag when you have approved the SR_

# Code Review

<!-- To be completed by the Code Reviewer -->

- [ ] All dependencies have been resolved
- [ ] Related Issues have been properly linked and addressed
- [ ] CLA compliance has been confirmed
- [ ] Code quality standards have been met
- [ ] Tests are adequate and have passed
- [ ] Documentation is complete and accurate
- [ ] Security considerations have been addressed
- [ ] Performance impact is acceptable
11 changes: 11 additions & 0 deletions .github/workflows/check-cr-approved.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Check CR approved

on:
pull_request_review:
types: [submitted, edited, dismissed]
workflow_dispatch:

jobs:
check_cr_approved:
if: ${{ github.event.pull_request.number }}
uses: MetOffice/growss/.github/workflows/check-cr-approved.yaml@main
10 changes: 10 additions & 0 deletions .github/workflows/cla-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Legal

on:
pull_request_target:

jobs:
cla:
uses: MetOffice/growss/.github/workflows/cla-check.yaml@main
with:
runner: 'ubuntu-24.04'
10 changes: 10 additions & 0 deletions .github/workflows/umdp3_fixer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: umdp3 Fixer

on:
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:

jobs:
umdp3_fixer:
uses: MetOffice/growss/.github/workflows/umdp3_fixer.yaml@main
83 changes: 83 additions & 0 deletions .github/workflows/user-guide.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# ------------------------------------------------------------------------------
# (c) Crown copyright Met Office. All rights reserved.
# The file LICENCE, distributed with this code, contains details of the terms
# under which the code may be used.
# ------------------------------------------------------------------------------
# Build and deploy Sphinx-based user guide documentation to GitHub Pages

name: User Guide

on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize]
paths:
- 'doc/**'
- '.github/workflows/user-guide.yaml'
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

jobs:
build-and-deploy:
runs-on: ubuntu-latest
timeout-minutes: 5
env:
PYTHON_VRSN: '3.13'
VENV_PATH: 'doc/.venv'

steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Setup uv with Python ${{ env.PYTHON_VRSN }}
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ env.PYTHON_VRSN }}

- name: Cache uv venv
uses: actions/cache@v4
with:
path: ${{ env.VENV_PATH }}
key: ${{ runner.os }}-uv-${{ env.PYTHON_VRSN }}-${{ hashFiles('doc/pyproject.toml', 'doc/uv.lock') }}
restore-keys: |
${{ runner.os }}-uv-${{ env.PYTHON_VRSN }}-
${{ runner.os }}-uv-

- name: Install dependencies
working-directory: ./doc
run: uv sync

- name: Lint Sphinx docs
working-directory: ./doc
run: uv run sphinx-lint source

- name: Build HTML docs
working-directory: ./doc
run: uv run make clean html

- name: Minimize uv cache
run: uv cache prune --ci

# -- Deploy to GitHub Pages only on push to upstream main
- name: Setup GitHub Pages
if: ${{ github.ref_name == 'main' && (github.event_name == 'push' || github.event_name == 'merge_group') }}
uses: actions/configure-pages@v5

- name: Upload artifact to GitHub Pages
if: ${{ github.ref_name == 'main' && (github.event_name == 'push' || github.event_name == 'merge_group') }}
uses: actions/upload-pages-artifact@v4
with:
name: github-pages
path: doc/build/html
retention-days: 1

- name: Deploy to GitHub Pages
id: deployment
if: ${{ github.ref_name == 'main' && (github.event_name == 'push' || github.event_name == 'merge_group') }}
uses: actions/deploy-pages@v4
31 changes: 31 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
*~
__pycache__/
results/*.png
results/*.txt
processed_data/*.dat
.*.sw?
.vscode
.idea
*.pyc
.pytest_cache

# 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
.python-version
5 changes: 5 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Contributors

| GitHub user | Real Name | Affiliation | Date |
| ----------- | --------- | ----------- | ---- |
| james-bruten-mo | James Bruten | Met Office | 2025-12-09 |
28 changes: 28 additions & 0 deletions LICENCE
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
BSD 3-Clause Licence

Crown Copyright (c) Met Office

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# JULES - Joint UK Land Environment Simulator

[![User Guide](https://github.com/MetOffice/jules/actions/workflows/user-guide.yaml/badge.svg)](https://github.com/MetOffice/jules/actions/workflows/user-guide.yaml)

JULES (the Joint UK Land Environment Simulator) is a community land surface
model that is used both as a standalone model and as the land surface component
in the Met Office Unified Model. JULES is a core component of both the Met
Office's modelling infrastructure and
[NERC](https://www.ukri.org/councils/nerc/)'s Earth System Modelling Strategy.
JULES is a major part of the UK's contribution to global model inter-comparison
projects (e.g., [CMIP6](https://wcrp-cmip.org/cmip-phases/cmip6/)) and is placed
firmly at the cutting edge of international land surface modelling because of
continual science development and improved accessibility.

## Contributing Guidelines

Welcome!

The following links are here to help set clear expectations for everyone
contributing to this project. By working together under a shared understanding,
we can continuously improve the project while creating a friendly, inclusive
space for all contributors.

### Contributors Licence Agreement

Please see the
[Momentum Contributors Licence Agreement](https://github.com/MetOffice/Momentum/blob/main/CLA.md)

Agreement of the CLA can be shown by adding yourself to the CONTRIBUTORS file
alongside this one, and is a requirement for contributing to this project.

### Code of Conduct

Please be aware of and follow the
[Momentum Code of Coduct](https://github.com/MetOffice/Momentum/blob/main/docs/CODE_OF_CONDUCT.md)

### Working Practices

This project is managed as part of the Simulation Systems group of repositories.

Please follow the Simulation Systems
[Working Practices.](https://metoffice.github.io/simulation-systems/index.html)

Questions are encouraged in the Simulation Systems
[Discussions.](https://github.com/MetOffice/simulation-systems/discussions)

Please be aware of and follow the Simulation Systems
[AI Policy.](https://metoffice.github.io/simulation-systems/FurtherDetails/ai.html)
Loading