Skip to content

Commit

Permalink
Add missing namelist option to UPP Schema. (#576)
Browse files Browse the repository at this point in the history
User reported missing namelist option in JSON Schema. This fixes that omission. It also adds the new option for submodelname = MPAS to the enum list. This will be an upcoming addition to UPP.
  • Loading branch information
christinaholtNOAA authored Aug 16, 2024
1 parent dfdb466 commit 1365b39
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/sections/user_guide/yaml/components/upp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The following namelists and variables can be customized:
* - Namelist
- Variables
* - ``model_inputs``
- ``datestr``, ``filename``, ``filenameflat``, ``filenameflux``, ``grib``, ``ioform``, ``modelname``
- ``datestr``, ``filename``, ``filenameflat``, ``filenameflux``, ``grib``, ``ioform``, ``modelname``, ``submodelname``
* - ``nampgb``
- ``aqf_on``, ``d2d_chem``, ``d3d_on``, ``filenameaer``, ``gccpp_on``, ``gocart_on``, ``gtg_on``, ``hyb_sigp``, ``kpo``, ``kpv``, ``kth``, ``method_blsn``, ``nasa_on``, ``numx``, ``po``, ``popascal``, ``pv``, ``rdaod``, ``slrutah_on``, ``th``, ``vtimeunits``, ``write_ifi_debug_files``

Expand Down
1 change: 1 addition & 0 deletions docs/shared/upp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ upp:
grib: grib2
ioform: netcdf
modelname: FV3R
submodelname: RTMA
nampgb:
kpo: 3
numx: 1
Expand Down
2 changes: 1 addition & 1 deletion recipe/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
"pyyaml =6.0.*"
]
},
"version": "2.4.0"
"version": "2.4.1"
}
2 changes: 1 addition & 1 deletion src/uwtools/resources/info.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "2.4.0",
"version": "2.4.1",
"buildnum": "0"
}
7 changes: 7 additions & 0 deletions src/uwtools/resources/jsonschema/upp.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@
"NMM"
],
"type": "string"
},
"submodelname": {
"enum": [
"MPAS",
"RTMA"
],
"type": "string"
}
},
"type": "object"
Expand Down
4 changes: 4 additions & 0 deletions src/uwtools/tests/test_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -1956,6 +1956,10 @@ def test_schema_upp_namelist(upp_prop):
assert "not one of ['FV3R', '3DRTMA', 'GFS', 'RAPR', 'NMM']" in errors(
{"update_values": {"model_inputs": {"modelname": "foo"}}}
)
# model_inputs: Only certain submodelname values are supported:
assert "not one of ['MPAS', 'RTMA']" in errors(
{"update_values": {"model_inputs": {"submodelname": "foo"}}}
)
# model_inputs: No other keys are supported:
assert "Additional properties are not allowed" in errors(
{"update_values": {"model_inputs": {"something": "else"}}}
Expand Down

0 comments on commit 1365b39

Please sign in to comment.