get_params: Set up various parameters needed by many of the data...

View source: R/data_extraction_functions.R

get_paramsR Documentation

Set up various parameters needed by many of the data extraction and plotting functions

Description

Set up various parameters needed by many of the data extraction and plotting functions

Usage

get_params(start_date, end_date, input_file, var_names)

Arguments

start_date

The date from which to start data extraction, in any format accepted by get_chron_date(). Can be any of: c(year, month, day) c(year, month, day, hour) POSIX date (e.g., as.Date('1970-01-01', origin='1970-01-01')) chron date character format, e.g. '1970-01-01'

end_date

The end date of the data extraction request, as above.

input_file

The URI or filename from which to extract data, in any format accepted by substitute_filename(), or "menu" or "catalog".

var_names

A list of eReefs variable names for which to extract data.

Value

list of parameter values that includes: input_file, the input filename, after transformation by substitute_filename() ereefs_case, information about the format of the input file, as output by get)ereefs_case() input_stem, the 'stem' of the filename in case the parent function needs to dynamically calculate filenames from an example netcdf filename. start_date, start_date transformed to a chron date start_day, the day of the month in start_date start_tod, the time of day in start_date (0.5 if not given) start_month, the integer month of the year in start_date start_year, the integer year in start_date end_date, end_date transformed to a chron date end_day, the day of the month in end_date end_tod, the time of day in end_date (0.5 if not given) end_month, the integer month of the year in end_date end_year, the integer year in end_date mths, a vector of months for which to extract data years, a vector of years for which to extract data var_list, a list of variable names in var_names ereefs_origin, the origin date specified for Julian dates in the netcdf file (assumed to be 1990-01-01 if not specified) blank_length, for use in initiatisng variables to be populated with extracted data ds, a date-time vector for extracted data latitude, an array of latitudes matching the format of the input file longitude, an array of longitudes


BarbaraRobson/ereefs documentation built on April 23, 2023, 5:47 a.m.