View source: R/cdtENSO_Seasonal_Analysis.R
cdtENSOAnalysis_netcdf | R Documentation |
Probability of seasonal climate variable tercile conditioned on ENSO.
cdtENSOAnalysis_netcdf(
seasonal.data,
seasonal.class,
enso.index,
min.frac = 0.5
)
seasonal.data |
seasonal data, output from |
seasonal.class |
character vector of length 3, indicating the tercile class of the season. Examples, |
enso.index |
Oceanic Nino Index (ONI) data, output from |
min.frac |
used to compute the probability of each ENSO phase, minimum fraction of non-missing values for each ENSO phase. |
A named list
## Not run:
library(CDT)
## Compute seasonal temperature average
seas_data <- cdtComputeSeasonal_netcdf(
season.def = list(start.year = 1981, end.year = 2020,
start.month = 12, season.length = 3),
netcdf.data = list(time.step = "dekadal",
dir = "~/DATA/TMAX/MERGED_tmax_dekad",
format = "tmax_mrg_%s%s%s_ALL.nc",
varid = "temp", ilon = 1, ilat = 2),
season.min.frac = 0.95,
aggregation.fun = "mean"
)
## ONI from CDT internal data
enso_index <- oni.cpc.ncep.noaa(12, 3)
## compute and download ONI from IRI Data Library
# enso_index <- oni.iridl.ldeo(1981, 3)
seas_class <- c("Cold", "Normal", "Hot")
enso_data <- cdtENSOAnalysis_netcdf(seas_data, seas_class, enso_index, 0.8)
library(fields)
image.plot(enso_data$lon, enso_data$lat, enso_data$enso$LaNina$Hot)
image.plot(enso_data$lon, enso_data$lat, enso_data$enso$Neutral$Cold)
image.plot(enso_data$lon, enso_data$lat, enso_data$enso$ElNino$Normal)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.