diff --git a/docs/Makefile b/docs/Makefile index a05140390..b71e5689c 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -13,7 +13,7 @@ clean: docs: $(MAKE) html - linkchecker --check-extern --no-warnings build/html/index.html + linkchecker --check-extern --no-warnings --user-agent Mozilla/5.0 build/html/index.html examples: COLUMNS=80 $(MAKE) -C sections diff --git a/docs/sections/user_guide/yaml/components/ungrib.rst b/docs/sections/user_guide/yaml/components/ungrib.rst index 9f1305bb9..386f41d4a 100644 --- a/docs/sections/user_guide/yaml/components/ungrib.rst +++ b/docs/sections/user_guide/yaml/components/ungrib.rst @@ -20,22 +20,22 @@ execution: See :ref:`this page ` for details. -gfs_files: +gribfiles: ^^^^^^^^^^ Describes the GRIB-formatted files to be processed by ``ungrib``. - **forecast_length:** + **interval_hours:** - The length of the forecast in integer hours. + Frequency interval of the given files, in integer hours. - **offset:** + **max_leadtime:** - How many hours earlier the external model used for boundary conditions started compared to the desired forecast cycle, in integer hours. + The maximum forecast leadtime to process. This may be the same as the forecast length, or a lower leadtime. - **interval_hours:** + **offset:** - Frequency interval of the given files, in integer hours. + How many hours earlier the external model used for boundary conditions started compared to the desired forecast cycle, in integer hours. **path:** diff --git a/docs/shared/ungrib.yaml b/docs/shared/ungrib.yaml index c7b8ed985..974dbf65e 100644 --- a/docs/shared/ungrib.yaml +++ b/docs/shared/ungrib.yaml @@ -4,9 +4,9 @@ ungrib: cores: 1 walltime: "00:01:00" executable: /path/to/ungrib.exe - gfs_files: - forecast_length: 24 + gribfiles: interval_hours: 6 + max_leadtime: 24 offset: 0 path: /path/to/dir/gfs.t{cycle_hour:02d}z.pgrb2.0p25.f{forecast_hour:03d} rundir: /path/to/run/dir diff --git a/src/uwtools/drivers/ungrib.py b/src/uwtools/drivers/ungrib.py index 22715fd22..9029ea930 100644 --- a/src/uwtools/drivers/ungrib.py +++ b/src/uwtools/drivers/ungrib.py @@ -27,15 +27,15 @@ def gribfiles(self): Symlinks to all the GRIB files. """ yield self.taskname("GRIB files") - gfs_files = self.config["gfs_files"] - offset = abs(gfs_files["offset"]) - endhour = gfs_files["forecast_length"] + offset - interval = gfs_files["interval_hours"] + gribfiles = self.config["gribfiles"] + offset = abs(gribfiles["offset"]) + endhour = gribfiles["max_leadtime"] + offset + interval = gribfiles["interval_hours"] cycle_hour = int((self._cycle - timedelta(hours=offset)).strftime("%H")) links = [] for n, boundary_hour in enumerate(range(offset, endhour + 1, interval)): infile = Path( - gfs_files["path"].format(cycle_hour=cycle_hour, forecast_hour=boundary_hour) + gribfiles["path"].format(cycle_hour=cycle_hour, forecast_hour=boundary_hour) ) link_name = self.rundir / f"GRIBFILE.{_ext(n)}" links.append((infile, link_name)) @@ -47,10 +47,10 @@ def namelist_file(self): The namelist file. """ # Do not use offset here. It's relative to the MPAS fcst to run. - gfs_files = self.config["gfs_files"] - endhour = gfs_files["forecast_length"] + gribfiles = self.config["gribfiles"] + endhour = gribfiles["max_leadtime"] end_date = self._cycle + timedelta(hours=endhour) - interval = int(gfs_files["interval_hours"]) * 3600 # hour to sec + interval = int(gribfiles["interval_hours"]) * 3600 # hour to sec d = { "update_values": { "share": { diff --git a/src/uwtools/resources/jsonschema/ungrib.jsonschema b/src/uwtools/resources/jsonschema/ungrib.jsonschema index 9ba6bc36c..fc3570ee2 100644 --- a/src/uwtools/resources/jsonschema/ungrib.jsonschema +++ b/src/uwtools/resources/jsonschema/ungrib.jsonschema @@ -6,14 +6,14 @@ "execution": { "$ref": "urn:uwtools:execution-parallel" }, - "gfs_files": { + "gribfiles": { "additionalProperties": false, "properties": { - "forecast_length": { + "interval_hours": { "minimum": 1, "type": "integer" }, - "interval_hours": { + "max_leadtime": { "minimum": 1, "type": "integer" }, @@ -26,8 +26,8 @@ } }, "required": [ - "forecast_length", "interval_hours", + "max_leadtime", "offset", "path" ], @@ -42,7 +42,7 @@ }, "required": [ "execution", - "gfs_files", + "gribfiles", "rundir", "vtable" ], diff --git a/src/uwtools/tests/drivers/test_ungrib.py b/src/uwtools/tests/drivers/test_ungrib.py index 0a12af8a0..c60bb43a9 100644 --- a/src/uwtools/tests/drivers/test_ungrib.py +++ b/src/uwtools/tests/drivers/test_ungrib.py @@ -28,9 +28,9 @@ def config(tmp_path): }, "executable": str(tmp_path / "ungrib.exe"), }, - "gfs_files": { - "forecast_length": 12, + "gribfiles": { "interval_hours": 6, + "max_leadtime": 12, "offset": 6, "path": str(tmp_path / "gfs.t{cycle_hour:02d}z.pgrb2.0p25.f{forecast_hour:03d}"), }, diff --git a/src/uwtools/tests/test_schemas.py b/src/uwtools/tests/test_schemas.py index 0dea9b146..8c0fefbf7 100644 --- a/src/uwtools/tests/test_schemas.py +++ b/src/uwtools/tests/test_schemas.py @@ -1960,9 +1960,9 @@ def test_schema_shave_rundir(shave_prop): def test_schema_ungrib(): config = { "execution": {"executable": "/tmp/ungrib.exe"}, - "gfs_files": { - "forecast_length": 24, + "gribfiles": { "interval_hours": 6, + "max_leadtime": 24, "offset": 0, "path": "/tmp/gfs.t12z.pgrb2.0p25.f000", }, @@ -1973,7 +1973,7 @@ def test_schema_ungrib(): # Basic correctness: assert not errors(config) # All top-level keys are required: - for key in ("execution", "gfs_files", "rundir", "vtable"): + for key in ("execution", "gribfiles", "rundir", "vtable"): assert f"'{key}' is a required property" in errors(with_del(config, key)) # Additional top-level keys are not allowed: assert "Additional properties are not allowed" in errors({**config, "foo": "bar"})