integrate all the workflow together
Usage
yield_impact(
pr_hist_ncdf = NULL,
pr_proj_ncdf = NULL,
tas_hist_ncdf = NULL,
tas_proj_ncdf = NULL,
timestep = "monthly",
historical_periods = NULL,
climate_hist_dir = NULL,
climate_impact_dir = NULL,
climate_model = "gcm",
climate_scenario = "rcp",
member = "member",
bias_adj = "ba",
cfe = "no-cfe",
gcam_version = "gcam7",
use_default_coeff = FALSE,
base_year = NULL,
start_year = NULL,
end_year = NULL,
smooth_window = 20,
co2_hist = NULL,
co2_proj = NULL,
diagnostics = TRUE,
output_dir = file.path(getwd(), "output")
)
Arguments
- pr_hist_ncdf
Default = NULL. list of paths for historical precipitation NetCDF files from ISIMIP
- pr_proj_ncdf
Default = NULL. list of paths for projected precipitation NetCDF files from ISIMIP
- tas_hist_ncdf
Default = NULL. list of paths for historical temperature NetCDF files from ISIMIP
- tas_proj_ncdf
Default = NULL. list of paths for projected temperature NetCDF files from ISIMIP
- timestep
Default = 'monthly'. string for input climate data time step (e.g., 'monthly', 'daily')
- historical_periods
Default = NULL. vector for years to subset from the historical climate data. If NULL, use the default climate data period
- climate_hist_dir
Default = NULL. string for path to the historical precipitation and temperature files by irrigation type and crop type. The climate files must follow the same structure as the output of the weighted_climate function. Provide path to this argument when pr_hist_ncdf and tas_hist_ncdf are NULL.
- climate_impact_dir
Default = NULL. string for path to the projected precipitation and temperature files by irrigation type and crop type. The climate files must follow the same structure as the output of the weighted_climate function. Provide path to this argument when pr_proj_ncdf and tas_proj_ncdf are NULL.
- climate_model
Default = 'gcm'. string for climate model name (e.g., 'CanESM5')
- climate_scenario
Default = 'rcp'. string for climate scenario name (e.g., 'ssp245')
- member
Default = 'member'. string for the ensemble member name
- bias_adj
Default = 'ba'. string for the dataset used for climate data bias adjustment
- cfe
Default = 'no-cfe'. string for whether the yield impact formula implemented CO2 fertilization effect
- gcam_version
Default = 'gcam7'. string for the GCAM version. Only support gcam6 and gcam7
- use_default_coeff
Default = FALSE. binary for using default regression coefficients. Set to TRUE will use the default coefficients instead of calculating coefficients from the historical climate data.
- base_year
Default = NULL. integer for the base year (for GCAM)
- start_year
Default = NULL. integer for the start year of the projected data
- end_year
Default = NULL. integer for the end year of the projected data
- smooth_window
Default = 20. integer for smoothing window in years
- co2_hist
Default = NULL. data table for historical CO2 concentration in columns [year, co2_conc]. If NULL, use built-in CO2 emission data
- co2_proj
Default = NULL. data table for projected CO2 concentration in columns [year, co2_conc]. If NULL, use built-in CO2 emission data
- diagnostics
Default = TRUE. Logical for performing diagnostic plot
- output_dir
Default = file.path(getwd(), 'output'). String for output directory