Skip to content
Open
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 changelog/72.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated the description of `ci_tavg-u-hxy-u` and `sci_tavg-u-hxy-u` to clarify what to do when regridding native grids (see [DR #87](https://github.com/CMIP-Data-Request/Harmonised-Public-Consultation/issues/87))
41 changes: 41 additions & 0 deletions scripts/87-dr-fixes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
"""
Fixes from DR #87
"""

from __future__ import annotations

import json
from pathlib import Path


def main():
"""
Apply the fixes
"""
REPO_ROOT = Path(__file__).parents[1]

for branded_variable, new_description in (
(
"ci_tavg-u-hxy-u",
"Fraction of time that convection occurs in the grid cell. If native cell data is regridded, the area-weighted mean of the contributing cells should be reported.",
),
(
"sci_tavg-u-hxy-u",
"Fraction of time that convection occurs in the grid cell. If native cell data is regridded, the area-weighted mean of the contributing cells should be reported.",
),
):
with open(
REPO_ROOT / "src-data" / "variable" / f"{branded_variable}.json"
) as fh:
working = json.load(fh)

working["description"] = new_description

with open(
REPO_ROOT / "src-data" / "variable" / f"{branded_variable}.json", "w"
) as fh:
json.dump(working, fh, indent=4)


if __name__ == "__main__":
main()
2 changes: 1 addition & 1 deletion src-data/variable/ci_tavg-u-hxy-u.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "ci_tavg-u-hxy-u",
"validation-key": "ci_tavg-u-hxy-u",
"ui-label": "Fraction of Time Convection Occurs in Cell",
"description": "Fraction of time that convection occurs in the grid cell .",
"description": "Fraction of time that convection occurs in the grid cell. If native cell data is regridded, the area-weighted mean of the contributing cells should be reported.",
"area-label": "u",
"cell-measures": "area: areacella",
"cell-methods": "area: time: mean",
Expand Down
2 changes: 1 addition & 1 deletion src-data/variable/sci_tavg-u-hxy-u.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "sci_tavg-u-hxy-u",
"validation-key": "sci_tavg-u-hxy-u",
"ui-label": "Fraction of Time Shallow Convection Occurs",
"description": "Fraction of time that shallow convection occurs in the grid cell.",
"description": "Fraction of time that convection occurs in the grid cell. If native cell data is regridded, the area-weighted mean of the contributing cells should be reported.",
"area-label": "u",
"cell-measures": "area: areacella",
"cell-methods": "area: time: mean",
Expand Down
Loading