def _period_cdd(self, period, unit, base, per_day):

        temps = self._period_daily_temperatures(period,unit)
        masked_temps = np.ma.masked_array(temps, np.isnan(temps))
        total_cdd = np.sum(np.maximum(masked_temps - base,0))
        if per_day:
            n_days = period.timedelta.days
            return total_cdd / n_days
        else:
            return total_cdd
The total cooling degree days observed during a particular
dataset/ETHPy150Open impactlab/eemeter/eemeter/weather.py/WeatherSourceBase._period_cdd