Stand Density Index

Stand Density Index first proposed by Reineke, 1933 translate the current stand density into the density of 10 inches trees.

$$sdi = tpa * \left( \frac{qmd}{10} \right)^{1.605}$$

where $sdi$ is Stand Density Index, $tpa$ is tree per acre, and $qmd$ is quadratic mean diameter in inches.

$$sdi = tpha * \left( \frac{qmd}{25.4} \right)^{1.605}$$

where $sdi$ is Stand Density Index, $tpha$ is tree per hectare, and $qmd$ is quadratic mean diameter in centimeters.

Example

Imperial Units
tpa = 200
qmd = 12.3
unittype = "imperial"
Answer = 278.8

Metric Units
tpa = 494.1
qmd = 31
unittype = "metric"
Answer = 680.2

Code

Visual Basic

 
Function sdi(tpa As Single, qmd As Single, Optional unittype as string = "imperial") As Double
' Function to calculate the Stand Density Index as defined by Reineke, 1933
' tpa is trees per acre, qmd is the quadratic mean diameter in inches
' by David R. Larsen, Copyright October, 9, 2012
' Creative Commons http://creativecommons.org/licenses/by-nc/3.0/us/


If (unittype = "imperial") Then
	sdi = tpa * (qmd / 10#) ^ 1.605
ElseIf (unittype = "metric") Then
	sdi = tpa * (qmd / 25.4) ^ 1.605
Else
    sdi = 0#
    MsgBox ("Unknown unit type, options are: imperial or metic")
End If
End Function

Excel® Visual Basic Code

R Statistical Package Code

 
sdi = function( tpa, qmd, unittype="imperial" )
{
# Function to calculate the stand density index
# by David R. Larsen, Copyright October 9, 2012
# Creative Commons http://creativecommons.org/licenses/by-nc/3.0/us/

  if (unittype == "imperial" ){
    sdi = tpa * ( qmd / 10 )^ 1.605
  }else if ( unittype == "metric" ){
    sdi = tpa * ( qmd / 25.4)^1.605
  }else{
    sdi = 0
  }
  sdi
}  
  
R Statistical Package Code

Python Code

 
#!/usr/local/bin/python
# Function to calculate the stand density index 
# from trees per acre and quadratic Mean diameter
# by David R. Larsen, October 12, 2012
# Creative Commons,  http://creativecommons.org/licenses/by-nc/3.0/us/

import math

def sdi( tpa, qmd, unittype="imperial"):
    if( unittype == "imperial" ):
       value = tpa * ( qmd / 10.0 )**1.605	
       return value
    elif( unittype == "metric"):
       value = tpa * ( qmd / 25.4 )**1.605
       return value
    else:
       print "Unknown unittype, options are imperial or metric"
       return 

print "sdi =", sdi( 200.0, 12.3)
print "sdi =", sdi( 200.0, 12.3, "imperial")
print "sdi =", sdi( 494.1, 31, "metric")
print "sdi =", sdi(1, 1, "cuni:xts")
Python Code

Note the python file has a extra "txt" at the end to allow the files to be viewed in a web browser.

Go Code

 
// Function to calculate stand density index 
// from quadratic mean diameter and tree per acre
// by David R. Larsen, September 9, 2013
// Creative Commons,  http://creativecommons.org/licenses/by-nc/3.0/us/
package main

import (
	"fmt"
	"math"
)

// Function to calculate a quadratic mean 
func Sdi( tpa float64, qmd float64, unittype string) float64 {
	if unittype == "imperial" {
		return tpa * math.Pow(( qmd / 10.0 ),1.605)
	}else if unittype == "metric" {
		return tpa * math.Pow(( qmd / 25.4 ),1.605)
	}
	return 0.0
}

func main() {
	fmt.Println("sdi =", Sdi(200.0, 12.3, "imperial") )
	fmt.Println("sdi =", Sdi(494.1, 31.0, "metric") )
	fmt.Println("sdi =", Sdi(200.0, 1.0, "cunits") )
}	
Run code in the Go Playground
Go Code

Note the Go file has a extra "txt" at the end to allow the files to be viewed in a web browser.


Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.

Author: Dr. David R. Larsen, Copyright 2012
Created: October 9, 2012
Last Updated: June 23, 2015