.\" RCSid $Id: gensdaymtx.1,v 1.4 2025/04/10 23:30:58 greg Exp $ .TH GENSDAYMTX 1 01/19/13 RADIANCE .SH NAME gensdaymtx - generate an annual spectral sky matrix from a weather tape .SH SYNOPSIS .B gensdaymtx [ .B "\-v" ][ .B "\-h" ][ .B "\-d|\-s" ][ .B "\-u" ]][ .B "\-r deg" ][ .B "\-m N" ][ .B "\-p Dir" ][ .B "\-n N" ][ .B "-o{f|d}" ] [ .B "tape.wea" or .B "tape.epw" ] .SH DESCRIPTION .I Gensdaymtx takes a weather tape as input and produces a matrix of spectral sky patch values using the precomputed atmospheric scattering model. Unlike the similarly-named .I gendaymtx tool, the Perez sky model is not used. The weather tape is assumed to be in a special form of the .wea file, which contains a short header with the site parameters followed by the month, day, standard time, direct normal and diffuse horizontal illuminance values, total cloud cover, and broadband aerosol optical depth, one time step per line. Alternatively, a standard EPW (EnergyPlus Weather) file may be provided. Such file can be generated by .I epw2wea with the .I \-a flag. Each time step line is used to compute a column in the output matrix, where rows correspond to sky patch positions, starting with 0 for the ground and continuing to 145 for the zenith using the default .I "\-m 1" parameter setting. .PP .I Gensdaymtx uses the OPAC continental average aerosol profile for the Mie scattering calculation. For every distinct AOD value in the weather tape, a new set of the atmospheric parameters is computed and stored in the atmos_data directory in the current directory, which can be changed using the -p flag. This precomputation can be sped up using the .I \-n NThreads option. There is no speedup after NTHREADS=16. .PP Increasing the .I \-m parameter yields a higher resolution sky using the Reinhart patch subdivision. For example, setting .I "\-m 4" yields a sky with 2305 patches plus one patch for the ground. Each matrix entry is in fact 20 values, corresponding to spectra from 380nm to 730nm at 20nm interval (watts/sr/meter^2). Thus, an hourly weather tape for an entire year would yield 8760x20 (175200) values per output line (row). .PP The .I \-g option may be used to specify a ground color. The default value is .I "\-g 0.2" corresponding to a 20% gray. .PP If there is a sun in the description, .I gensdaymtx will include its contribution in the four nearest sky patches, distributing energy according to centroid proximity. The .I \-d option may be used to produce a sun-only matrix, with no sky contributions, and the ground patch also set to zero. Alternatively, the .I \-s option may be used to exclude any direct solar component from the output, with the other sky and ground patches unaffected. .PP The .I \-u option ignores input times when the sun is below the horizon. .PP By default, .I gensdaymtx assumes the positive Y-axis points north such that the first sky patch is in the Y-axis direction on the horizon, the second patch is just west of that, and so on spiraling around to the final patch near the zenith. The .I \-r (or .I \-rz) option rotates the sky the specified number of degrees counter-clockwise about the zenith, i.e., west of north. This is in keeping with the effect of passing the output of .I gensky(1) or .I gendaylit(1) through .I xform(1) using a similar transform. .PP The .I \-of or .I \-od option may be used to specify binary float or double output, respectively. This is much faster to write and to read, and is therefore preferred on systems that support it. (MS Windows is not one of them.)\0 The .I \-h option prevents the output of the usual header information. Finally, the .I \-v option will enable verbose reporting, which is mostly useful for finding out how many time steps are actually in the weather tape. .SH EXAMPLES Produce an annual spectral sky matrix without solar direct: .IP "" .2i epw2wea Detroit.epw Detroit.wea -a; gensdaymtx -m 1 -s Detroit.wea > Detroit.mtx .PP Produce an hourly, annual Reinhart sky matrix with 2306 patches including solar contributions and send float output to .I dctimestep(1) to compute a sensor value matrix: .IP "" .2i gensdaymtx -m 4 -of VancouverBC.wea | dctimestep -if -n 8760 DCoef.mtx > res.dat .SH AUTHORS Taoning Wang .SH "SEE ALSO" dctimestep(1), epw2wea(1), genBSDF(1), gendaylit(1), gendaymtx(1), gensky(1), genskyvec(1), genssky(1), pvsum(1), rcollate(1), rcomb(1), rcontrib(1), rfluxmtx(1), rmtxop(1), xform(1)