weather/stations/davis.py
def _calc_derived_fields(self, fields):
        '''
        calculates the derived fields (those fields that are calculated)
        '''
        # convenience variables for the calculations below
        temp = fields['TempOut']
        hum = fields['HumOut']
        wind = fields['WindSpeed']
        wind10min = fields['WindSpeed10Min']
        fields['HeatIndex'] = calc_heat_index(temp, hum)
        fields['WindChill'] = calc_wind_chill(temp, wind, wind10min)
        fields['DewPoint'] = calc_dewpoint(temp, hum)
        # store current data string
        now = time.localtime()
        fields['DateStamp'] = time.strftime("%Y-%m-%d %H:%M:%S", now)
        fields['Year'] = now[0]
        fields['Month'] = str(now[1]).zfill(2)
        now = time.gmtime()
        fields['DateStampUtc'] = time.strftime("%Y-%m-%d %H:%M:%S", now)
        fields['YearUtc'] = now[0]
        fields['MonthUtc'] = str(now[1]).zfill(2)
def _calc_derived_fields(self, fields):
        '''
        calculates the derived fields (those fields that are calculated)
        '''
        # convenience variables for the calculations below
        temp = fields['TempOut']
        hum = fields['HumOut']
        wind = fields['WindSpeed']
        wind10min = fields['WindSpeed10Min']
        fields['HeatIndex'] = calc_heat_index(temp, hum)
        fields['WindChill'] = calc_wind_chill(temp, wind, wind10min)
        fields['DewPoint'] = calc_dewpoint(temp, hum)
        # store current data string
        now = time.localtime()
        fields['DateStamp'] = time.strftime("%Y-%m-%d %H:%M:%S", now)
        fields['Year'] = now[0]
        fields['Month'] = str(now[1]).zfill(2)
        now = time.gmtime()
        fields['DateStampUtc'] = time.strftime("%Y-%m-%d %H:%M:%S", now)
        fields['YearUtc'] = now[0]
        fields['MonthUtc'] = str(now[1]).zfill(2)
calculates the derived fields (those fields that are calculated)