Start by taking a look at the netcdf file that was used in Dietze and Matthes 2014
nc_path <- system.file('extdata/AMF_USMe2_2005_L2_GF_V006.nc', package = 'PestED')
nc <- nc_open(nc_path)
Print the names of the variables stored in the NetCDF files.
names(nc$var)
#> [1] "YEAR" "GAP" "DOY" "HRMIN" "UST" "TA"
#> [7] "WD" "WS" "NEE" "FC" "SFC" "H"
#> [13] "SH" "LE" "SLE" "FG" "TS1" "TSdepth1"
#> [19] "TS2" "TSdepth2" "PREC" "RH" "PRESS" "CO2"
#> [25] "VPD" "SWC1" "SWC2" "Rn" "PAR" "Rg"
#> [31] "Rgdif" "PARout" "RgOut" "Rgl" "RglOut" "H2O"
#> [37] "RE" "GPP" "CO2top" "CO2height" "APAR" "PARdif"
#> [43] "APARpct" "ZL"
It looks like there are quite a few of them but how many are needed? The format_inputs
function was designed to take this netcdf and format it into the proper format to work with iterate.SEM
.
# Format the inputs into the SEM required format using a support function from the Pest ED function.
met_inputs <- format_inputs(nc_path)
names(met_inputs)
#> [1] "time" "PAR" "temp" "VPD" "precip"
A table of the the the input names used by iterate.SEM
and information from the netcdf file.
input | nc.var.name | description | units |
---|---|---|---|
time | DOY | Day_of_Year | NA |
PAR | PAR | Incoming Photosynthetically Active Radiation | umol/m2/s |
temp | TA | Air_Temperature | degrees C |
VPD | VPD | Vapor Pressure Deficit | kPa |
precip | PREC | Precipitation | mm |