43 |
|
/* Perez sky parametrization : epsilon and delta calculations from the direct and diffuse irradiances */ |
44 |
|
double sky_brightness(); |
45 |
|
double sky_clearness(); |
46 |
+ |
void computesky(); |
47 |
|
|
48 |
|
/* calculation of the direct and diffuse components from the Perez parametrization */ |
49 |
|
double diffus_irradiance_from_sky_brightness(); |
274 |
|
} |
275 |
|
|
276 |
|
|
277 |
+ |
void |
278 |
|
computesky() /* compute sky parameters */ |
279 |
|
{ |
280 |
|
|
281 |
|
/* new variables */ |
282 |
< |
int j, i; |
282 |
> |
int j; |
283 |
|
float *lv_mod; /* 145 luminance values*/ |
284 |
|
/* 145 directions for the calculation of the normalization coefficient, coefficient Perez model */ |
285 |
|
float *theta_o, *phi_o, *coeff_perez; |
286 |
|
double dzeta, gamma; |
285 |
– |
double diffusion; |
287 |
|
double normfactor; |
288 |
|
|
289 |
|
|
473 |
|
/* Compute the ground radiance */ |
474 |
|
zenithbr=calc_rel_lum_perez(0.0,radians(sunzenith),radians(sunzenith),skyclearness,skybrightness,coeff_perez); |
475 |
|
zenithbr*=diffnormalization; |
476 |
+ |
/* |
477 |
|
fprintf(stderr, "gendaylit : the actual zenith radiance(W/m^2/sr) or luminance(cd/m^2) is : %.0lf\n", zenithbr); |
478 |
< |
|
478 |
> |
*/ |
479 |
> |
|
480 |
|
if (skyclearness==1) |
481 |
|
normfactor = 0.777778; |
482 |
|
|