diff --git a/.github/workflows/check-cr-approved.yaml b/.github/workflows/check-cr-approved.yaml index 9b66712a1..c405848ac 100644 --- a/.github/workflows/check-cr-approved.yaml +++ b/.github/workflows/check-cr-approved.yaml @@ -1,11 +1,20 @@ +# ----------------------------------------------------------------------------- +# (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. +# ----------------------------------------------------------------------------- + name: Check CR approved on: - pull_request_review: - types: [submitted, edited, dismissed] - workflow_dispatch: + 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 + check_cr_approved: + permissions: + contents: read # Required to evaluate the event trigger metadata safely + pull-request: read + if: ${{ github.event.pull_request.number }} + uses: MetOffice/growss/.github/workflows/check-cr-approved.yaml@0f9ffe6a138ae9943053621916a850a075997db8 # v1.0.0 diff --git a/.github/workflows/ci_docs.yml b/.github/workflows/ci_docs.yml deleted file mode 100644 index a580467c1..000000000 --- a/.github/workflows/ci_docs.yml +++ /dev/null @@ -1,31 +0,0 @@ -# ------------------------------------------------------------------------------ -# (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. -# ------------------------------------------------------------------------------ - -name: Documentation -run-name: Docs Build and Deploy - ${{ github.ref_name }} - -on: - push: - branches: - - main - paths: - - 'documentation/**' - - '.github/workflows/**' - -concurrency: - group: ${{ github.workflow }}-${{github.ref}} - cancel-in-progress: true - -jobs: - build-docs: - name: Build Docs - uses: ./.github/workflows/ru_build-docs.yml - - deploy-docs: - name: Deploy Docs - needs: [ build-docs ] - uses: ./.github/workflows/ru_deploy-docs.yml - diff --git a/.github/workflows/cla-check.yaml b/.github/workflows/cla-check.yaml index 3d28d7311..df2bf70b1 100644 --- a/.github/workflows/cla-check.yaml +++ b/.github/workflows/cla-check.yaml @@ -1,10 +1,29 @@ +# ----------------------------------------------------------------------------- +# (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. +# ----------------------------------------------------------------------------- + +# Check Contributor Licence Agreement + name: Legal on: pull_request_target: +concurrency: + # Automatically cancels the workflow run instantly before the + # engine can parse empty jobs and generate notification emails + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event.pull_request.head.repo.full_name != 'MetOffice/lfric_core' }} + +permissions: {} + jobs: cla: - uses: MetOffice/growss/.github/workflows/cla-check.yaml@main + permissions: + contents: read # Required to evaluate the event trigger metadata safely + pull-requests: write # Required for the downstream engine to post status comments on the PR + uses: MetOffice/growss/.github/workflows/cla-check.yaml@0f9ffe6a138ae9943053621916a850a075997db8 # v1.0.0 with: runner: 'ubuntu-24.04' diff --git a/.github/workflows/lint-fortran.yaml b/.github/workflows/lint-fortran.yaml index 8ecd9b965..b4b6110f1 100644 --- a/.github/workflows/lint-fortran.yaml +++ b/.github/workflows/lint-fortran.yaml @@ -1,10 +1,18 @@ +# ----------------------------------------------------------------------------- +# (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. +# ----------------------------------------------------------------------------- + name: Lint Fortran on: - pull_request_target: + pull_request: jobs: fortitude-lint: - uses: MetOffice/growss/.github/workflows/fortran-lint.yaml@main + permissions: + contents: read # Required to evaluate the event trigger metadata safely + uses: MetOffice/growss/.github/workflows/fortran-lint.yaml@0f9ffe6a138ae9943053621916a850a075997db8 # v1.0.0 with: runner: 'ubuntu-24.04' diff --git a/.github/workflows/pr_docs.yml b/.github/workflows/pr_docs.yml deleted file mode 100644 index ab32daaf9..000000000 --- a/.github/workflows/pr_docs.yml +++ /dev/null @@ -1,25 +0,0 @@ -# ------------------------------------------------------------------------------ -# (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. -# ------------------------------------------------------------------------------ - -name: Docs Build for Pull Requests -run-name: Docs build -on: - pull_request: - branches: - - main - paths: - - 'documentation/**' - - '.github/workflows/**' - - -concurrency: - group: pr-${{github.ref}}-${{github.event.pull_request.number || github.run_number}} - cancel-in-progress: true - -jobs: - build-docs: - name: Build Docs - uses: ./.github/workflows/ru_build-docs.yml diff --git a/.github/workflows/ru_build-docs.yml b/.github/workflows/ru_build-docs.yml deleted file mode 100644 index 40d8c3f25..000000000 --- a/.github/workflows/ru_build-docs.yml +++ /dev/null @@ -1,47 +0,0 @@ -# ------------------------------------------------------------------------------ -# (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. -# ------------------------------------------------------------------------------ - -name: Build Docs -on: - workflow_call: - -jobs: - build-html: - name: HTML Docs - runs-on: ubuntu-24.04 - steps: - - id: extract - name: Extract - uses: actions/checkout@v4 - - id: setup_environment - name: Setup Python environment - uses: actions/setup-python@v5 - with: - python-version: 3.12 - - id: finesse_environment - name: Install Python packages - run: | - python3 -m pip install --upgrade pip - python3 -m pip install sphinx==8.1.0 pydata-sphinx-theme==0.16.1 sphinx-sitemap==2.6.0 sphinx_design==0.6.1 - - id: sphinx - name: Build Sphinx HTML docs - working-directory: ./documentation - # Run Sphinx to build the HTML documentation with warnings treated as errors and continue on warnings. - # The '-n' option runs in nit-picky mode to warn about all references where the target cannot be found. - run: make html SPHINXOPTS="-W --keep-going -n" - - id: permissions - name: Set permissions - run: | - chmod -c -R +rX "documentation/build/html/" - - id: deployment - name: Upload Artifact - if: ${{ (github.event_name == 'push' || github.event_name == 'merge_group') && github.ref_name == 'main'}} - uses: actions/upload-pages-artifact@v3 - with: - name: github-pages - path: documentation/build/html - retention-days: 1 - diff --git a/.github/workflows/ru_deploy-docs.yml b/.github/workflows/ru_deploy-docs.yml deleted file mode 100644 index 708260f93..000000000 --- a/.github/workflows/ru_deploy-docs.yml +++ /dev/null @@ -1,29 +0,0 @@ -# ------------------------------------------------------------------------------ -# (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. -# ------------------------------------------------------------------------------ - -name: Deploy Docs - -on: - workflow_call: - -jobs: - deploy: - if: ${{ github.repository == 'MetOffice/lfric_core' }} - environment: - name: github-pages - permissions: - contents: read - pages: write - id-token: write - - runs-on: ubuntu-24.04 - steps: - - name: Configure GitHub Pages - id: configure - uses: actions/configure-pages@v4 - - name: Deploy GitHub Pages - id: deploy - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/sphinx-docs.yaml b/.github/workflows/sphinx-docs.yaml new file mode 100644 index 000000000..7d62ff35b --- /dev/null +++ b/.github/workflows/sphinx-docs.yaml @@ -0,0 +1,37 @@ +# ----------------------------------------------------------------------------- +# (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 documentation to GitHub Pages + +name: Docs + +on: + push: + branches: [main] + pull_request: + types: [opened, reopened, synchronize] + paths: + - 'documentation/**' + - '.github/workflows/**' + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + docs: + uses: MetOffice/growss/.github/workflows/sphinx-docs.yaml@0f9ffe6a138ae9943053621916a850a075997db8 # v1.0.0 + with: + python-version: "3.12.12" + timeout-minutes: 5 + docs-dir: documentation + source-dir: documentation/source + + permissions: + contents: read + pages: write + id-token: write diff --git a/.github/workflows/track-review-project.yaml b/.github/workflows/track-review-project.yaml index 639477cd2..1ab601226 100644 --- a/.github/workflows/track-review-project.yaml +++ b/.github/workflows/track-review-project.yaml @@ -1,3 +1,9 @@ +# ----------------------------------------------------------------------------- +# (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. +# ----------------------------------------------------------------------------- + name: Track Review Project on: @@ -7,11 +13,14 @@ on: - completed permissions: - actions: read - contents: read - pull-requests: write + contents: read # Required to evaluate the event trigger metadata safely jobs: track_review_project: - uses: MetOffice/growss/.github/workflows/track-review-project.yaml@main - secrets: inherit + permissions: + actions: read # Required to check out code or parse files safely + contents: read # Required to read the upstream triggered workflow run artifact status + pull-requests: write # Required for the downstream engine to add comments or update metadata on the PR + uses: MetOffice/growss/.github/workflows/track-review-project.yaml@0f9ffe6a138ae9943053621916a850a075997db8 # v1.0.0 + secrets: + PROJECT_ACTION_PAT: ${{ secrets.PROJECT_ACTION_PAT }} diff --git a/.github/workflows/trigger-project-workflow.yaml b/.github/workflows/trigger-project-workflow.yaml index ccb7a55b0..a65eb0297 100644 --- a/.github/workflows/trigger-project-workflow.yaml +++ b/.github/workflows/trigger-project-workflow.yaml @@ -1,3 +1,9 @@ +# ----------------------------------------------------------------------------- +# (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. +# ----------------------------------------------------------------------------- + name: Trigger Review Project on: @@ -7,11 +13,14 @@ on: pull_request_review_comment: permissions: - actions: read - contents: read - pull-requests: write + contents: read # Required to evaluate the event trigger metadata safely jobs: trigger_project_workflow: - uses: MetOffice/growss/.github/workflows/trigger-project-workflow.yaml@main - secrets: inherit + if: github.repository == 'MetOffice/lfric_apps' + + permissions: + actions: read # Required to check out code or parse files safely + contents: read # Required to read the upstream triggered workflow run artifact status + pull-requests: write # Required for the downstream engine to add comments or update metadata on the PR + uses: MetOffice/growss/.github/workflows/trigger-project-workflow.yaml@0f9ffe6a138ae9943053621916a850a075997db8 # v1.0.0 diff --git a/.github/workflows/validate_symlinks.yaml b/.github/workflows/validate_symlinks.yaml index a1f59da61..e5a666732 100644 --- a/.github/workflows/validate_symlinks.yaml +++ b/.github/workflows/validate_symlinks.yaml @@ -1,3 +1,9 @@ +# ----------------------------------------------------------------------------- +# (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. +# ----------------------------------------------------------------------------- + name: Validate Symlinks on: @@ -7,4 +13,6 @@ on: jobs: validate_symlinks: - uses: MetOffice/growss/.github/workflows/validate_symlinks.yaml@main + permissions: + contents: read # Required to evaluate the event trigger metadata safely + uses: MetOffice/growss/.github/workflows/validate_symlinks.yaml@0f9ffe6a138ae9943053621916a850a075997db8 # v1.0.0 diff --git a/.github/zizmor.yml b/.github/zizmor.yml new file mode 100644 index 000000000..16ed4d989 --- /dev/null +++ b/.github/zizmor.yml @@ -0,0 +1,16 @@ +# ------------------------------------------------------------------------------ +# (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. +# ------------------------------------------------------------------------------ + +# Rules for Zizmor GitHub workflow linter. This file is used to configure which +# rules to ignore for specific workflow files, allowing for exceptions to be +# made where necessary while still enforcing best practices across the codebase. +rules: + dangerous-triggers: + ignore: + - "cla-check.yaml" + - "lint-fortran.yaml" + - "track-review-project.yaml" + - "trigger-project-workflow.yaml" diff --git a/documentation/Makefile b/documentation/Makefile index 238a36b1d..4432565ce 100644 --- a/documentation/Makefile +++ b/documentation/Makefile @@ -13,7 +13,8 @@ SPHINXBUILD ?= sphinx-build SOURCEDIR = source BUILDDIR = build - +# For local deployment to ~/public_html// +REPO := $(notdir $(shell git rev-parse --show-toplevel)) BRANCH := $(shell git rev-parse --abbrev-ref HEAD) DEPLOYDIR = $(HOME)/public_html @@ -29,7 +30,10 @@ help: @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) deploy: - @$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(DEPLOYDIR)/$(BRANCH)" $(SPHINXOPTS) $(O) + @$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(DEPLOYDIR)/$(REPO)/$(BRANCH)" $(SPHINXOPTS) $(O) + +lint: + sphinx-lint --d "horizontal-tab" --max-line-length 80 "$(SOURCEDIR)" .PHONY: clean clean: diff --git a/documentation/source/getting_started/guide.rst b/documentation/source/getting_started/guide.rst index d26c94f61..b0de26a92 100644 --- a/documentation/source/getting_started/guide.rst +++ b/documentation/source/getting_started/guide.rst @@ -58,7 +58,7 @@ The :ref:`Technical Articles section ` includes articles on several topics including the distributed memory strategy and implementation, the clock and calendar. -A:ref:`Glossary of Terms ` defines commonly used terms and +A :ref:`Glossary of Terms ` defines commonly used terms and is available from the right-hand side panel of each page. Finally, detailed API documentation is given for the LFRic infrastructure and diff --git a/documentation/source/getting_started/index.rst b/documentation/source/getting_started/index.rst index 214cad4e9..107156478 100644 --- a/documentation/source/getting_started/index.rst +++ b/documentation/source/getting_started/index.rst @@ -16,8 +16,8 @@ applications for training purposes or for developing and testing particular technical capabilities. It may be useful to look at the Glossary of Terms and the FAQs as you get -started to familiarise yourself with various terms used in LFRic. There are -links to both the Glossary and FAQs on the start page and in the right-hand +started to familiarise yourself with various terms used in LFRic. There are +links to both the Glossary and FAQs on the start page and in the right-hand navigation bar on all other pages. .. toctree:: diff --git a/documentation/source/how_it_works/core_data_model/science_model_architecture.rst b/documentation/source/how_it_works/core_data_model/science_model_architecture.rst index 947ea51e8..1958beb2e 100644 --- a/documentation/source/how_it_works/core_data_model/science_model_architecture.rst +++ b/documentation/source/how_it_works/core_data_model/science_model_architecture.rst @@ -21,7 +21,7 @@ code and technical code. The scientific codes are kernels and algorithms represented by the "KAl" in the name. Algorithms call kernels through the technical code, called the Parallel System or "PSy layer" code which is the code that PSyclone can generate. The PSy layer code can deal with issues relating to -distributed and shared memory paralellism. +distributed and shared memory parallelism. A benefit of such separation is that technical changes to code required by different platforms or compilers can be isolated to the PSy layer. Further, if @@ -213,10 +213,10 @@ Dofs, dof-maps and function spaces The LFRic Infrastructure supports finite difference (FD), finite volume (FV) and finite element methods (FEM). Simply put, in FV and FEM, the value of a field at any point within a cell is computed as the sum of -one or more  **basis functions** each multiplied by a different data +one or more **basis functions** each multiplied by a different data point. A basis function is a spatial function whose value varies within the cell but is zero outside the cell. In FV and FEM terminology, each -data point is referred to as a  **degree of freedom** or **dof**. +data point is referred to as a **degree of freedom** or **dof**. The representation of the field as a combination of dofs and basis functions is referred to as a **function space**. Formally, the value of @@ -524,7 +524,7 @@ LFRic Function spaces and element orders This section introduces the LFRic function space object which underpins fields used in LFRic. In previous sections it was noted that the function space is a concept in the finite element method whereby -data and basis functions can define a field that spacially varies +data and basis functions can define a field that spatially varies within an individual cell, and this was illustrated for individual cells in the previous section on :ref:`dof-maps and function spaces `. The implementation of the function space object in @@ -587,7 +587,7 @@ and at next lowest order (``element_order_h=element_order_v=1``): .. tab-set:: - .. tab-item:: ​ :math:`\mathbb{W}_0` + .. tab-item:: :math:`\mathbb{W}_0` :name: k0_w0_dofs .. grid:: 2 @@ -608,7 +608,7 @@ and at next lowest order (``element_order_h=element_order_v=1``): lowest order. The field is fully continuous so dofs are shared with all neighbouring cells. - .. tab-item:: ​ :math:`\mathbb{W}_1` + .. tab-item:: :math:`\mathbb{W}_1` :name: w1_dofs .. grid:: 2 @@ -638,7 +638,7 @@ and at next lowest order (``element_order_h=element_order_v=1``): **Expanded view of** :math:`\mathbb{W}_1` at next lowest order showing the details of the locations of dofs. - .. tab-item:: ​ :math:`\mathbb{W}_2` + .. tab-item:: :math:`\mathbb{W}_2` :name: k0_w2_dofs .. grid:: 2 @@ -667,7 +667,7 @@ and at next lowest order (``element_order_h=element_order_v=1``): on faces illustrating that basis functions are continuous normal to the faces. - .. tab-item:: ​ :math:`\mathbb{W}_3` + .. tab-item:: :math:`\mathbb{W}_3` :name: w3_dofs .. grid:: 2 @@ -955,9 +955,9 @@ more arguments than the original ``invoke`` call, and each argument will be described when the :ref:`PSy layer code generation example ` is introduced. All of the arguments and the order of the arguments derive entirely from the kernel metadata. In -fact, the PSyclone toolset includes a :ref:`psyclone:stub-generation` -which will generate the following subroutine call and all the argument -declarations based on the above metadata. See the PSyclone documentation +fact, the PSyclone toolset includes a :ref:`psyclone:stub-generation` +which will generate the following subroutine call and all the argument +declarations based on the above metadata. See the PSyclone documentation for details. .. code-block:: fortran diff --git a/documentation/source/how_it_works/parallelism/lfric_mpi.rst b/documentation/source/how_it_works/parallelism/lfric_mpi.rst index e7de62298..d4ffc2716 100644 --- a/documentation/source/how_it_works/parallelism/lfric_mpi.rst +++ b/documentation/source/how_it_works/parallelism/lfric_mpi.rst @@ -15,7 +15,7 @@ functions in the `lfric_mpi` object are simple wrappers to MPI library functions. They provide a way to encapsulate the MPI functionality and insulate the rest of the code from changes to the external library. -For details of the API to the ``lfric_mpi`` wrappers, see +For details of the API to the ``lfric_mpi`` wrappers, see :ref:`How to use: lfric_mpi ` Different versions diff --git a/documentation/source/how_to_use_it/io/diagnostics.rst b/documentation/source/how_to_use_it/io/diagnostics.rst index 74f577935..4598aea95 100644 --- a/documentation/source/how_to_use_it/io/diagnostics.rst +++ b/documentation/source/how_to_use_it/io/diagnostics.rst @@ -326,7 +326,7 @@ assigned the same ``write_interface``: the ``init_diag`` contains: write_behaviour => write_field_generic call field%set_write_behaviour(write_behaviour) -After the diagnostic is computed, the``write_field`` method is called, +After the diagnostic is computed, the ``write_field`` method is called, but only if the diagnostic flag was set to ``.true.``. .. code-block:: fortran diff --git a/documentation/source/how_to_use_it/meshes/mesh_configuration_namelists.rst b/documentation/source/how_to_use_it/meshes/mesh_configuration_namelists.rst index 36cfed950..5ce124e23 100644 --- a/documentation/source/how_to_use_it/meshes/mesh_configuration_namelists.rst +++ b/documentation/source/how_to_use_it/meshes/mesh_configuration_namelists.rst @@ -42,8 +42,8 @@ depending on generator. ``xyz`` Cartesian coordinates, This is only supported for a flat planar mesh - at z=0, as a result, features are located with only 2-coordinates, - ``(x,y)`` in metres. + at z=0, as a result, features are located with only 2-coordinates, + ``(x,y)`` in metres. * ``file_prefix``: **''** File prefix used to construct output filename(s). Depending on the logical, @@ -51,16 +51,16 @@ depending on generator. **.nc** Single file output for non-partitioned mesh topologies. Requested meshes - encompass an entire model domain. + encompass an entire model domain. **__.nc** Multiple files output for pre-partitioned mesh topologies. Each file - contains the cells of the requested meshes on a given partition of - the model domain. Pre-partitioned meshes allow a simple load operation - to populate an application's local mesh objects on a mpi rank. + contains the cells of the requested meshes on a given partition of + the model domain. Pre-partitioned meshes allow a simple load operation + to populate an application's local mesh objects on a MPI rank. - **Note:** Pre-partitioned meshes are only suitable for applications - running with mpi ranks equal to the number of partitions. + **Note:** Pre-partitioned meshes are only suitable for applications + running with MPI ranks equal to the number of partitions. * ``geometry``: **''** Geometrical shape of the surface domain. Valid options: @@ -120,9 +120,9 @@ depending on generator. ``channel`` (`Planar meshes only`) Of the four domain boundaries, two are linked - as a periodic pair, the remaining boundaries are - non-periodic. Crossing one of the periodic domain boundaries re-enters - the domain at a point on other periodic domain boundary. + as a periodic pair, the remaining boundaries are + non-periodic. Crossing one of the periodic domain boundaries re-enters + the domain at a point on other periodic domain boundary. ``periodic`` Opposing domain boundaries are linked as periodic pairs. @@ -149,7 +149,7 @@ depending on generator. over a panel of the cubed-sphere without increasing the overall number of cells in the mesh. * ``smooth_passes``: **** - Number of interations of smoothing function applied to mesh node + Number of iterations of smoothing function applied to mesh node locations. .. _planar_mesh_nml: @@ -158,10 +158,10 @@ depending on generator. Control namelist for planar mesh generation, required for use with the `planar_mesh_generator`. This creates a mesh which uses the planar mesh - base strategy and requires ``edge_cells`` along `both` axes aswell as the + base strategy and requires ``edge_cells`` along `both` axes as well as the domain boundary periodicity in order to define the mesh connectivity. The remaining options are mesh transformations or logical triggers. Mesh - tranformations are applied to the node coordinates after the base mesh is + transformations are applied to the node coordinates after the base mesh is generated; the connectively of the mesh elements are not altered by transformations. @@ -170,7 +170,7 @@ depending on generator. * ``apply_stretch_transform``: **** Apply the stretch transform to base planar mesh node coordinates. * ``create_lbc_mesh``: **** - Generate a rim mesh which is derived one of the priciple meshes + Generate a rim mesh which is derived one of the principal meshes (:ref:`mesh_names`). * ``domain_centre``: **,** Location of domain centre for all principal meshes. Coordinates aligned @@ -212,16 +212,16 @@ depending on generator. to file as 1 partition per file. This functionality results in multiple mesh files with the corresponding - portion of each principal mesh. In addition to the mesh tolopologies, + portion of each principal mesh. In addition to the mesh topologies, partition information is also written to each file. In essence, each file provides the information required to load and instantiate 2D-mesh objects which are `local` to a given process rank. This namelist is enabled if triggered by the :ref:`partition_mesh` logical. .. NOTE:: Care should be taken when specifying partition - configurations. Partitions flag mesh cell ids as being members of - that parition, there is no restriction that limits the shape or - continuity of a partition. + configurations. Partitions flag mesh cell ids as being members of + that partition, there is no restriction that limits the shape or + continuity of a partition. * ``max_stencil_depth``: **** For communication across partitions, the `local` mesh domains need to be @@ -242,7 +242,7 @@ depending on generator. * ``panel_decomposition``: **''** Specifies panel partition strategy applied to principal meshes. The generators use the partitioning module support from LFRic core - infrastruture. Valid options: + infrastructure. Valid options: ``auto`` The infrastructure code will attempt to group cells into partitions @@ -305,8 +305,8 @@ depending on generator. supported). .. NOTE:: When considering meshes with rotation applied, all (lon,lat) - coordinates which are referenced in the configuration/output files - are with respect to a real world frame of reference. + coordinates which are referenced in the configuration/output files + are with respect to a real world frame of reference. @@ -368,7 +368,7 @@ depending on generator. .. rubric:: Footnotes -.. [#f1] Principal meshes are those meshes explicity requested +.. [#f1] Principal meshes are those meshes explicitly requested and named in the configuration file, `i.e.` |nbsp| :ref:`mesh_names`. These meshes are generated from the base strategy as opposed to being derived from another mesh diff --git a/documentation/source/how_to_use_it/meshes/mesh_generators.rst b/documentation/source/how_to_use_it/meshes/mesh_generators.rst index 8345a189f..1539cdb89 100644 --- a/documentation/source/how_to_use_it/meshes/mesh_generators.rst +++ b/documentation/source/how_to_use_it/meshes/mesh_generators.rst @@ -48,7 +48,7 @@ Generates one (or more) 2D gridded meshes that each follow the base strategy. * Single panel of side ``n X m`` cells. * Located using combination of the specified domain centre and extents. * Axes aligned with `,` or `,`. - * Allows periodicity of oppposing domain boundaries to be set [#f4]_. + * Allows periodicity of opposing domain boundaries to be set [#f4]_. --`usage:` @@ -58,12 +58,12 @@ Generates one (or more) 2D gridded meshes that each follow the base strategy. .. rubric:: Footnotes .. [#f1] NetCDF(.nc) file compliant with UGRID v1.0 convention. -.. [#f2] `Null Island`: where the prime medridian and the equator intersect, - ``i.e.`` 0N, 0E. +.. [#f2] `Null Island`: where the prime meridian and the equator intersect, + ``i.e.`` 0N, 0E. .. [#f3] For historical reasons, the planar mesh generator is not restricted - to a planar surface domain. References to planar meshes with respect - the following sections should be taken as a mesh produced by the - `planar_mesh_generator` program. + to a planar surface domain. References to planar meshes with respect + to the following sections should be taken as a mesh produced by the + `planar_mesh_generator` program. .. [#f4] A pair of periodic domain boundaries are connected such, that where a - field quantity exits the model domain crossing one of the boundaries, - it re-enters the domain at the opposing domain boundary. + field quantity exits the model domain crossing one of the boundaries, + it re-enters the domain at the opposing domain boundary. diff --git a/documentation/source/how_to_use_it/parallelism/lfric_message_passing_interface.rst b/documentation/source/how_to_use_it/parallelism/lfric_message_passing_interface.rst index 89af80995..c86365b58 100644 --- a/documentation/source/how_to_use_it/parallelism/lfric_message_passing_interface.rst +++ b/documentation/source/how_to_use_it/parallelism/lfric_message_passing_interface.rst @@ -23,7 +23,7 @@ MPI library to perform the halo exchanges. That leaves a small selection of global communication functionality that needs to be supported, such as global reductions (min/max/sum) and broadcast of -information from one process to all the others. +information from one process to all the others. This functionality is provided by calls to the system MPI library. These are encapsulated in a wrapper object. This insulates the rest of the model code from diff --git a/documentation/source/how_to_use_it/technical_articles/lfric_distmem_impl.rst b/documentation/source/how_to_use_it/technical_articles/lfric_distmem_impl.rst index 1a4ad0da8..710e75450 100644 --- a/documentation/source/how_to_use_it/technical_articles/lfric_distmem_impl.rst +++ b/documentation/source/how_to_use_it/technical_articles/lfric_distmem_impl.rst @@ -179,7 +179,7 @@ a function pointer. For efficiency reasons, the algorithm for partitioning a cubed-sphere mesh is a specific algorithm that will only work for a cubed-sphere mesh. By default each panel of the cubed-sphere is split into rectangular partitions, -alternatively if the 'custom' decomposition type is used then sets of 2 or 3 +alternatively if the 'custom' decomposition type is used then sets of 2 or 3 cubed-sphere panels can be grouped together before these sets are decomposed into a number of rectangular panels. These restrictions mean that the total number of partitions for cubed-sphere meshes needs to be a multiple of 2 or 3. diff --git a/documentation/source/how_to_use_it/technical_articles/logging.rst b/documentation/source/how_to_use_it/technical_articles/logging.rst index bb9c19932..524028ffa 100644 --- a/documentation/source/how_to_use_it/technical_articles/logging.rst +++ b/documentation/source/how_to_use_it/technical_articles/logging.rst @@ -121,7 +121,7 @@ message prior to calling ``log_event``. Log Level Controlled Calculations --------------------------------- -Where a log message is outputting a value that requires some computation, +Where a log message is outputting a value that requires some computation, a check against the ``log_at_level`` function may be used to find out if it's necessary.