Skip to content

Commit

Permalink
Addition of python script to add yaml-based test option + Creation of…
Browse files Browse the repository at this point in the history
… FV3 diag table documentation ufs-community#2277 + SKEB fix with d_con = zero ufs-community#2374 (ufs-community#2278)

* UFSWM - python scripts for yaml and rocoto-xml conversion, experiment setup, and test log output  
* Add python superlint option
* Documentation update: doc/UsersGuide/source/tables/fv3_diag_table.rst
    * FV3 - 
    * atmos_cubed_sphere - bugfix: allocates heat_source when skeb is True and d_con is zero
  • Loading branch information
jkbk2004 authored Aug 12, 2024
1 parent fcf0022 commit a1143cc
Show file tree
Hide file tree
Showing 41 changed files with 7,735 additions and 3,537 deletions.
473 changes: 473 additions & 0 deletions .github/linters/.python-lint

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions .github/linters/.yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---

extends: default

rules:
braces:
level: warning
max-spaces-inside: 1
brackets:
level: warning
max-spaces-inside: 1
colons:
level: warning
commas: disable
comments: disable
comments-indentation: disable
document-start: disable
empty-lines:
level: warning
hyphens:
level: warning
indentation:
level: warning
indent-sequences: consistent
line-length: disable
truthy: disable
trailing-spaces: disable

65 changes: 32 additions & 33 deletions .github/workflows/aux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,43 +18,42 @@ jobs:
runs-on: ubuntu-20.04

steps:
- name: Share helper id
run: echo -n ${{ github.run_id }} >~/id_file
- name: Share helper id
run: echo -n ${{ github.run_id }} >~/id_file

- uses: actions/cache@v2
with:
path: ~/id_file
key: helperid-${{ github.event.workflow_run.id }}
- uses: actions/cache@v2
with:
path: ~/id_file
key: helperid-${{ github.event.workflow_run.id }}

repocheck:
name: Repo check
runs-on: ubuntu-20.04

steps:
- name: Check up-to-dateness and post comment
run: |
trap 'echo "exit-code=$?" >> "$GITHUB_OUTPUT"' EXIT
head_sha=${{ github.event.pull_request.head.sha }}
head_brc=${{ github.event.pull_request.head.ref }}
head_url=${{ github.event.pull_request.head.repo.html_url }}
git clone -q -b $head_brc $head_url .
git checkout -q $head_sha
git submodule -q update --init --recursive
cd ${{ github.workspace }}/tests/ci
url=$GITHUB_API_URL/repos/$GITHUB_REPOSITORY
pr_number=$(curl -sS -H $app $url/pulls \
| jq -r '.[] | select(.head.sha == "'"$head_sha"'") | .number')
echo "pr_number is $pr_number"
pr_uid=${{ github.event.pull_request.head.repo.owner.login }}
echo "pr_uid is $pr_uid"
./repo_check.sh
#comment="$(./repo_check.sh 2>/dev/null)"
#echo "comment is $comment"
#if [[ -n $comment ]]; then
# curl -sS -X POST -H $app -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
# $url/issues/$pr_number/comments -d '{"body": "'"${comment}"'"}'
# echo -n "failure" >~/repocheck_file
#else
# echo -n "success" >~/repocheck_file
#fi
- name: Check up-to-dateness and post comment
run: |
trap 'echo "exit-code=$?" >> "$GITHUB_OUTPUT"' EXIT
head_sha=${{ github.event.pull_request.head.sha }}
head_brc=${{ github.event.pull_request.head.ref }}
head_url=${{ github.event.pull_request.head.repo.html_url }}
git clone -q -b $head_brc $head_url .
git checkout -q $head_sha
git submodule -q update --init --recursive
cd ${{ github.workspace }}/tests/ci
url=$GITHUB_API_URL/repos/$GITHUB_REPOSITORY
pr_number=$(curl -sS -H $app $url/pulls \
| jq -r '.[] | select(.head.sha == "'"$head_sha"'") | .number')
echo "pr_number is $pr_number"
pr_uid=${{ github.event.pull_request.head.repo.owner.login }}
echo "pr_uid is $pr_uid"
./repo_check.sh
#comment="$(./repo_check.sh 2>/dev/null)"
#echo "comment is $comment"
#if [[ -n $comment ]]; then
# curl -sS -X POST -H $app -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
# $url/issues/$pr_number/comments -d '{"body": "'"${comment}"'"}'
# echo -n "failure" >~/repocheck_file
#else
# echo -n "success" >~/repocheck_file
#fi
6 changes: 3 additions & 3 deletions .github/workflows/superlinter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Super-Linter
uses: super-linter/[email protected]
env:
LINTER_RULES_PATH: /
LINTER_RULES_PATH: '.github/linters/'
DEFAULT_BRANCH: origin/develop
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FILTER_REGEX_EXCLUDE: .*(tests/fv3_conf/.*|tests/ci/.*|tests/auto/.*|tests/auto-jenkins/.*|tests/opnReqTests/.*|tests/opnReqTest|tests/atparse.bash).*
Expand All @@ -33,5 +33,5 @@ jobs:
#VALIDATE_GITHUB_ACTIONS: true
#VALIDATE_LUA: true
#VALIDATE_MARKDOWN: true
#VALIDATE_PYTHON_PYLINT: true
#VALIDATE_YAML: true
VALIDATE_PYTHON_PYLINT: true
VALIDATE_YAML: true
2 changes: 1 addition & 1 deletion FV3
Submodule FV3 updated 1 files
+1 −1 atmos_cubed_sphere
3 changes: 2 additions & 1 deletion doc/UsersGuide/source/Glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ Glossary
Global atmospheric model based on fluid dynamics principles, including Euler's equations of motion.

EMC
The `Environmental Modeling Center <https://www.emc.ncep.noaa.gov/emc.php>`_ is one of :term:`NCEP`'s nine centers and leads the :term:`National Weather Service <NWS>`'s modeling efforts.
The `Environmental Modeling Center <https://www.emc.ncep.noaa.gov/emc.php>`__ is one of :term:`NCEP`'s nine centers and leads the :term:`National Weather Service <NWS>`'s modeling efforts.


ESMF
`Earth System Modeling Framework <https://earthsystemmodeling.org/docs/release/latest/ESMF_usrdoc/>`__. The ESMF defines itself as "a suite of software tools for developing high-performance, multi-component Earth science modeling applications." It is a community-developed software infrastructure for building and coupling models.
Expand Down
20 changes: 20 additions & 0 deletions doc/UsersGuide/source/InputsOutputs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1304,6 +1304,26 @@ These field section entries are described in :numref:`Table %s <FieldDescription

Comments can be added to the diag_table using the hash symbol (``#``).


Each WM component has its own ``diag_table`` with associated variables. :numref:`Table %s <diag-table-options>` contains links to the full set of options for each WM component.

.. _diag-table-options:

.. list-table:: * *diag_table* Options for WM Components*
:widths: 16 24 24
:header-rows: 1

* - WM Component
- Diag Table
- Source File
* - FV3
- :ref:`FV3 Variables <fv3diagtable>`
- `GFS_diagnostics.F90 <https://github.com/NOAA-EMC/fv3atm/blob/develop/ccpp/driver/GFS_diagnostics.F90>`_
* - MOM6
- `MOM6 Variables <https://ncar.github.io/MOM6/APIs/namespacemom__diagnostics.html>`_
- `MOM_diagnostics.F90 <https://github.com/NOAA-EMC/MOM6/blob/main/src/diagnostics/MOM_diagnostics.F90>`_


A brief example of the diag_table is shown below. ``"..."`` denotes where lines have been removed.

.. _code-block-fv3-diag-table:
Expand Down
1 change: 1 addition & 0 deletions doc/UsersGuide/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
]
# Ignore working links that cause a linkcheck 403 error.
linkcheck_ignore = [r'https://agupubs\.onlinelibrary\.wiley\.com/doi/10\.1029/2020MS002260',
r'https://glossary.ametsoc.org/wiki/*',
]

# -- Options for HTML output -------------------------------------------------
Expand Down
13 changes: 13 additions & 0 deletions doc/UsersGuide/source/tables/fv3_diag_table.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
:orphan:

.. _fv3diagtable:

****************************
FV3 Weather Model Variables
****************************


.. csv-table::
:file: fv3diagtable.csv
:widths: 10, 15
:header-rows: 1
Loading

0 comments on commit a1143cc

Please sign in to comment.