View source: R/snowfitfunctions.R
fitsnowdepth | R Documentation |
The function fitsnowdepth
estimates the snow melt coefficient from empirical data (or
the outputs of a more complex model) and returns this along with
estimates of snow depth and the RMS error
fitsnowdepth(
weather,
snowdepth,
precd,
snowenv = "Taiga",
STparams,
plotout = T,
snowem = 0.99,
zm = 0.002,
umin = 0.5,
astc = 1.5
)
weather |
a data.frame of weather variables (see details). |
snowdepth |
a vector fo measured snow depths (cm). Can be interpolated. |
precd |
a vector of daily precipitation (mm). |
snowenv |
one of |
STparams |
an object of class |
plotout |
optional logical indicating whether to plot observed and predicted data |
snowem |
optionally, numeric value of snow emissivity |
zm |
optionally, numeric value of roughness length for momentum transfer of snow surface (m) |
umin |
optionally, numeric value indicating minimum wind speed used in conductivity calculations (m/s) |
astc |
optionally, numeric value indicating the temperature at which precipitation falls as snow (deg C) |
The format and and units of weather
must follow that in the example
dataset climdata
. The entries in weather need to be hourly. If hourly
snow depth data are unavailable, they should be derived by interpolation.
The paramater snowenv
is used to compute snow density
following Sturm et al (2010) J Hydrometeorology 11: 1380-1393.
a list of the following:
psnowdepth
predicted snow depth (cm)
RMS
Root-mean-square error of predicted snow depths (cm)
meltfact
a snow melt factor for use with pSnow()
# Fit snow depth
require(NicheMapR)
# Derive estimates of snow temperature using NicheMapR in place of observed data
nmrout<-runNMRSnow(climdata, precd, 67.367, 26.629, ALTT = 199)
# Derive Snow temperature parameters
STparams<-fitsnowtemp(climdata,precd,nmrout$SNOWDEP,nmrout$SNOWTEMP)
# Fit snow depth model and plot result (red = Observed)
meltfact<-fitsnowdepth(climdata,snowdepth$snowdepth,precd,STparams=STparams)$meltfact
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.