#NEWLINE# def calcSeverity( model , climatology , cid , varname = 'soil_moist' ) : #NEWLINE# #INDENT# 'Calculate drought severity from *climatology* table stored in database.' #NEWLINE# nt = ( ( date ( model . endyear , model . endmonth , model . endday ) - date ( ( model . startyear + model . skipyear ) , model . startmonth , model . startday ) ) . days + 1 ) #NEWLINE# s = np . zeros ( nt ) #NEWLINE# return s