gensky -g buglet

If -g is given as the last argument to the gensky command, a bus error or segmentation fault results. That is:
  gensky 3 31 10:00 -g -c
works, but
  gensky 3 31 10:00 -c -g
fails.

···

--
Randolph M. Fritz • [email protected]
Environmental Energy Technologies Division • Lawrence Berkeley Labs

That's because -g is expecting an argument (the ground reflectance). If you give "-c" after, it probably calls atof("-c") which returns 0.

In general, Radiance doesn't have very paranoid argument checking. If you don't give a legal command line, many Radiance programs just muddle through (or crash if they try reading past the last argument). The exceptions to this are the rendering programs and a few utilities that call badarg() to check command argument types.

-Greg

···

From: "Randolph M. Fritz" <[email protected]>
Date: February 7, 2011 1:29:09 PM PST

If -g is given as the last argument to the gensky command, a bus error or segmentation fault results. That is:
gensky 3 31 10:00 -g -c
works, but
gensky 3 31 10:00 -c -g
fails.
--
Randolph M. Fritz • [email protected]
Environmental Energy Technologies Division • Lawrence Berkeley Labs

So is the default never used? Or only when -g is not given?

···

On 2011-02-07 13:49:44 -0800, Gregory J. Ward said:

That's because -g is expecting an argument (the ground reflectance). If you give "-c" after, it probably calls atof("-c") which returns 0.

In general, Radiance doesn't have very paranoid argument checking. If you don't give a legal command line, many Radiance programs just muddle through (or crash if they try reading past the last argument). The exceptions to this are the rendering programs and a few utilities that call badarg() to check command argument types.

-Greg

From: "Randolph M. Fritz" <[email protected]>
Date: February 7, 2011 1:29:09 PM PST

If -g is given as the last argument to the gensky command, a bus error or segmentation fault results. That is:
gensky 3 31 10:00 -g -c
works, but
gensky 3 31 10:00 -c -g
fails.
--
Randolph M. Fritz • [email protected]
Environmental Energy Technologies Division • Lawrence Berkeley Labs

--
Randolph M. Fritz • [email protected]
Environmental Energy Technologies Division • Lawrence Berkeley Labs

Huh? You get the default value if you *don't* specify a -g option. If you use -g 0.30, you would get a ground reflectance of 30% instead of the default 20%.

Make sense?
-Greg

···

From: "Randolph M. Fritz" <[email protected]>
Date: February 9, 2011 10:05:17 AM PST

So is the default never used? Or only when -g is not given?

On 2011-02-07 13:49:44 -0800, Gregory J. Ward said:

That's because -g is expecting an argument (the ground reflectance). If you give "-c" after, it probably calls atof("-c") which returns 0.
In general, Radiance doesn't have very paranoid argument checking. If you don't give a legal command line, many Radiance programs just muddle through (or crash if they try reading past the last argument). The exceptions to this are the rendering programs and a few utilities that call badarg() to check command argument types.
-Greg

From: "Randolph M. Fritz" <[email protected]>
Date: February 7, 2011 1:29:09 PM PST
If -g is given as the last argument to the gensky command, a bus error or segmentation fault results. That is:
gensky 3 31 10:00 -g -c
works, but
gensky 3 31 10:00 -c -g
fails.
--
Randolph M. Fritz • [email protected]
Environmental Energy Technologies Division • Lawrence Berkeley Labs

--
Randolph M. Fritz • [email protected]
Environmental Energy Technologies Division • Lawrence Berkeley Labs

_______________________________________________
Radiance-dev mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-dev

The default rfl value for -g is used when -g is not given. That's the
definition of default, isn't it? =8-)

Greg is saying that -g needs an argument, for the ground refl. It's not an
on/off switch.

Rob Guglielmetti IESNA, LEED AP
Commercial Buildings Research Group
National Renewable Energy Laboratory
1617 Cole Blvd MS:RSF202
Golden, CO 80401
T. 303.275.4319
F. 303.630.2055
E. [email protected]

···

On 2/9/11 11:05 AM, "Randolph M. Fritz" <[email protected]> wrote:

So is the default never used? Or only when -g is not given?

On 2011-02-07 13:49:44 -0800, Gregory J. Ward said:

That's because -g is expecting an argument (the ground reflectance).
If you give "-c" after, it probably calls atof("-c") which returns 0.

In general, Radiance doesn't have very paranoid argument checking. If
you don't give a legal command line, many Radiance programs just muddle
through (or crash if they try reading past the last argument). The
exceptions to this are the rendering programs and a few utilities that
call badarg() to check command argument types.

-Greg

From: "Randolph M. Fritz" <[email protected]>
Date: February 7, 2011 1:29:09 PM PST

If -g is given as the last argument to the gensky command, a bus error
or segmentation fault results. That is:
gensky 3 31 10:00 -g -c
works, but
gensky 3 31 10:00 -c -g
fails.
--
Randolph M. Fritz € [email protected]
Environmental Energy Technologies Division € Lawrence Berkeley Labs

--
Randolph M. Fritz € [email protected]
Environmental Energy Technologies Division € Lawrence Berkeley Labs

_______________________________________________
Radiance-dev mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-dev

BTW, the default value for -g is not printed in the manpage, but it's 20%
(you can find it in gensky.c, and Axel Jacobs mentions this in his
rtcontrib tutorial, I believe).

Rob Guglielmetti IESNA, LEED AP
Commercial Buildings Research Group
National Renewable Energy Laboratory
1617 Cole Blvd MS:RSF202
Golden, CO 80401
T. 303.275.4319
F. 303.630.2055
E. [email protected]

···

On 2/9/11 11:22 AM, "Guglielmetti, Robert" <[email protected]> wrote:

The default rfl value for -g is used when -g is not given. That's the
definition of default, isn't it? =8-)

Greg is saying that -g needs an argument, for the ground refl. It's not an
on/off switch.

Rob Guglielmetti IESNA, LEED AP
Commercial Buildings Research Group
National Renewable Energy Laboratory
1617 Cole Blvd MS:RSF202
Golden, CO 80401
T. 303.275.4319
F. 303.630.2055
E. [email protected]

On 2/9/11 11:05 AM, "Randolph M. Fritz" <[email protected]> wrote:

So is the default never used? Or only when -g is not given?

On 2011-02-07 13:49:44 -0800, Gregory J. Ward said:

That's because -g is expecting an argument (the ground reflectance).
If you give "-c" after, it probably calls atof("-c") which returns 0.

In general, Radiance doesn't have very paranoid argument checking. If
you don't give a legal command line, many Radiance programs just muddle
through (or crash if they try reading past the last argument). The
exceptions to this are the rendering programs and a few utilities that
call badarg() to check command argument types.

-Greg

From: "Randolph M. Fritz" <[email protected]>
Date: February 7, 2011 1:29:09 PM PST

If -g is given as the last argument to the gensky command, a bus error
or segmentation fault results. That is:
gensky 3 31 10:00 -g -c
works, but
gensky 3 31 10:00 -c -g
fails.
--
Randolph M. Fritz € [email protected]
Environmental Energy Technologies Division € Lawrence Berkeley Labs

--
Randolph M. Fritz € [email protected]
Environmental Energy Technologies Division € Lawrence Berkeley Labs

_______________________________________________
Radiance-dev mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-dev

_______________________________________________
Radiance-dev mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-dev

There is a "gensky -defaults" report if you like:

+s # Sunny sky with sun
-g 0.200000 # Ground plane reflectance
-t 2.450000 # Atmospheric turbidity
-a 37.815214 # Site latitude (degrees)
-o 122.040010 # Site longitude (degrees)
-m 120.000281 # Standard meridian (degrees)

-Greg

···

From: "Guglielmetti, Robert" <[email protected]>
Date: February 9, 2011 10:29:00 AM PST

BTW, the default value for -g is not printed in the manpage, but it's 20%
(you can find it in gensky.c, and Axel Jacobs mentions this in his
rtcontrib tutorial, I believe).

Rob Guglielmetti IESNA, LEED AP

I know that...now.

Thanks.

Randolph

···

On 2011-02-09 10:22:13 -0800, Guglielmetti, Robert said:

The default rfl value for -g is used when -g is not given. That's the
definition of default, isn't it? =8-)

Greg is saying that -g needs an argument, for the ground refl. It's not an
on/off switch.

Ooof! Something really weird happens when I run:
  gensky 6 21 10:30 -g -c

Not sure what it does, but it includes a sun.

Time to rerun some simulations...

Randolph

···

On 2011-02-09 10:21:56 -0800, Gregory J. Ward said:

Huh? You get the default value if you *don't* specify a -g option. If you use -g 0.30, you would get a ground reflectance of 30% instead of the default 20%.

Make sense?
-Greg

From: "Randolph M. Fritz" <[email protected]>
Date: February 9, 2011 10:05:17 AM PST

So is the default never used? Or only when -g is not given?

On 2011-02-07 13:49:44 -0800, Gregory J. Ward said:

That's because -g is expecting an argument (the ground reflectance). If you give "-c" after, it probably calls atof("-c") which returns 0.
In general, Radiance doesn't have very paranoid argument checking. If you don't give a legal command line, many Radiance programs just muddle through (or crash if they try reading past the last argument). The exceptions to this are the rendering programs and a few utilities that call badarg() to check command argument types.
-Greg

From: "Randolph M. Fritz" <[email protected]>
Date: February 7, 2011 1:29:09 PM PST
If -g is given as the last argument to the gensky command, a bus error or segmentation fault results. That is:
gensky 3 31 10:00 -g -c
works, but
gensky 3 31 10:00 -c -g
fails.
--
Randolph M. Fritz • [email protected]
Environmental Energy Technologies Division • Lawrence Berkeley Labs

--
Randolph M. Fritz • [email protected]
Environmental Energy Technologies Division • Lawrence Berkeley Labs

_______________________________________________
Radiance-dev mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-dev

--
Randolph M. Fritz • [email protected]
Environmental Energy Technologies Division • Lawrence Berkeley Labs

It generates an intermediate sky with a sun...

Randolph

···

On 2011-02-10 13:34:42 -0800, Randolph M. Fritz said:

Ooof! Something really weird happens when I run:
  gensky 6 21 10:30 -g -c

Not sure what it does, but it includes a sun.

Time to rerun some simulations...

Randolph

On 2011-02-09 10:21:56 -0800, Gregory J. Ward said:

Huh? You get the default value if you *don't* specify a -g option. If
you use -g 0.30, you would get a ground reflectance of 30% instead of
the default 20%.

Make sense?
-Greg

From: "Randolph M. Fritz" <[email protected]>
Date: February 9, 2011 10:05:17 AM PST

So is the default never used? Or only when -g is not given?

On 2011-02-07 13:49:44 -0800, Gregory J. Ward said:

That's because -g is expecting an argument (the ground reflectance).
If you give "-c" after, it probably calls atof("-c") which returns 0.
In general, Radiance doesn't have very paranoid argument checking. If
you don't give a legal command line, many Radiance programs just muddle
through (or crash if they try reading past the last argument). The
exceptions to this are the rendering programs and a few utilities that
call badarg() to check command argument types.
-Greg

From: "Randolph M. Fritz" <[email protected]>
Date: February 7, 2011 1:29:09 PM PST
If -g is given as the last argument to the gensky command, a bus error
or segmentation fault results. That is:
gensky 3 31 10:00 -g -c
works, but
gensky 3 31 10:00 -c -g
fails.
--
Randolph M. Fritz • [email protected]
Environmental Energy Technologies Division • Lawrence Berkeley Labs

--
Randolph M. Fritz • [email protected]
Environmental Energy Technologies Division • Lawrence Berkeley Labs

_______________________________________________
Radiance-dev mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-dev

--
Randolph M. Fritz • [email protected]
Environmental Energy Technologies Division • Lawrence Berkeley Labs