/* getMonthsIrr
 * Calculates the TOTAL corrected irradiance for a month, STARTING
 * FROM DAY = 1.
 */

#include "gddcalc.h"
#include <stdio.h>
#include <stdlib.h>

float getDaysIrr(int, int, int);                       // prototype

float getMonthsIrr(int month)
{
	int day;
	float daysIrr, monthsIrr;

	monthsIrr = 0;
	for (day = 1; day <= dayspermonth[month-1]; day++)
	{
		daysIrr = getDaysIrr(day, month, active_year);
		monthsIrr = monthsIrr + daysIrr;
	}
	return monthsIrr;
}
