ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/src/gen/gensdaymtx.c
(Generate patch)

Comparing src/gen/gensdaymtx.c (file contents):
Revision 1.12 by greg, Mon Aug 4 23:45:20 2025 UTC vs.
Revision 1.13 by greg, Fri Aug 22 01:04:30 2025 UTC

# Line 458 | Line 458 | add_direct
458          double mean = sum / NSSAMP;
459  
460          double intensity = mean * WVLSPAN;
461 <        if (dirnorm > 0) {
461 >        if (dirnorm >= 0) {
462                  intensity = dirnorm / SOLOMG / WHTEFFICACY;
463          }
464          double dir_ratio = 1.;
# Line 479 | Line 479 | add_direct
479                  float *pdest = parr + NSSAMP * near_patch[i];
480                  int k;
481                  for (k = 0; k < NSSAMP; k++) {
482 <                        *pdest++ = sun_radiance[k] * wta[i] / wtot;
482 >                        *pdest++ += sun_radiance[k] * wta[i] / wtot;
483                  }
484          }
485   }
# Line 572 | Line 572 | compute_sky
572  
573          /* diffuse calibration factor */
574          double dif_ratio = 1;
575 <        if (difhor > 0) {
575 >        if (difhor >= 0) {
576                  DATARRAY *indirect_irradiance_clear = get_indirect_irradiance(irrad, radius, sun_ct);
577                  double overcast_ghi = overcast_zenithbr * 7.0 * PI / 9.0;
578                  double diffuse_irradiance = 0;
# Line 616 | Line 616 | main
616          int tstorage = 0;                                           /* number of allocated time steps */
617          int nstored = 0;                                            /* number of time steps in matrix */
618          int last_monthly = 0;                                       /* month of last report */
619 <        double dni;                                                 /* direct normal illuminance */
620 <        double dhi;                                                 /* diffuse horizontal illuminance */
619 >        double dni = -1.0;                                                 /* direct normal illuminance */
620 >        double dhi = -1.0;                                                 /* diffuse horizontal illuminance */
621  
622          float           *mtx_data = NULL;
623          int mtx_offset = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines