fitsnowtemp: The function 'fitsnowtemp' derives model parameters for...

View source: R/snowfitfunctions.R

fitsnowtempR Documentation

The function fitsnowtemp derives model parameters for fitting the snow temperature model

Description

The function fitsnowtemp derives model parameters for fitting the snow temperature model

Usage

fitsnowtemp(
  weather,
  precd,
  snowdepth,
  snowtemp,
  snowem = 0.99,
  zm = 0.002,
  umin = 0.5,
  astc = 1.5,
  plotout = FALSE
)

Arguments

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

Details

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.

Value

an object of class SnowTparams used for fitting the snow temperature model

Examples

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)

ilyamaclean/microsnow documentation built on April 7, 2023, 8:55 a.m.