Skip to content

Commit

Permalink
fix(noaa): Fix conflicting entries for tcc after step 0
Browse files Browse the repository at this point in the history
  • Loading branch information
devsjc committed Jan 29, 2025
1 parent d79f286 commit 9fbebc8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ def _convert(path: pathlib.Path) -> ResultE[list[xr.DataArray]]:
# with names of interest. "t" is filtered out as it exists in multiple
# levels
filters: list[dict[str, list[str] | list[int] | int]] = [
{"cfVarName": ["tcc", "hcc", "lcc", "mcc"], "level": 0},
{"cfVarName": ["tcc", "hcc", "lcc", "mcc"], "level": 0, "typeOfLevel": [
"highCloudLayer", "lowCloudLayer", "middleCloudLayer", "convectiveCloudLayer",
]},
{"cfVarName": ["u10", "v10"]},
{"cfVarName": ["u100", "v100"]},
{"typeOfLevel": ["surface", "heightAboveGround"], "level": [0, 2]},
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,16 @@ class TestCase:
),
should_error=False,
),
TestCase(
filename="test_NOAAS3_HRES-GFS_tcc_20250129T00_S06.grib",
expected_coords=dataclasses.replace(
NOAAS3RawRepository.model().expected_coordinates,
init_time=[dt.datetime(2025, 1, 29, 0, tzinfo=dt.UTC)],
variable=[Parameter.CLOUD_COVER_TOTAL],
step=[6],
),
should_error=False,
),
TestCase(
filename="test_NOAAS3_HRES-GFS_aptmp_20210509T06_S00.grib",
expected_coords=NOAAS3RawRepository.model().expected_coordinates,
Expand Down

0 comments on commit 9fbebc8

Please sign in to comment.