% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/028_ws2cat.R
\name{ws2catf}
\alias{ws2catf}
\title{Convert windspeed in knots into a generalized version of the SSHWS category.}
\usage{
ws2catf(ws, units)
}
\arguments{
\item{ws}{input windspeed in units}

\item{units}{The units: knots, mph or mph2}
}
\value{
The cat from -1,0,1,2,3,4,5, where -1 means TD and 0 means TS.
}
\description{
Converts windspeed
}
\details{
I took the definitions from Wikipedia/Saffir-Simpson_scale.
Note that the definitions on Wikipedia have gaps, such as between
63 and 64 knots. I close the gaps by using halves.
}
\examples{
cat("\n")
ws=70
cat("ws in knots=",ws,"\n")
cat("cat=",ws2catf(ws,units="knots"),"\n")
#
cat("\n")
cat("ws in mph=",ws,"\n")
cat("cat=",ws2catf(ws,units="mph"),"\n")
}
\author{
Stephen Jewson \email{stephen.jewson@gmail.com}
}
