spinup | R Documentation |
spinup
runs the model repeatedly using data form the first time-step
for a set number of steps to ensure initial conditions are stable and
appropriate soil temperatures are set.
spinup(
climdata,
vegp,
soilp,
lat,
long,
edgedist = 100,
reqhgt = NA,
sdepth = 2,
zu = 2,
theta = 0.3,
thetap = 0.3,
merid = 0,
dst = 0,
n = 0.6,
plotout = TRUE,
steps = 200,
metopen = TRUE,
windhgt = 2,
zlafact = 1,
surfwet = 1
)
climdata |
a data.frame of climate variables needed to run the run the model (dataset should follow format of |
vegp |
a list of vegetation parameters as returned by |
soilp |
a list of soil parameters as returned by |
lat |
Latitude (decimal degrees) |
long |
Longitude (decimal degrees, negative west of Greenwich meridion) |
edgedist |
distance to open ground (m) |
reqhgt |
optional height for which temperature is required (see details) |
sdepth |
depth of deepest soil node (m) |
zu |
height above ground of reference climate measurements (m) |
theta |
volumetric water content of upper most soil layer in current time step (m^3 / m^3) |
thetap |
volumetric water content of upper most soil layer in previous time step (m^3 / m^3) |
merid |
an optional numeric value representing the longitude (decimal degrees) of the local time zone meridian (0 for GMT). |
dst |
an optional numeric value representing the time difference from the timezone meridian (hours, e.g. +1 for BST if |
n |
forward / backward weighting for Thomas algorithm (see |
plotout |
optional logical indicating whether to a plot a profile of temperatures upon completion. |
steps |
number of iterations for which which to run spin-up |
metopen |
optional logical indicating whether the wind measurement used as an input to the model is from a nearby weather station located in open ground (TRUE) or above the canopy for which temperatures are modelled (FALSE - see details) |
windhgt |
height above ground of wind measurement. If |
zlafact |
numeric value indicating how close to leaves air temperatures are needed for (1 - average leaf-air distance, 0.5 = half average leaf-air distance etc.). Must be greater than 1. |
surfwet |
fraction of vegetation surface acting like a free-water surface |
If reqhgt
is set, and below the height of the canopy, the canopy node nearest
to that height is set at the value specified. The returned value tabove
is then the
temperature at the top of the canopy. If reqhgt
is above canopy, nodes are calculated
automatically, but tabove
is the temperature at height reqhgt
. If temperatures below ground are
needed, the depth can be set using soilinit()
a list of model outputs as for paraminit()
or runonestep()
tme<-as.POSIXlt(weather$obs_time, format = "%Y-%m-%d %H:%M", tz = "UTC")
vegp <- habitatvars(4, 50, -5, tme, m = 20)
soilp<- soilinit("Loam")
# run spinup and produce profile plot
modelout<-spinup(weather, vegp, soilp, lat = 50, long = -5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.