compass.Step.add_input_file¶
- Step.add_input_file(filename=None, target=None, database=None, url=None, work_dir_target=None, package=None, copy=False)[source]¶
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.
- Parameters
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
.target (str, optional) – A file that will be the target of a symlink to
filename
. Ifdatabase
is not specified, this should be an absolute path or a relative path from the step’s work directory. Ifdatabase
is 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
url
is 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,database
andtarget
.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
filename
,target
anddatabase
are not added to URL even if they are provided.work_dir_target (str, optional) – Same as
target
but 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
compass
from which the file should be linkedcopy (bool, optional) – Whether to make a copy of the file, rather than a symlink