View source: R/snowfitfunctions.R
fitsnowtemp | R Documentation |
fitsnowtemp
derives model parameters for fitting the snow temperature modelThe function fitsnowtemp
derives model parameters for fitting the snow temperature model
fitsnowtemp(
weather,
precd,
snowdepth,
snowtemp,
snowem = 0.99,
zm = 0.002,
umin = 0.5,
astc = 1.5,
plotout = FALSE
)
weather |
a data.frame of weather variables (see details). |
precd |
a vector of daily precipitation (mm). |
snowdepth |
a vector of snow depth measurements (cm) corresponding to each time period for which snow temperature measurements are available (can be interpolated) |
snowtemp |
an vector of snow temperature (deg C) measurements (see details) |
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) |
plotout |
optional logical indicating whether to plot fitted relationship |
The format and and units of weather
must follow that in the example
dataset climdata
. However, entries do not need to be hourly. They canshould correspond to
the time for which snow temperature measurements are available.
an object of class SnowTparams
used for fitting the snow temperature model
require(NicheMapR)
# Derive estimates of snow temperature (and depth) using NicheMapR
nmrout<-runNMRSnow(weather, precd, 67.367, 26.629, snowenv = "Taiga", ALTT = 199)
# Use NicheMapR outputs as inputs to fitsnowtemp
STparams<-fitsnowtemp(climdata,precd,nmrout$SNOWDEP,nmrout$SNOWTEMP,plotout=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.