| 1 |
greg |
1.15 |
.\" RCSid $Id: gendaymtx.1,v 1.14 2020/09/11 16:53:57 greg Exp $
|
| 2 |
greg |
1.1 |
.TH GENDAYMTX 1 01/19/13 RADIANCE
|
| 3 |
|
|
.SH NAME
|
| 4 |
|
|
gendaymtx - generate an annual Perez sky matrix from a weather tape
|
| 5 |
|
|
.SH SYNOPSIS
|
| 6 |
|
|
.B gendaymtx
|
| 7 |
|
|
[
|
| 8 |
|
|
.B "\-v"
|
| 9 |
|
|
][
|
| 10 |
greg |
1.6 |
.B "\-h"
|
| 11 |
|
|
][
|
| 12 |
greg |
1.10 |
.B "\-A"
|
| 13 |
|
|
][
|
| 14 |
greg |
1.11 |
.B "\-d|\-s|\-n"
|
| 15 |
|
|
][
|
| 16 |
greg |
1.14 |
.B "\-u"
|
| 17 |
|
|
][
|
| 18 |
greg |
1.11 |
.B "\-D sunfile"
|
| 19 |
greg |
1.13 |
[
|
| 20 |
greg |
1.12 |
.B "\-M sunmods"
|
| 21 |
greg |
1.13 |
]][
|
| 22 |
greg |
1.2 |
.B "\-r deg"
|
| 23 |
|
|
][
|
| 24 |
greg |
1.1 |
.B "\-m N"
|
| 25 |
|
|
][
|
| 26 |
|
|
.B "\-g r g b"
|
| 27 |
|
|
][
|
| 28 |
|
|
.B "\-c r g b"
|
| 29 |
|
|
][
|
| 30 |
|
|
.B "-o{f|d}"
|
| 31 |
greg |
1.4 |
][
|
| 32 |
|
|
.B "-O{0|1}"
|
| 33 |
greg |
1.1 |
]
|
| 34 |
|
|
[
|
| 35 |
|
|
.B "tape.wea"
|
| 36 |
|
|
]
|
| 37 |
|
|
.SH DESCRIPTION
|
| 38 |
|
|
.I Gendaymtx
|
| 39 |
|
|
takes a weather tape as input and produces a matrix of sky patch
|
| 40 |
|
|
values using the Perez all-weather model.
|
| 41 |
|
|
The weather tape is assumed to be in the simple ASCII format understood
|
| 42 |
|
|
by DAYSIM, which contains a short header with the site parameters followed
|
| 43 |
|
|
by the month, day, standard time, direct normal and diffuse horizontal
|
| 44 |
|
|
irradiance values, one time step per line.
|
| 45 |
|
|
Each time step line is used to compute a column in the output matrix,
|
| 46 |
|
|
where rows correspond to sky patch positions, starting with 0 for
|
| 47 |
|
|
the ground and continuing to 145 for the zenith using the default
|
| 48 |
|
|
.I "\-m 1"
|
| 49 |
|
|
parameter setting.
|
| 50 |
|
|
.PP
|
| 51 |
|
|
Increasing the
|
| 52 |
|
|
.I \-m
|
| 53 |
greg |
1.11 |
parameter yields a higher resolution
|
| 54 |
greg |
1.1 |
sky using the Reinhart patch subdivision.
|
| 55 |
|
|
For example, setting
|
| 56 |
|
|
.I "\-m 4"
|
| 57 |
|
|
yields a sky with 2305 patches plus one patch for the ground.
|
| 58 |
|
|
Each matrix entry is in fact three values, corresponding to
|
| 59 |
|
|
red green and blue radiance channels (watts/sr/meter^2).
|
| 60 |
|
|
Thus, an hourly weather tape for an entire year would
|
| 61 |
|
|
yield 8760x3 (26280) values per output line (row).
|
| 62 |
|
|
.PP
|
| 63 |
|
|
The
|
| 64 |
greg |
1.10 |
.I \-A
|
| 65 |
|
|
option tells
|
| 66 |
|
|
.I gendaymtx
|
| 67 |
|
|
to generate a single column corresponding to an average sky
|
| 68 |
|
|
computed over all the input time steps, rather than one
|
| 69 |
|
|
column per time step.
|
| 70 |
|
|
.PP
|
| 71 |
|
|
The
|
| 72 |
greg |
1.1 |
.I \-c
|
| 73 |
|
|
option may be used to specify a color for the sky.
|
| 74 |
greg |
1.7 |
The gray value should equal 1 for proper energy balance.
|
| 75 |
greg |
1.1 |
The default sky color is
|
| 76 |
|
|
.I "\-c 0.960 1.004 1.118".
|
| 77 |
|
|
Similarly, the
|
| 78 |
|
|
.I \-g
|
| 79 |
|
|
option may be used to specify a ground color.
|
| 80 |
|
|
The default value is
|
| 81 |
|
|
.I "\-g 0.2 0.2 0.2"
|
| 82 |
|
|
corresponding to a 20% gray.
|
| 83 |
|
|
.PP
|
| 84 |
|
|
The
|
| 85 |
|
|
.I \-d
|
| 86 |
greg |
1.9 |
option may be used to produce a sun-only matrix, with no sky contributions,
|
| 87 |
|
|
and the ground patch also set to zero.
|
| 88 |
greg |
1.1 |
Alternatively, the
|
| 89 |
|
|
.I \-s
|
| 90 |
greg |
1.9 |
option may be used to exclude any direct solar component from the output,
|
| 91 |
|
|
with the rest of the sky and ground patch unaffected.
|
| 92 |
greg |
1.8 |
If there is a sun in the description,
|
| 93 |
|
|
.I gendaymtx
|
| 94 |
|
|
will include its contribution in the four nearest sky patches,
|
| 95 |
|
|
distributing energy according to centroid proximity.
|
| 96 |
greg |
1.1 |
.PP
|
| 97 |
greg |
1.11 |
The
|
| 98 |
greg |
1.13 |
.I \-u
|
| 99 |
|
|
option ignores input times when the sun is below the horizon.
|
| 100 |
|
|
This is a convenient way to average daylight hours only with the
|
| 101 |
|
|
.I \-A
|
| 102 |
|
|
option or to ensure that matrix entries correspond to solar positions
|
| 103 |
|
|
produced with the
|
| 104 |
|
|
.I \-D
|
| 105 |
|
|
option, described below.
|
| 106 |
|
|
.PP
|
| 107 |
|
|
The
|
| 108 |
greg |
1.11 |
.I \-n
|
| 109 |
greg |
1.13 |
option may be used if no matrix output is desired at all.
|
| 110 |
greg |
1.11 |
This may be used to merely check the input, or in combination with the
|
| 111 |
|
|
.I \-D
|
| 112 |
|
|
option, below.
|
| 113 |
|
|
.PP
|
| 114 |
|
|
The
|
| 115 |
|
|
.I \-D
|
| 116 |
|
|
option may be used to specify an output file to contain a list of
|
| 117 |
|
|
solar positions and intensities corresponding to time steps in the
|
| 118 |
greg |
1.15 |
weather tape where the sun has any portion above the horizon.
|
| 119 |
greg |
1.12 |
Sun radiance values may be zero if the direct amount is zero on the input.
|
| 120 |
|
|
Sun modifiers and names will be indexed by the minute, numbered from
|
| 121 |
|
|
midnight, January 1st.
|
| 122 |
|
|
If a hyphen ('-') is given as the argument to
|
| 123 |
|
|
.I \-D,
|
| 124 |
|
|
then the sun descriptions will be directed to the standard output.
|
| 125 |
|
|
This implies the
|
| 126 |
|
|
.I \-n
|
| 127 |
|
|
option just described.
|
| 128 |
|
|
If the
|
| 129 |
|
|
.I \-M
|
| 130 |
|
|
option is given as well, it will be used to record the modifier
|
| 131 |
|
|
names used in the
|
| 132 |
|
|
.I \-D
|
| 133 |
|
|
output, for convenient input to
|
| 134 |
|
|
.I rcontrib(1)
|
| 135 |
|
|
and
|
| 136 |
|
|
.I rfluxmtx(1).
|
| 137 |
greg |
1.11 |
.PP
|
| 138 |
greg |
1.3 |
By default,
|
| 139 |
|
|
.I gendaymtx
|
| 140 |
|
|
assumes the positive Y-axis points north such that the first sky patch
|
| 141 |
|
|
is in the Y-axis direction on the horizon, the second patch is just
|
| 142 |
|
|
west of that, and so on spiraling around to the final patch near the zenith.
|
| 143 |
greg |
1.1 |
The
|
| 144 |
greg |
1.2 |
.I \-r
|
| 145 |
|
|
(or
|
| 146 |
|
|
.I \-rz)
|
| 147 |
|
|
option rotates the sky the specified number of degrees counter-clockwise
|
| 148 |
greg |
1.3 |
about the zenith, i.e., west of north.
|
| 149 |
greg |
1.2 |
This is in keeping with the effect of passing the output of
|
| 150 |
|
|
.I gensky(1)
|
| 151 |
|
|
or
|
| 152 |
|
|
.I gendaylit(1)
|
| 153 |
|
|
through
|
| 154 |
|
|
.I xform(1)
|
| 155 |
|
|
using a similar transform.
|
| 156 |
|
|
.PP
|
| 157 |
|
|
The
|
| 158 |
greg |
1.1 |
.I \-of
|
| 159 |
|
|
or
|
| 160 |
|
|
.I \-od
|
| 161 |
|
|
option may be used to specify binary float or double output, respectively.
|
| 162 |
|
|
This is much faster to write and to read, and is therefore preferred on
|
| 163 |
|
|
systems that support it.
|
| 164 |
|
|
(MS Windows is not one of them.)\0
|
| 165 |
greg |
1.4 |
The
|
| 166 |
|
|
.I \-O1
|
| 167 |
|
|
option specifies that output should be total solar radiance rather
|
| 168 |
|
|
than visible radiance.
|
| 169 |
greg |
1.6 |
The
|
| 170 |
|
|
.I \-h
|
| 171 |
|
|
option prevents the output of the usual header information.
|
| 172 |
greg |
1.1 |
Finally, the
|
| 173 |
|
|
.I \-v
|
| 174 |
|
|
option will enable verbose reporting, which is mostly useful for
|
| 175 |
|
|
finding out how many time steps are actually in the weather tape.
|
| 176 |
|
|
.SH EXAMPLES
|
| 177 |
|
|
Produce an uncolored Tregenza sky matrix without solar direct:
|
| 178 |
|
|
.IP "" .2i
|
| 179 |
|
|
gendaymtx -m 1 -c 1 1 1 -s Detroit.wea > Detroit.mtx
|
| 180 |
|
|
.PP
|
| 181 |
|
|
Produce an hourly, annual Reinhart sky matrix
|
| 182 |
|
|
with 2306 patches including solar contributions
|
| 183 |
|
|
and send float output to
|
| 184 |
|
|
.I dctimestep(1)
|
| 185 |
|
|
to compute a sensor value matrix:
|
| 186 |
|
|
.IP "" .2i
|
| 187 |
|
|
gendaymtx -m 4 -of VancouverBC.wea | dctimestep -if -n 8760 DCoef.mtx > res.dat
|
| 188 |
|
|
.SH AUTHORS
|
| 189 |
|
|
Ian Ashdown wrote most of the code,
|
| 190 |
|
|
based on Jean-Jacques Delaunay's original gendaylit(1) implementation.
|
| 191 |
|
|
Greg Ward wrote the final parameter parsing and weather tape conversion.
|
| 192 |
|
|
.SH "SEE ALSO"
|
| 193 |
greg |
1.5 |
dctimestep(1), genBSDF(1), gendaylit(1), gensky(1), genskyvec(1),
|
| 194 |
greg |
1.12 |
rcollate(1), rcontrib(1), rfluxmtx(1), xform(1)
|