Used for archiving important Atlantis runs. During development stage: filenames will be prefixed using the Jira task number. Once operational: file can be prefixed using scenario, scenario id, or pushed to a scenario folder on google Drive

push_to_drive(
  id = NULL,
  localPath = here::here("output"),
  fileList = NULL,
  googledriveFolder = "Development",
  rootid = atlantisdrive::rootid,
  overwrite = FALSE
)

Arguments

id

Character string. A prefix to be added to the name of all uploaded files. The name of task/scenario/id associated with output. Defualt = NULL (No prefix)

localPath

Character string. Path to local Atlantis output directory. Files will be pushed from this directory

fileList

Character vector. Files that need to be archived on Google Drive. Specify file names in their entirety. Alternatively any character string present in file name. Default = NULL (all core files are pushed, see get_files). (Special case. fileList = NA, ALL files are pushed!)

googledriveFolder

Character String. Name of directory on google Drive to push. "Development" or "Scenarios" (Default = Development)

rootid

Drive-id. Atlantis root id on google drive. (Default id for NEFSC is bundled in this package)

overwrite

Boolean. Overwrite existing files in push (Default = FALSE. This is very time consuming)

Value

A vector of filenames. These are the files that were already present on Google Drive and were not overwritten. If overwrite = TRUE, this will be NULL

See also

Other atlantisdrive functions: gd_exists(), get_file_list(), list_atlantisom_files(), list_core_files(), pull_from_drive()

Examples

if (FALSE) { #'# Pushes all files containing the string "2008" to the Development Folder on googledrive from the output folder on your current project, adds the prefix "Basin-2000" to each file and overwites all files found on google drive push_to_drive(id="Basin-2008",fileList="2008",googledriveFolder="Development",overwrite=TRUE) # Pushes all xml files to the Development Folder on googledrive from the output folder on your current project, adds the prefix "ATLNTS-22" to each file and overwites all files found on google drive push_to_drive(id="ATLNTS-22",fileList="xml",googledriveFolder="Development",overwrite=TRUE) # Pushes all core Atlantis files to the Presentation folder on google drive (prompts user to creates folder if neccesary) from "test" folder in current project. Adds the prefix "NEFMC" to all uploaded files, overwrites. push_to_drive(id="NEFMC",localPath = here::here("test"),fileList=NULL,googledriveFolder="Presentation") # Pushes ALL files from "test" folder to "test" folder. No file prefix push_to_drive(localPath = here::here("test"), fileList = NA, googledriveFolder = "test", overwrite=TRUE) }