Title: | Spring Phenological Indices |
---|---|
Description: | Computes the extended spring indices (SI-x) and false spring exposure indices (FSEI). The SI-x indices are standard indices used for analysis in spring phenology studies. In addition, the FSEI is also from research on the climatology of false springs and adjusted to include an early and late false spring exposure index. The indices include the first leaf index, first bloom index, and false spring exposure indices, along with all calculations for all functions needed to calculate each index. The main function returns all indices, but each function can also be run separately. Allstadt et al. (2015) <doi: 10.1088/1748-9326/10/10/104008> Ault et al. (2015) <doi: 10.1016/j.cageo.2015.06.015> Peterson and Abatzoglou (2014) <doi: 10.1002/2014GL059266> Schwarz et al. (2006) <doi: 10.1111/j.1365-2486.2005.01097.x> Schwarz et al. (2013) <doi: 10.1002/joc.3625>. |
Authors: | Adrienne M. Wootten (University of Oklahoma) |
Maintainer: | Adrienne M. Wootten <[email protected]> |
License: | Unlimited |
Version: | 0.5.0 |
Built: | 2025-02-13 03:25:38 UTC |
Source: | https://github.com/cran/springpheno |
Example data for use with the springpheno package. Includes high temperatures, low temperatures, latitude for Baton Rouge, LA along with the years of data available in the example dataset.
data("BatonRouge")
data("BatonRouge")
Two matrices, a scalar, and a vector
TMAX
a numeric matrix
TMIN
a numeric matrix
lat
a numeric scalar
YEAR
a numeric vector
TMAX contains daily high temperature (degF) for Baton Rouge, LA from 1981-2005 TMIN contains daily low temperature (degF) for Baton Rouge, LA from 1981-2005 lat is the latitude of Baton Rouge, LA YEAR is the vector of years 1981-2005
data(BatonRouge) ## maybe str(BatonRouge) ; plot(BatonRouge) ...
data(BatonRouge) ## maybe str(BatonRouge) ; plot(BatonRouge) ...
Given the multiple years of daily high and low temperatures and the latitude for the location, this function will calculate the extended spring indices (SI-x, Schwarz et al. 2006; Schwarz et al. 2013), false spring indicators, and the early and late false spring exposure indices (EFSEI, LFSEI, Peterson and Abatzoglou, 2014; Allstadt et al. 2015). The extended spring indices are calculated in a similar manner to Ault et al. (2015) with the correction implemented as suggested by Allstadt et al. (2015).
calc_si(TMAX, TMIN, lat,missingcalc="mean")
calc_si(TMAX, TMIN, lat,missingcalc="mean")
TMAX |
Matrix - daily high temperatures (degrees Fahrenheit). This is matrix of 366 rows (on per each day of year) and N columns (representing the total number of years). There should always be 366 days supplied to this function, as the SI-x will calculate a replacement for missing values and leap days during non-leap years. |
TMIN |
Matix - daily low temperatures (degrees Fahrenheit). This should be the same size and structure as TMAX. |
lat |
Scalar - latitude of the location of interest in decimal degrees. |
missingcalc |
Scalar - character which signifies which approach will be taken to address missing values. The current options are "mean" (default) and "loess". The "mean" option means that calc_si will use the monthly mean to replace missing values which appear during the same month. The "loess" option means that calc_si will use a loess regression to estimate missing temperature values. |
While each individual function in the springpheno package can be run independently, the calc_si function does wrap through all the associated functions in the springpheno package and produce results from all functions.
The output is a list containing the following:
FLImat |
Matrix - First Leaf Index (FLI). This is a matrix of N rows (one row per year) by 4 columns. The 4 columns correspond to the mean first leaf and the first leaf for plants 1-3 [mean,plant 1, plant 2, plant 3] |
FBImat |
Matrix - First Bloom Index (FBI). This is a matrix of N rows (one row per year) by 4 columns. The 4 columns correspond to the mean first bloom and the first bloom for plants 1-3 [mean,plant 1, plant 2, plant 3] |
DMGmat |
Matrix - Damage Index (days). This is a matrix of N rows (one row per year) by 4 columns. The 4 columns correspond to the mean damage index and the damage index for plants 1-3 [mean,plant 1, plant 2, plant 3] |
lastfreeze |
Vector - Day of Last Spring Freeze. This is a vector of length N years holding the last spring freeze for each year of data supplied to calc_is |
FSmat |
Matrix - False Spring Indicators. This is a matrix of N rows (one row per year) by 2 columns. The two columns represent each of the false spring indicators [early false spring, late false spring]. A value of 1 in either column represents that a false spring occurred. A value of 0 represents that a false spring did not occur. |
FSEImat |
Vector - False Spring Exposure Index. This is a vector of length 2. There is one value of FSEI each for the early and late false springs. [early FSEI, late FSEI]. |
Thresholds for base temperature (baset=31) and freezing temperature (frzval=28) are fixed in this code. This matches Ault et al. (2015), but it could be changed to an extra argument for this function in later versions.
FSmat and FSEImat are current calculated using the first values of FLImat and FBImat. This is also consistent with prior code, but could be altered to provide the FSmat and FSEImat based on all four values of FLImat and FBImat.
Adrienne M. Wootten (University of Oklahoma)
Allstadt, A.J., S.J. Vavrus, P.J. Heglund, A.M Pidgeon, W. E. Thogmartin and V.C. Radeloff, 2015: Spring plant phenology and false springs in the conterminous US during the 21st century. Environmental Research Letters, 10, DOI: 10.1088/1748-9326/10/10/104008
Ault, T.R., R. Zurita-Miller and M. Schwarz, 2015: A Matlab© toolbox for calculating spring indices from daily meteorological data. Computers and Geosciences, 83, DOI: 10.1016/j.cageo.2015.06.015
Peterson, A.G. and J.T. Abatzoglou, 2014: Observed changes in false springs over the contiguous United States. Geophysical Research Letters, 41, DOI: 10.1002/2014GL059266
Schwarz, M., R. Ahas and A. Aasa, 2006: Onset of spring starting earlier across the Northern Hemisphere, 12, DOI: 10.1111/j.1365-2486.2005.01097.x
Schwarz, M., T.R. Ault and J.L. Betancourt, 2013: Spring onset variations and trends in the continental United States: Past and regional assessment using temperature-based indices. International Journal of Climatology, 33, DOI: 10.1002/joc.3625
data("BatonRouge") RESULTS = calc_si(TMAX,TMIN,lat) # calc_si runs all SI-x calculations #### # Plotting First Leaf Index oldpar <- par(mfrow = c(1,1)) ylimrange = range(RESULTS$FLImat) ylimrange[1]=ylimrange[1]-10 ylimrange[2]=ylimrange[2]+10 plot(RESULTS$FLImat[,1]~YEAR,type="b",pch=19,lwd=2,ylim=ylimrange) ##### # Plotting First Bloom Index ylimrange = range(RESULTS$FBImat) ylimrange[1]=ylimrange[1]-10 ylimrange[2]=ylimrange[2]+10 plot(RESULTS$FBImat[,1]~YEAR,type="b",pch=19,lwd=2,ylim=ylimrange) ##### # Plotting Day of Last Freeze ylimrange = range(RESULTS$lastfreeze) ylimrange[1]=ylimrange[1]-10 ylimrange[2]=ylimrange[2]+10 plot(RESULTS$lastfreeze~YEAR,type="b",pch=19,lwd=2,ylim=ylimrange) ##### # Plotting False Springs ylimrange = range(RESULTS$FSmat) ylimrange[2]=ylimrange[2]+0.5 par(mfrow=c(2,1)) plot(RESULTS$FSmat[,1]~YEAR,type="b",pch=19,ylim=ylimrange) plot(RESULTS$FSmat[,2]~YEAR,type="b",pch=19,ylim=ylimrange) par(oldpar)
data("BatonRouge") RESULTS = calc_si(TMAX,TMIN,lat) # calc_si runs all SI-x calculations #### # Plotting First Leaf Index oldpar <- par(mfrow = c(1,1)) ylimrange = range(RESULTS$FLImat) ylimrange[1]=ylimrange[1]-10 ylimrange[2]=ylimrange[2]+10 plot(RESULTS$FLImat[,1]~YEAR,type="b",pch=19,lwd=2,ylim=ylimrange) ##### # Plotting First Bloom Index ylimrange = range(RESULTS$FBImat) ylimrange[1]=ylimrange[1]-10 ylimrange[2]=ylimrange[2]+10 plot(RESULTS$FBImat[,1]~YEAR,type="b",pch=19,lwd=2,ylim=ylimrange) ##### # Plotting Day of Last Freeze ylimrange = range(RESULTS$lastfreeze) ylimrange[1]=ylimrange[1]-10 ylimrange[2]=ylimrange[2]+10 plot(RESULTS$lastfreeze~YEAR,type="b",pch=19,lwd=2,ylim=ylimrange) ##### # Plotting False Springs ylimrange = range(RESULTS$FSmat) ylimrange[2]=ylimrange[2]+0.5 par(mfrow=c(2,1)) plot(RESULTS$FSmat[,1]~YEAR,type="b",pch=19,ylim=ylimrange) plot(RESULTS$FSmat[,2]~YEAR,type="b",pch=19,ylim=ylimrange) par(oldpar)
This function calculates the estimated day of the calendar year where the chill requirement is met for each of the three plants used in the extended spring indices (SI-x, Schwarz et al. 2006; 2013).
chilldate(tasmax, tasmin, DOY, daylen, baset, plant = 1)
chilldate(tasmax, tasmin, DOY, daylen, baset, plant = 1)
tasmax |
Vector - daily high temperatures for a given year |
tasmin |
Vector - daily low temperatures for a given year |
DOY |
Vector - day of year values for a given year (1:365 or 1:366 depending on calendar) |
daylen |
Vector - day lengths for each day for a given year (calculated from daylength function). |
baset |
Scalar - base temperature for determining chill hours. Typically this is 44.96 degrees Fahrenheit, but can be plant specific. |
plant |
Plant type 1 (default), 2, or 3. plant = 1 for lilac, plant = 2 for arnold red, or plant =3 for zabelli. |
chillDOY - scalar, estimated day of year the chill requirement for the specified plant is met.
Many questions regarding how this is calculated, use this function at your own risk.
Adrienne M. Wootten (University of Oklahoma)
Schwarz, M., R. Ahas and A. Aasa, 2006: Onset of spring starting earlier across the Northern Hemisphere, 12, DOI: 10.1111/j.1365-2486.2005.01097.x
Schwarz, M., T.R. Ault and J.L. Betancourt, 2013: Spring onset variations and trends in the continental United States: Past and regional assessment using temperature-based indices. International Journal of Climatology, 33, DOI: 10.1002/joc.3625
This function calculates the chill hours for a given day and plant given the high and low temperature, plant base temperature, and day length (from the daylength function). Still in development, but based on Schwarz et al. (2006 and 2013)
chillh(tmax, tmin, daylen, baset)
chillh(tmax, tmin, daylen, baset)
tmax |
Scalar - daily high temperature in degrees Fahrenheit |
tmin |
Scalar - daily low temperature in degrees Fahrenheit |
daylen |
Scalar - day length in hours |
baset |
Scalar - base temperature for determining chill hours. Typically this is 44.96 degrees Fahrenheit, but can be plant specific. |
CHOUR - total chill hours for a given day. That is, number of hours the temperature fell below baset.
Adrienne M. Wootten (University of Oklahoma)
Schwarz, M., R. Ahas and A. Aasa, 2006: Onset of spring starting earlier across the Northern Hemisphere, 12, DOI: 10.1111/j.1365-2486.2005.01097.x
Schwarz, M., T.R. Ault and J.L. Betancourt, 2013: Spring onset variations and trends in the continental United States: Past and regional assessment using temperature-based indices. International Journal of Climatology, 33, DOI: 10.1002/joc.3625
daystop <- 366 lat <- 35.476 # latitude for OKC daylen <- daylength(daystop=daystop,lat=lat) tmax <- 65 tmin <- 42 dlen <- daylen[60] bt <- 44.96 result <- chillh(tmax,tmin,dlen,bt)
daystop <- 366 lat <- 35.476 # latitude for OKC daylen <- daylength(daystop=daystop,lat=lat) tmax <- 65 tmin <- 42 dlen <- daylen[60] bt <- 44.96 result <- chillh(tmax,tmin,dlen,bt)
This function calculates the damage index (Schwarz et al. 2006, Schwarz et al. 2013) given the first leaf index (FLI) and day of year for the last spring freeze. This is based on the calculation done in the original Matlab code base (Ault et al. 2015).
damageindex(leafidx, lastfreeze)
damageindex(leafidx, lastfreeze)
leafidx |
Scalar - FLI value from the leafindex function. It's recommended to use the average, but one could also use the FLI for the individual plants. |
lastfreeze |
Scalar - day of year of the last spring freeze. |
The output is a scalar with the value of the damage index. The damage index is effectively the difference between the FLI and the last freeze. Negative values are converted to zero as no damage occurs if the last freeze is before the first leaf.
Adrienne M. Wootten (University of Oklahoma)
Ault, T.R., R. Zurita-Miller and M. Schwarz, 2015: A Matlab© toolbox for calculating spring indices from daily meteorological data. Computers and Geosciences, 83, DOI: 10.1016/j.cageo.2015.06.015
Schwarz, M., R. Ahas and A. Aasa, 2006: Onset of spring starting earlier across the Northern Hemisphere, 12, DOI: 10.1111/j.1365-2486.2005.01097.x
Schwarz, M., T.R. Ault and J.L. Betancourt, 2013: Spring onset variations and trends in the continental United States: Past and regional assessment using temperature-based indices. International Journal of Climatology, 33, DOI: 10.1002/joc.3625
The function daylength will calculate the day length for a given for all days of the year up to the user defined day of the year and latitude of the location. Essentially this is the number of hours of daylight for given location for each day. The formula for day length calculation is retained from Ault et al. (2015).
daylength(daystop, lat)
daylength(daystop, lat)
daystop |
Scalar - Calendar day of year from 1 to 366 where the function should cease day length calculations |
lat |
Scalar - latitude of the locations, in decimal degrees |
DAYLEN - vector of length equal to input daystop describing the total hours of daylight per day.
Adrienne M. Wootten (University of Oklahoma)
Ault, T.R., R. Zurita-Miller and M. Schwarz, 2015: A Matlab© toolbox for calculating spring indices from daily meteorological data. Computers and Geosciences, 83, DOI: 10.1016/j.cageo.2015.06.015
daystop <- 366 lat <- 35.476 # latitude for OKC result <- daylength(daystop=daystop,lat=lat)
daystop <- 366 lat <- 35.476 # latitude for OKC result <- daylength(daystop=daystop,lat=lat)
Given the information about the first leaf, first bloom, and freeze events, this function determines if an early false spring and late false spring occurred. The calculations here are based on the work of Peterson and Abatzoglou (2014) and Allstadt et al. (2015).
falsesprings(SI = c(60, 65), freezedata)
falsesprings(SI = c(60, 65), freezedata)
SI |
Vector - the first leaf index (FLI) and first bloom index (FBI) in a vector. The FLI should always be the first item in the vector. Defaults to 60 and 65, but these are randomly chosen and should be replaced with values calculated by leafindex. |
freezedata |
Data frame - table of low temperatures, day of year, and adjusted day of year for all the freeze days of a given year. This is calculated by the freezedates function. |
The output is a list with two items:
EFS |
Scalar - Early False Spring indicator. This equals 1 if an early false spring occurred, 0 otherwise. |
LFS |
Scalar - Late False Spring indicator. This equals 1 if a late false spring occurred, 0 otherwise. |
Adrienne M. Wootten (University of Oklahoma)
Allstadt, A.J., S.J. Vavrus, P.J. Heglund, A.M Pidgeon, W. E. Thogmartin and V.C. Radeloff, 2015: Spring plant phenology and false springs in the conterminous US during the 21st century. Environmental Research Letters, 10, DOI: 10.1088/1748-9326/10/10/104008
Peterson, A.G. and J.T. Abatzoglou, 2014: Observed changes in false springs over the contiguous United States. Geophysical Research Letters, 41, DOI: 10.1002/2014GL059266
data("BatonRouge") RESULTS = calc_si(TMAX,TMIN,lat) # calc_si runs all SI-x calculations #### # Plotting First Leaf Index oldpar <- par(mfrow = c(1,1)) ylimrange = range(RESULTS$FLImat) ylimrange[1]=ylimrange[1]-10 ylimrange[2]=ylimrange[2]+10 plot(RESULTS$FLImat[,1]~YEAR,type="b",pch=19,lwd=2,ylim=ylimrange) ##### # Plotting First Bloom Index ylimrange = range(RESULTS$FBImat) ylimrange[1]=ylimrange[1]-10 ylimrange[2]=ylimrange[2]+10 plot(RESULTS$FBImat[,1]~YEAR,type="b",pch=19,lwd=2,ylim=ylimrange) ##### # Plotting Day of Last Freeze ylimrange = range(RESULTS$lastfreeze) ylimrange[1]=ylimrange[1]-10 ylimrange[2]=ylimrange[2]+10 plot(RESULTS$lastfreeze~YEAR,type="b",pch=19,lwd=2,ylim=ylimrange) ##### # Plotting False Springs ylimrange = range(RESULTS$FSmat) ylimrange[2]=ylimrange[2]+0.5 par(mfrow=c(2,1)) plot(RESULTS$FSmat[,1]~YEAR,type="b",pch=19,ylim=ylimrange) plot(RESULTS$FSmat[,2]~YEAR,type="b",pch=19,ylim=ylimrange) par(oldpar)
data("BatonRouge") RESULTS = calc_si(TMAX,TMIN,lat) # calc_si runs all SI-x calculations #### # Plotting First Leaf Index oldpar <- par(mfrow = c(1,1)) ylimrange = range(RESULTS$FLImat) ylimrange[1]=ylimrange[1]-10 ylimrange[2]=ylimrange[2]+10 plot(RESULTS$FLImat[,1]~YEAR,type="b",pch=19,lwd=2,ylim=ylimrange) ##### # Plotting First Bloom Index ylimrange = range(RESULTS$FBImat) ylimrange[1]=ylimrange[1]-10 ylimrange[2]=ylimrange[2]+10 plot(RESULTS$FBImat[,1]~YEAR,type="b",pch=19,lwd=2,ylim=ylimrange) ##### # Plotting Day of Last Freeze ylimrange = range(RESULTS$lastfreeze) ylimrange[1]=ylimrange[1]-10 ylimrange[2]=ylimrange[2]+10 plot(RESULTS$lastfreeze~YEAR,type="b",pch=19,lwd=2,ylim=ylimrange) ##### # Plotting False Springs ylimrange = range(RESULTS$FSmat) ylimrange[2]=ylimrange[2]+0.5 par(mfrow=c(2,1)) plot(RESULTS$FSmat[,1]~YEAR,type="b",pch=19,ylim=ylimrange) plot(RESULTS$FSmat[,2]~YEAR,type="b",pch=19,ylim=ylimrange) par(oldpar)
This function determines when freezes occur during the year given the daily low temperature data, freeze threshold, and the day of year.
freezedates(tasmin, frzval, DOY)
freezedates(tasmin, frzval, DOY)
tasmin |
Vector - daily low temperature data (degrees Fahrenheit). The vector should have a length of 366. |
frzval |
Scalar - freeze threshold (degrees Fahrenheit). Typically this is 28F. |
DOY |
Vector - day of year (1:366) |
The output from this function is a list with the following:
firstfreeze |
Scalar - day of year matching the first freeze that occurs in the fall. |
lastfreeze |
Scalar - day of year matching the last freeze that occurs in the spring. |
freezeperiod |
Scalar - range of days between the first and last freeze. |
freezedata |
Data Frame - Table containing the values for low temperature (tasmin), Day of year (DOY), and adjusted Day of Year (DOYadj) for those days of the year where a freeze occurs. |
Adrienne M. Wootten (University of Oklahoma)
Given the false spring indicators for multiple years, this function calculate the False Spring Exposure Index (FSEI). This is calculated according to the methodology of Peterson and Abatzoglou (2014). If early false spring indicators are provided, then this function calculates the FSEI for the early false spring. Providing the late false spring indicators will allow the function to calculate the FSEI for the late false spring.
FSEI(falsespringvector)
FSEI(falsespringvector)
falsespringvector |
Vector - the false spring indicators for multiple years. This forms a vector of length N, for the N years used. This can be either early or late false spring indicators. |
The output is a scalar with the value of the FSEI. The larger the value, the more like the location will be exposed to a false spring.
Adrienne M. Wootten (University of Oklahoma)
Allstadt, A.J., S.J. Vavrus, P.J. Heglund, A.M Pidgeon, W. E. Thogmartin and V.C. Radeloff, 2015: Spring plant phenology and false springs in the conterminous US during the 21st century. Environmental Research Letters, 10, DOI: 10.1088/1748-9326/10/10/104008
Peterson, A.G. and J.T. Abatzoglou, 2014: Observed changes in false springs over the contiguous United States. Geophysical Research Letters, 41, DOI: 10.1002/2014GL059266
data("BatonRouge") RESULTS = calc_si(TMAX,TMIN,lat) # calc_si runs all SI-x calculations #### # Plotting First Leaf Index oldpar <- par(mfrow = c(1,1)) ylimrange = range(RESULTS$FLImat) ylimrange[1]=ylimrange[1]-10 ylimrange[2]=ylimrange[2]+10 plot(RESULTS$FLImat[,1]~YEAR,type="b",pch=19,lwd=2,ylim=ylimrange) ##### # Plotting First Bloom Index ylimrange = range(RESULTS$FBImat) ylimrange[1]=ylimrange[1]-10 ylimrange[2]=ylimrange[2]+10 plot(RESULTS$FBImat[,1]~YEAR,type="b",pch=19,lwd=2,ylim=ylimrange) ##### # Plotting Day of Last Freeze ylimrange = range(RESULTS$lastfreeze) ylimrange[1]=ylimrange[1]-10 ylimrange[2]=ylimrange[2]+10 plot(RESULTS$lastfreeze~YEAR,type="b",pch=19,lwd=2,ylim=ylimrange) ##### # Plotting False Springs ylimrange = range(RESULTS$FSmat) ylimrange[2]=ylimrange[2]+0.5 par(mfrow=c(2,1)) plot(RESULTS$FSmat[,1]~YEAR,type="b",pch=19,ylim=ylimrange) plot(RESULTS$FSmat[,2]~YEAR,type="b",pch=19,ylim=ylimrange) par(oldpar)
data("BatonRouge") RESULTS = calc_si(TMAX,TMIN,lat) # calc_si runs all SI-x calculations #### # Plotting First Leaf Index oldpar <- par(mfrow = c(1,1)) ylimrange = range(RESULTS$FLImat) ylimrange[1]=ylimrange[1]-10 ylimrange[2]=ylimrange[2]+10 plot(RESULTS$FLImat[,1]~YEAR,type="b",pch=19,lwd=2,ylim=ylimrange) ##### # Plotting First Bloom Index ylimrange = range(RESULTS$FBImat) ylimrange[1]=ylimrange[1]-10 ylimrange[2]=ylimrange[2]+10 plot(RESULTS$FBImat[,1]~YEAR,type="b",pch=19,lwd=2,ylim=ylimrange) ##### # Plotting Day of Last Freeze ylimrange = range(RESULTS$lastfreeze) ylimrange[1]=ylimrange[1]-10 ylimrange[2]=ylimrange[2]+10 plot(RESULTS$lastfreeze~YEAR,type="b",pch=19,lwd=2,ylim=ylimrange) ##### # Plotting False Springs ylimrange = range(RESULTS$FSmat) ylimrange[2]=ylimrange[2]+0.5 par(mfrow=c(2,1)) plot(RESULTS$FSmat[,1]~YEAR,type="b",pch=19,ylim=ylimrange) plot(RESULTS$FSmat[,2]~YEAR,type="b",pch=19,ylim=ylimrange) par(oldpar)
Given appropriate inputs, this function calculates the growing degree hours for a given day and locations. The formula is also retained from the original Matlab code for the extended spring indices (SI-x, Ault et al. 2015).
growdh(tmax, tmin, daylen, baset)
growdh(tmax, tmin, daylen, baset)
tmax |
Scalar - daily high temperature (degrees Fahrenheit) for a given day |
tmin |
Scalar - daily low temperature (degrees Fahrenheit) for a given day |
daylen |
Scalar - day length for a given day (calculated from daylength function) |
baset |
Scalar - base temperature for determining growing degree hours. Typically this 31 degrees Fahrenheit |
GDHOUR - scalar, total growing degree hours for a given day.
Adrienne M. Wootten (University of Oklahoma)
Ault, T.R., R. Zurita-Miller and M. Schwarz, 2015: A Matlab© toolbox for calculating spring indices from daily meteorological data. Computers and Geosciences, 83, DOI: 10.1016/j.cageo.2015.06.015
daystop <- 366 lat <- 35.476 # latitude for OKC daylen <- daylength(daystop=daystop,lat=lat) tmax <- 65 tmin <- 42 dlen <- daylen[60] bt <- 31 result <- growdh(tmax,tmin,dlen,bt)
daystop <- 366 lat <- 35.476 # latitude for OKC daylen <- daylength(daystop=daystop,lat=lat) tmax <- 65 tmin <- 42 dlen <- daylen[60] bt <- 31 result <- growdh(tmax,tmin,dlen,bt)
lat is a scalar that is the user provided latitude for the location of interest (deg N). Example latitude is available if one calls data("BatonRouge")
TMIN |
- a numeric scalar |
This function calculates either the First Leaf Index (FLI) or the First Bloom Index (FBI). The calculation of the FLI and FBI follows that described by the original Matlab code (Ault et al. 2015) with the correction implemented by Allstadt et al. (2015).
leafindex(tasmax, tasmin, daylen, baset, refdate, type = "leaf", plant = 1, verbose = FALSE)
leafindex(tasmax, tasmin, daylen, baset, refdate, type = "leaf", plant = 1, verbose = FALSE)
tasmax |
Vector - daily high temperatures for a given year (degrees F) |
tasmin |
Vector - daily low temperatures for a given year (degrees F) |
daylen |
Vector - daylength for each day for a given year (recommended from the daylength function) |
baset |
Scalar - base temperature for growing degree hours calculation (Typically this is 31 degrees F) |
refdate |
Scalar - reference day of year at which to begin calculations. For the FLI, refdate should equal 1. For the FBI, refdate should equal the FLI. |
type |
Either "leaf" (default) or "bloom" to calculate the FLI or FBI respectively. |
plant |
Scalar - a value of 1 (default), 2, or 3 to match the appropriate plant for the FLI. For plant=1, the plant is lilac. For plant=2, the plant is arnold red. For plant=3, the plant is zabelli |
verbose |
Logical - either TRUE or FALSE (default). If set to TRUE, the function will print more information. Helpful for debugging issues. |
If verbose=FALSE, then the output is the day of year corresponding to first leaf or first bloom depending on the user inputs. if verbose=TRUE, then the output is a list with the following:
OUTDOY |
Scalar - day of year corresponding to first leaf or first bloom depending on the user inputs. |
parametersout |
Matrix - values for all the parameters used in the calculation of FLI and FBI. This matrix is 366 rows by 6 columns. The 366 rows correspond to each day of year. Values will exist in the table from the reference date (refdate) to the day of first leaf or first bloom. Values are NA otherwise. The columns correspond to each of the following parameters, 1) number of days since the reference date, 2) total number of accumulated synoptic events, 3) sum of growing degree hours for the current day and previous two days, 4) sum of growing degree hours for 5-7 days prior to the current day, 5) accumulated growing degree hours, 6) growing degree hours for the current day. |
lagGDHvals |
Matrix - values of lag growing degree hours for 1-7 days prior to the current day. This is 366 rows by 7 columns. One row for each day of the year, one column for each lag of growing degree hours (column 1 is a lag of 1 day, column 7 is a lag of 7 days). |
Adrienne M. Wootten (University of Oklahoma)
Allstadt, A.J., S.J. Vavrus, P.J. Heglund, A.M Pidgeon, W. E. Thogmartin and V.C. Radeloff, 2015: Spring plant phenology and false springs in the conterminous US during the 21st century. Environmental Research Letters, 10, DOI: 10.1088/1748-9326/10/10/104008
Ault, T.R., R. Zurita-Miller and M. Schwarz, 2015: A Matlab© toolbox for calculating spring indices from daily meteorological data. Computers and Geosciences, 83, DOI: 10.1016/j.cageo.2015.06.015
data("BatonRouge") RESULTS = calc_si(TMAX,TMIN,lat) # calc_si runs all SI-x calculations #### # Plotting First Leaf Index oldpar <- par(mfrow = c(1,1)) ylimrange = range(RESULTS$FLImat) ylimrange[1]=ylimrange[1]-10 ylimrange[2]=ylimrange[2]+10 plot(RESULTS$FLImat[,1]~YEAR,type="b",pch=19,lwd=2,ylim=ylimrange) ##### # Plotting First Bloom Index ylimrange = range(RESULTS$FBImat) ylimrange[1]=ylimrange[1]-10 ylimrange[2]=ylimrange[2]+10 plot(RESULTS$FBImat[,1]~YEAR,type="b",pch=19,lwd=2,ylim=ylimrange) ##### # Plotting Day of Last Freeze ylimrange = range(RESULTS$lastfreeze) ylimrange[1]=ylimrange[1]-10 ylimrange[2]=ylimrange[2]+10 plot(RESULTS$lastfreeze~YEAR,type="b",pch=19,lwd=2,ylim=ylimrange) ##### # Plotting False Springs ylimrange = range(RESULTS$FSmat) ylimrange[2]=ylimrange[2]+0.5 par(mfrow=c(2,1)) plot(RESULTS$FSmat[,1]~YEAR,type="b",pch=19,ylim=ylimrange) plot(RESULTS$FSmat[,2]~YEAR,type="b",pch=19,ylim=ylimrange) par(oldpar)
data("BatonRouge") RESULTS = calc_si(TMAX,TMIN,lat) # calc_si runs all SI-x calculations #### # Plotting First Leaf Index oldpar <- par(mfrow = c(1,1)) ylimrange = range(RESULTS$FLImat) ylimrange[1]=ylimrange[1]-10 ylimrange[2]=ylimrange[2]+10 plot(RESULTS$FLImat[,1]~YEAR,type="b",pch=19,lwd=2,ylim=ylimrange) ##### # Plotting First Bloom Index ylimrange = range(RESULTS$FBImat) ylimrange[1]=ylimrange[1]-10 ylimrange[2]=ylimrange[2]+10 plot(RESULTS$FBImat[,1]~YEAR,type="b",pch=19,lwd=2,ylim=ylimrange) ##### # Plotting Day of Last Freeze ylimrange = range(RESULTS$lastfreeze) ylimrange[1]=ylimrange[1]-10 ylimrange[2]=ylimrange[2]+10 plot(RESULTS$lastfreeze~YEAR,type="b",pch=19,lwd=2,ylim=ylimrange) ##### # Plotting False Springs ylimrange = range(RESULTS$FSmat) ylimrange[2]=ylimrange[2]+0.5 par(mfrow=c(2,1)) plot(RESULTS$FSmat[,1]~YEAR,type="b",pch=19,ylim=ylimrange) plot(RESULTS$FSmat[,2]~YEAR,type="b",pch=19,ylim=ylimrange) par(oldpar)
Retains the legacy calculation for the solar declination from the Ault et al. (2015) Matlab code. This returns the day of year based on the start of climatological spring, meant for use with the function daylength. That is, a DOY=1 is March 1. The function itself uses the calendar day of the year (from 1-366).
soldec(DOY)
soldec(DOY)
DOY |
Scalar - day of year from 1 to 366. |
Scalar - Spring climatological calendar day of year for the location and calendar day of year matching the appropriate solar declination angle.
Adrienne M. Wootten (University of Oklahoma)
Ault, T.R., R. Zurita-Miller and M. Schwarz, 2015: A Matlab© toolbox for calculating spring indices from daily meteorological data. Computers and Geosciences, 83, DOI: 10.1016/j.cageo.2015.06.015
doy <- 45 result <- soldec(doy)
doy <- 45 result <- soldec(doy)
This function identifies if a given period is a synoptic warm event which would help trigger plant growth. This function requires the growing degree hours for the current day and the growing degree hours for the prior seven days. Finally, this function will calculate if a period will trigger growth for first leaf or first bloom. The formulas for this calculation are based on the original Matlab code for the extended spring indices (SI-x, Ault et al. 2015)
synval(GDH, lagGDH, type = "leaf")
synval(GDH, lagGDH, type = "leaf")
GDH |
Scalar - growing degree hours for a given day |
lagGDH |
Vector - growing degree hours for the 7 previous days. Must be a vector of at least a length 7 or the function will throw an error. |
type |
Either leaf (default) to identify events contributing to first leaf, or bloom to identify events contributing to first bloom. |
The output is a list with the following:
synflag |
Scalar - synoptic event flag. Has a value of 1 if a synoptic event happened, value of 0 otherwise. |
dde2 |
Scalar - sum of growing degree hours for current day and previous two days. |
dd57 |
Scalar - sum of growing degree hours 5-7 prior to current day. |
Adrienne M. Wootten (University of Oklahoma)
Ault, T.R., R. Zurita-Miller and M. Schwarz, 2015: A Matlab© toolbox for calculating spring indices from daily meteorological data. Computers and Geosciences, 83, DOI: 10.1016/j.cageo.2015.06.015
daystop <- 240 lat <- 35.476 # latitude for OKC daylen <- daylength(daystop=daystop,lat=lat) tmax <- rep(65,daystop) tmin <- rep(42,daystop) bt <- 31 gdh <- c() for(i in 1:daystop){ gdh[i] <- growdh(tmax[i],tmin[i],daylen[i],bt) } idx <- 60 lagidx <- idx - 1:7 laggdh <- gdh[lagidx] result <- synval(gdh[idx],laggdh,type="leaf")
daystop <- 240 lat <- 35.476 # latitude for OKC daylen <- daylength(daystop=daystop,lat=lat) tmax <- rep(65,daystop) tmin <- rep(42,daystop) bt <- 31 gdh <- c() for(i in 1:daystop){ gdh[i] <- growdh(tmax[i],tmin[i],daylen[i],bt) } idx <- 60 lagidx <- idx - 1:7 laggdh <- gdh[lagidx] result <- synval(gdh[idx],laggdh,type="leaf")
TMAX is a user provided matrix of daily high temperatures (deg F). The matrix should be 366 rows (366 days) by as many years as desired in columns. Example high temperature data is available if one calls data("BatonRouge")
TMAX |
- a numeric matrix |
TMIN is a user provided matrix of daily low temperatures (deg F). The matrix should be 366 rows (366 days) by as many years as desired in columns. Example low temperature data is available if one calls data("BatonRouge")
TMIN |
- a numeric matrix |
YEAR is a user provided vector of the years in the TMAX and TMIN data used with calc_si. YEAR is not used in the calc_si (or any internal functions), but it is used for plotting the results in the example code. Example of YEAR is available if one calls data("BatonRouge")
YEAR |
- a numeric vector |