large_ctu: Apply ctu on large dataset

Description Usage Arguments Value Author(s) Examples

View source: R/tempfun.R

Description

This functions calculates Cumulative Thermal Units for large datasets using the daily thermal unit (dtu) (Based on https://www.researchgate.net/publication/281674392_Modeling_physiology_of_crop_development_growth_and_yield)

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
large_ctu(
  dataset,
  temp_column,
  date_column,
  start_date = "10-01",
  location_column = FALSE,
  vector = TRUE,
  TBD = 0,
  TP1D = 25,
  TP2D = 28,
  TCD = 40
)

Arguments

dataset

a dataset

temp_column

name of the temperature column

date_column

name of the date column

start_date

start date of the growing plant; defalut = "10-01" for October the 10th

location_column

name of the location column; defalut = FALSE

vector

default = TRUE; boolean operator defining if a dataset with additional column or only the new column should be given out

TBD

thermal base temperature; default = 0 for wheat

TP1D

lower optimum temperature; default = 25 for wheat

TP2D

upper optimum temperature; default = 28 for wheat

TCD

thermal ceiling temperature; default = 40 for wheat

Value

a vector or raster file (depending on input) with the relative development rate based on temperature

Author(s)

Wolfgang Hamer

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Download example data
shdat <- download_statewide_hourly_station_data(state = "Schleswig-Holstein", coord = TRUE)
shdat2 <- shdat %>% filter(DateTime > 1995093023)

shdat2 %<>% dplyr::mutate(Date = as.Date(substr(DateTime,1,8),"%Y%m%d"))

shdat2 %<>% dplyr::mutate( CTU = large_ctu(dataset = shdat2,
                                           temp_column = "Temperature",
                                           date_column = "Date",
                                           start_date = "10-01",
                                           location_column = "ID"))

whamer/papros documentation built on Feb. 6, 2021, 8:54 a.m.