From c967a0fc437661981df803475b41f7b8e216c234 Mon Sep 17 00:00:00 2001 From: Paul Madden Date: Tue, 11 Jun 2024 19:00:37 +0000 Subject: [PATCH] DRY --- src/uwtools/drivers/ww3.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/uwtools/drivers/ww3.py b/src/uwtools/drivers/ww3.py index 965674e32..eaa8b0b99 100644 --- a/src/uwtools/drivers/ww3.py +++ b/src/uwtools/drivers/ww3.py @@ -52,9 +52,10 @@ def namelist_file(self): yield self._taskname(fn) path = self._rundir / fn yield asset(path, path.is_file) - yield file(path=Path(self._driver_config["namelist"]["template_file"])) + template_file = Path(self._driver_config["namelist"]["template_file"]) + yield file(template_file) render( - input_file=Path(self._driver_config["namelist"]["template_file"]), + input_file=template_file, output_file=path, overrides=self._driver_config["namelist"]["template_values"], )