- Step.add_input_file(filename=None, target=None, database=None, url=None, work_dir_target=None, package=None, copy=False)¶
Add an input file to the step (but not necessarily to the MPAS model). The file can be local, a symlink to a file that will be created in another step, a symlink to a file in one of the databases for files cached after download, and/or come from a specified URL.
filename (str, optional) – The relative path of the input file within the step’s work directory. The default is the file name (without the path) of
target (str, optional) – A file that will be the target of a symlink to
databaseis not specified, this should be an absolute path or a relative path from the step’s work directory. If
databaseis specified, this is a relative path within the database and the name of the remote file to download.
database (str, optional) – The name of a database for caching local files. This will be a subdirectory of the local cache directory for this core. If
urlis not provided, the URL for downloading the file will be determined by combining the base URL of the data server, the relative path for the core,
url (str, optional) – The URL (including file name) for downloading the file. This option should be set if the file is not in a database on the data server. The
databaseare not added to URL even if they are provided.
work_dir_target (str, optional) – Same as
targetbut with a path relative to the base work directory. This is useful if it is not easy to determine the relative path between the step’s work directory and the target.
package (str or package, optional) – A package within
compassfrom which the file should be linked
copy (bool, optional) – Whether to make a copy of the file, rather than a symlink