Skip to content

Commit bf13a3d

Browse files
authored
[release/v1] Updating from main in preparation for PR to main. (ESCOMP#127)
This PR merges the latest commits from main, reconciling with recent rules/standards changes in this branch. After this is merged we can start the process of making this major merge back to main.
1 parent 777e89e commit bf13a3d

12 files changed

+6101
-108
lines changed

.github/PULL_REQUEST_TEMPLATE

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<!-- Please read all instructions, then fill out the following template.-->
2+
3+
<!-- If this PR includes changes to standard names, you must update the Markdown and YAML files
4+
to be consistent with your changes to standard_names.xml.
5+
6+
This can be done by running the following commands:
7+
8+
tools/write_standard_name_table.py --output-format md standard_names.xml
9+
10+
This script requires the pyyaml Python package; to install with pip use command:
11+
python -m pip install PyYaml
12+
For conda users, environment file tools/environment.yml is provided.
13+
14+
Note that the above procedure assumes your changes were made to standard_names.xml If you instead
15+
made your changes to one of the human-readable files (Metadata-standard-names.md or
16+
Metadata-standard-names.yaml), YOU MUST UPDATE THE FILE standard_names.xml MANUALLY, otherwise your
17+
changes may be lost.
18+
-->
19+
20+
<!-- Include a short, descriptive title in the field above. If this PR is for a branch other than
21+
`main`, include the destination branch name in brackets at the beginning, e.g.:
22+
23+
[release/v1] Bugfix for release/v1 branch
24+
25+
Tag this pull request with appropriate labels. If you do not have permission to add labels, list
26+
the labels you’d like to include in your PR description
27+
28+
If this PR is not ready to be reviewed or merged, open as a draft, and include "DRAFT:" as a prefix
29+
to the title above.
30+
31+
Developers listed in the CODEOWNERS file will automatically be assigned to review your Pull Request.
32+
If your contribution should be reviewed by anyone else, assign those reviewers manually from the
33+
menu at right, or by tagging them with @USERNAME in the Description text.
34+
35+
Changes to standard names and/or descriptions should be made in the standard_names.xml file. The
36+
files Metadata-standard-names.md and Metadata-standard-names.yaml will need to be updated before
37+
a pull request is merged; this can be done manually by the PR author using the script
38+
tools/write_standard_name_table.py or will be done by the Code Manager prior to merging via Github
39+
Actions.
40+
41+
Be sure to check in on the PR regularly to respond to comments/questions/reviews!
42+
-->
43+
44+
## Description
45+
<!-- One or more paragraphs describing the proposed changes and the reasoning behind them. -->
46+
47+
## Issues
48+
<!-- Link any associated GitHub issues in this or other repositories here. -->
49+
50+
Lines changed: 53 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
11
name: Pull request checks
22

33
on:
4-
pull_request:
54
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- main
8+
- release/*
69

710
jobs:
811
check-unique-standard-names:
12+
name: Check for duplicates in standard names
913
runs-on: ubuntu-latest
1014
steps:
11-
- uses: actions/checkout@v4
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
1217

13-
- uses: actions/setup-python@v4
18+
- name: Setup Python
19+
uses: actions/setup-python@v4
1420
with:
1521
python-version: "3.x"
1622

17-
- name: Install xmllint
23+
- name: Install dependencies
1824
run: |
19-
sudo apt-get update
20-
sudo apt-get -y install libxml2-utils
25+
sudo apt-get update
26+
sudo apt-get -y install libxml2-utils
2127
2228
- name: Check for duplicate standard names, descriptions
2329
run: |
@@ -32,42 +38,66 @@ jobs:
3238
- name: Checkout repository
3339
uses: actions/checkout@v4
3440

35-
- uses: actions/setup-python@v4
41+
- name: Setup Python
42+
uses: actions/setup-python@v4
3643
with:
3744
python-version: "3.x"
3845

39-
# Install dependencies
4046
- name: Install dependencies
4147
run: |
4248
sudo apt-get update
4349
sudo apt-get -y install libxml2-utils
4450
45-
4651
- name: Checks standard names against character rules
4752
run: |
4853
python3 tools/check_name_rules.py -s standard_names.xml
4954
50-
check-rerendered-markdown:
55+
test-rendering:
56+
name: Test rendering xml file to markdown and yaml
5157
runs-on: ubuntu-latest
5258
steps:
53-
- uses: actions/checkout@v4
59+
- name: Checkout repository
60+
uses: actions/checkout@v4
5461

55-
- uses: actions/setup-python@v4
62+
- name: Setup Python
63+
uses: actions/setup-python@v4
5664
with:
5765
python-version: "3.x"
5866

59-
- name: Install xmllint
67+
- name: Install dependencies
6068
run: |
61-
sudo apt-get update
62-
sudo apt-get -y install libxml2-utils
69+
sudo apt-get update
70+
sudo apt-get -y install libxml2-utils
71+
python -m pip install --upgrade pip
72+
python -m pip install PyYaml
6373
64-
- name: Check markdown has been rerendered
74+
- name: Test rendering xml file to markdown
6575
run: |
66-
# Checks if the saved markdown matches freshly rendered markdown.
67-
# If this fails you have likely forgotten to rerun the write script
68-
# after adding a new name, or updating its description.
69-
checksum=$(sha256sum Metadata-standard-names.md)
70-
tools/write_standard_name_table.py standard_names.xml
71-
test "$checksum" = "$(sha256sum Metadata-standard-names.md)"
72-
76+
# Checks if the saved markdown matches freshly rendered markdown.
77+
# If this fails, prompt user to update
78+
tools/write_standard_name_table.py --output-format md standard_names.xml
79+
if ! git diff --exit-code --quiet; then
80+
echo "❌ Detected that Metadata-standard-names.md is not consistent with standard_names.xml"
81+
echo "✅ To fix: Run the following command locally and commit the result:"
82+
echo " tools/write_standard_name_table.py --output-format md standard_names.xml"
83+
echo "📘 This script requires the pyyaml Python package; to install with pip use command:"
84+
echo " python -m pip install PyYaml"
85+
echo "📘 For conda users, environment file tools/environment.yml is provided."
86+
echo
87+
exit 1
88+
fi
89+
90+
- name: Test rendering xml file to yaml
91+
run: |
92+
tools/write_standard_name_table.py --output-format yaml standard_names.xml
93+
if ! git diff --exit-code --quiet; then
94+
echo "❌ Detected that Metadata-standard-names.yaml is not consistent with standard_names.xml"
95+
echo "✅ To fix: Run the following command locally and commit the result:"
96+
echo " tools/write_standard_name_table.py --output-format yaml standard_names.xml"
97+
echo "📘 This script requires the pyyaml Python package; to install with pip use command:"
98+
echo " python -m pip install PyYaml"
99+
echo "📘 For conda users, environment file tools/environment.yml is provided."
100+
echo
101+
exit 1
102+
fi
73103

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# These owners will be the default owners for everything in the repo.
55

6-
* @cacraigucar @climbfuji @dustinswales @gold2718 @grantfirl @mattldawson @mkavulich @mwaxmonsky @nusbaume @peverwhee @svahl991 @MayeulDestouches @ss421
6+
* @cacraigucar @climbfuji @dustinswales @gold2718 @grantfirl @mattldawson @mkavulich @mwaxmonsky @nusbaume @peverwhee @MarekWlasak @svahl991 @ss421
77

88
# Order is important. The last matching pattern has the most precedence.
99
# So if a pull request only touches javascript files, only these owners

Metadata-standard-names.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* [diagnostics](#diagnostics)
1010
* [atmospheric_composition](#atmospheric_composition)
1111
* [atmospheric_composition: GOCART aerosols](#atmospheric_composition-gocart-aerosols)
12+
* [atmospheric_composition: GLOMAP/UKCA aerosols](#atmospheric_composition-glomapukca-aerosols)
1213
* [emissions](#emissions)
1314
* [Application-specific variables](#application-specific-variables)
1415
* [system variables](#system-variables)
@@ -301,7 +302,7 @@ Currently, the only dimension which supports all six dimension types is horizont
301302
* `integer`: units = index
302303
* `vertical_index_at_top_interface`: Vertical index at top interface
303304
* `integer`: units = index
304-
* `number_of_openmp_threads`: Total number of OpenMP (shared-memory) parallel threads.
305+
* `number_of_openmp_threads`: Total number of thread blocks OpenMP (shared-memory) parallel threads.
305306
* `integer`: units = count
306307
## constants
307308
Constant parameters that should be identical across a full modeling system
@@ -686,6 +687,15 @@ Note that appending '_on_previous_timestep' to standard_names in this section yi
686687
* `real`: units = m-1
687688
* `volume_extinction_in_air_due_to_aerosol_particles_lambda3`: Aerosol extinction at wavelength3
688689
* `real`: units = m-1
690+
## atmospheric_composition: GLOMAP/UKCA aerosols
691+
* `mass_fraction_of_dust_coarse_aerosol_particles_in_air`: Mass fraction of dust coarse aerosol particles in air
692+
* `real(kind=kind_phys)`: units = kg kg-1
693+
* `mass_fraction_of_dust_accumulation_aerosol_particles_in_air`: Mass fraction of dust accumulation aerosol particles in air
694+
* `real(kind=kind_phys)`: units = kg kg-1
695+
* `number_fraction_of_coarse_aerosol_particles_in_air`: Number fraction of coarse aerosol particles in air
696+
* `real(kind=kind_phys)`: units = 1
697+
* `number_fraction_of_accumulation_aerosol_particles_in_air`: Number fraction of accumulation aerosol particles in air
698+
* `real(kind=kind_phys)`: units = 1
689699
## emissions
690700
Emissions variables, contributed for the Community Emissions Data System (CEDS)
691701
* `emissions_of_co_due_to_anthropogenic_sources`: Carbon monoxide emissions from anthropogenic sources, total

0 commit comments

Comments
 (0)