View source: R/calc_climatology_anomaly.R
calc_anom | R Documentation |
Function for calculating climatology of a pacea data object.
calc_anom(
data,
clim_years = c(1991:2020),
clim_time = "month",
time_period_return = "all",
years_return
)
data |
pacea data object: BCCM, OISST, buoy_sst data only |
clim_years |
climatology period years |
clim_time |
time units (e.g. month) to summarize climatologies |
time_period_return |
vector of value(s) for the specific time units to estimate climatologies (e.g. '4' for week 4 or April). Set to equal 'all' for all time units. |
years_return |
vector of value(s) to return the years of interest. Defaults to all years in input data |
The functions 'calc_clim' and 'calc_anom' output the climatology of a specified time period and anomaly values relative to a climtological period, respectively. These functions can be used for data from BCCM (e.g. 'bccm_surface_temperature()'), OISST (e.g. 'oisst_7day'), and buoy SST (e.g. 'buoy_sst').
anomaly data values of same class as input pacea data
## Not run:
pdata <- bccm_surface_temperature()
anom_bccm <- calc_anom(pdata)
head(anom_bccm)
anom_bccm2 <- calc_anom(pdata, time_period_return = c(1, 6), years_return = 1999)
head(anom_bccm2)
# oisst data
anom_oi <- calc_anom(oisst_7day)
head(anom_oi)
# pacea buoy sst data
anom_buoy <- calc_anom(buoy_sst)
head(anom_buoy)
anom_buoy2 <- calc_anom(buot_sst, clim_time = "week")
head(anom_buoy2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.