#module imports
from fielddisplay import fielddisplay

class constants:
	#properties
	def __init__(self):
		# {{{ Properties
		self.g                    = 0
		self.yts                  = 0
		self.referencetemperature = 0
		
		#set defaults
		self.setdefaultparameters()

		#}}}
	def __repr__(obj):
		# {{{ Display
		string="   constants parameters:"
		string="%s\n\n%s"%(string,fielddisplay(obj,"g","gravitational acceleration"))
		string="%s\n%s"%(string,fielddisplay(obj,"yts","number of seconds in a year"))
		string="%s\n%s"%(string,fielddisplay(obj,"referencetemperature","reference temperature used in the enthalpy model"))


		return string
		#}}}
		
	def setdefaultparameters(obj):
		# {{{setdefaultparameters
		
		#acceleration due to gravity (m/s^2)
		obj.g=9.81

		#converstion from year to seconds
		obj.yts=365*24*3600

		#the reference temperature for enthalpy model (cf Aschwanden)
		obj.referencetemperature=223.15

		return obj
	#}}}

