read.lpjml_nc: Read LPJmL from nc-file
Description
Reads a LPJmL nc-file and converts it to a 3D array of the structure
(cells,years,datacolumn)
Usage
read.lpjml_nc(
file_name,
file_folder = "",
years = NULL,
split_data = FALSE,
keep_month = FALSE,
averaging_range = 1
)
Arguments
file_name
file name including file ending (wildcards are supported).
Optionally also the full path can be specified here (instead of splitting it
to file\_name and file\_folder)
file_folder
folder the file is located in (alternatively you can also
specify the full path in file\_name - wildcards are supported)
years
a vector containing the years of interest
split_data
split reading routine to avoid memory issues
keep_month
keep monthly data (month as 3rd magpie data dim)
averaging_range
number of years to be averaged (if even: overweight for prevous time period)
Examples
Run this code# NOT RUN {
# }
# NOT RUN {
a <- read.lpjml_nc("sdate.nc")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab