download_from_thredds: Download NetCDF Files from THREDDS Server

View source: R/download.R

download_from_threddsR Documentation

Download NetCDF Files from THREDDS Server

Description

This function downloads NetCDF files from a specified THREDDS server catalog for a given domain and year.

Usage

download_from_thredds(
  domain = "westcoms2",
  year = 2024,
  out_dir = "~/",
  cores = 4,
  overwrite = FALSE,
  start_ymd = NULL,
  end_ymd = NULL
)

Arguments

domain

Character. The domain to download data from. Options are "westcoms2" or "etive28". Default is "westcoms2".

year

Numeric. The year of the data to download. Default is 2024.

out_dir

Character. The output directory where the downloaded files will be saved. Default is "~/".

cores

Numeric. The number of cores to use for parallel processing. Default is 4.

overwrite

Logical. Whether to overwrite existing files. Default is FALSE.

start_ymd

Date. The start date for the data to download. Default is NULL, which sets it to January 1st of the specified year.

end_ymd

Date. The end date for the data to download. Default is NULL, which sets it to December 31st of the specified year.

Value

None. The function downloads files to the specified output directory.

Examples

download_from_thredds(domain="westcoms2", year=2024, out_dir="~/data", cores=4, overwrite=FALSE, start_ymd=NULL, end_ymd=NULL)

Sz-Tim/WeStCOMS documentation built on April 17, 2025, 3:10 p.m.