@@ -50,9 +50,8 @@ def namelist_file(self):
50
50
"""
51
51
The namelist file.
52
52
"""
53
- fn = "fort.41"
54
- yield self .taskname (fn )
55
- path = self .rundir / fn
53
+ path = self ._input_config_path
54
+ yield self .taskname (path .name )
56
55
yield asset (path , path .is_file )
57
56
base_file = self .config [STR .namelist ].get (STR .basefile )
58
57
yield file (Path (base_file )) if base_file else None
@@ -91,7 +90,7 @@ def output(self) -> dict[str, Path] | dict[str, list[Path]]:
91
90
Returns a description of the file(s) created when this component runs.
92
91
"""
93
92
with TemporaryDirectory () as path :
94
- nml = Path (path , "fort.41" )
93
+ nml = Path (path , self . _input_config_path . name )
95
94
self .create_user_updated_config (
96
95
config_class = NMLConfig ,
97
96
config_values = self .config [STR .namelist ],
@@ -100,3 +99,20 @@ def output(self) -> dict[str, Path] | dict[str, list[Path]]:
100
99
)
101
100
namelist = get_nml_config (nml )
102
101
return {"path" : self .rundir / namelist ["config" ]["output_file" ]}
102
+
103
+ # Private helper methods
104
+
105
+ @property
106
+ def _input_config_path (self ) -> Path :
107
+ """
108
+ Path to the input config file.
109
+ """
110
+ return self .rundir / "mpassit.nml"
111
+
112
+ @property
113
+ def _runcmd (self ) -> str :
114
+ """
115
+ The full command-line component invocation.
116
+ """
117
+ executable = self .config [STR .execution ][STR .executable ]
118
+ return "%s %s" % (executable , self ._input_config_path .name )
0 commit comments