GenCumulativeSky compiled for Mac?

May I ask if anybody compiled the *GenCumulativeSky* program created by
Darren Robinson for *Mac OS*?

Darren mentioned that the source code of GenCumulativeSky is written in *C++
*. I assume we can use *Xcode* to compile it as an executable program for
the Mac system. But I don't know how to do it ...

Currently, I have to run GenCumulativeSky in Win7 to generate the sky.cal
and SunFile.rad file based on the epw file for a given city and use the 2
files in Mac system with other Radiance program. It's just a little bit
inconvenient...

Advices are greatly appreciated!

- Ji

You don't even need to use the Xcode IDE, you can call the compiler (g++) directly if there's a makefile. If you point me to the source code, I can give it a whirl.

Rob Guglielmetti
National Renewable Energy Laboratory (NREL)
Commercial Buildings Research Group
15013 Denver West Parkway MS:RSF202
Golden, CO 80401
303.275.4319
robert.guglielmetti@nrel.gov

···

On 12/12/12 7:52 AM, "Ji Zhang" <hope.zh@gmail.com<mailto:hope.zh@gmail.com>> wrote:

May I ask if anybody compiled the GenCumulativeSky program created by Darren Robinson for Mac OS?

Darren mentioned that the source code of GenCumulativeSky is written in C++. I assume we can use Xcode to compile it as an executable program for the Mac system. But I don't know how to do it ...

Currently, I have to run GenCumulativeSky in Win7 to generate the sky.cal and SunFile.rad file based on the epw file for a given city and use the 2 files in Mac system with other Radiance program. It's just a little bit inconvenient...

Advices are greatly appreciated!

- Ji

Hi, Rob, many thanks for your reply!

The source code of GenCumulativeSky can be found at: (including a short
guide prepared by Darren)
https://documents.epfl.ch/groups/u/ur/urbansimulation/www/GenCumSky/GenCumSky.zip

... the download link is mentioned in one of the chapters in the book
edited by Darren:
Robinson, Darren (Ed.). (2011). Computer modelling for sustainable urban
design : physical principles, methods and applications. London ;
Washington, DC: Earthscan.

It seems Prof Christoph Reinhart in MIT has revised the program and added
some new options, and the updated version is included in the latest DIVA
installation package, see the discussion at:
http://diva4rhino.com/forum/topics/gencumulativesky-exe-problem

Would appreciate if you can share the detailed procedures of the
compilation (for a C/C++ programming rookie)!

Thanks!
- Ji

···

On Thu, Dec 13, 2012 at 12:59 AM, Guglielmetti, Robert < Robert.Guglielmetti@nrel.gov> wrote:

You don't even need to use the Xcode IDE, you can call the compiler (g++)
directly if there's a makefile. If you point me to the source code, I can
give it a whirl.

Rob Guglielmetti
National Renewable Energy Laboratory (NREL)
Commercial Buildings Research Group
15013 Denver West Parkway MS:RSF202
Golden, CO 80401
303.275.4319
robert.guglielmetti@nrel.gov

On 12/12/12 7:52 AM, "Ji Zhang" <hope.zh@gmail.com<mailto: > hope.zh@gmail.com>> wrote:

May I ask if anybody compiled the GenCumulativeSky program created by
Darren Robinson for Mac OS?

Darren mentioned that the source code of GenCumulativeSky is written in
C++. I assume we can use Xcode to compile it as an executable program for
the Mac system. But I don't know how to do it ...

Currently, I have to run GenCumulativeSky in Win7 to generate the sky.cal
and SunFile.rad file based on the epw file for a given city and use the 2
files in Mac system with other Radiance program. It's just a little bit
inconvenient...

Advices are greatly appreciated!

- Ji

_______________________________________________
Radiance-general mailing list
Radiance-general@radiance-online.org
http://www.radiance-online.org/mailman/listinfo/radiance-general

Hi, Rob, thank you very much! I'll ask a friend who knows C++
programming/compilation to try it out. Will digest Christoph's book chapter
as well.

- Cheers, Ji.

···

On Thu, Dec 13, 2012 at 2:15 AM, Guglielmetti, Robert < Robert.Guglielmetti@nrel.gov> wrote:

--------
WARNING: At least one of the links in the message below goes to an .exe
file,
which could be malicious. To learn how to protect yourself, please go here:
http://www.lbl.gov/cyber/services/suspicious-links.html
--------

Hi Ji,

Thanks for the link, I grabbed the source and right in the readme was a
suggested compiler command:

"g++ -D_XOPEN_SOURCE *.cpp -lm -o gencumulativesky"

The above command worked a treat on my dilapidated Mac Pro (still running
10.6). The command expects a specifically-formatted weather file which I do
not have on hand, so I couldn't test it aside from calling the command with
no input and getting the help, but that did work. The only thing to
remember is to set the permissions to make it executable on your system
(e.g. "chmod 775 gencumulativesky").

P.S.
Christoph also mentions gencumulativesky in his (excellent) daylighting
chapter in this fairly awesome book:

http://www.amazon.com/Building-Performance-Simulation-Design-Operation/dp/0415474140

Rob Guglielmetti
National Renewable Energy Laboratory (NREL)
Commercial Buildings Research Group
15013 Denver West Parkway MS:RSF202
Golden, CO 80401
303.275.4319
robert.guglielmetti@nrel.gov

On 12/12/12 10:35 AM, "Ji Zhang" <hope.zh@gmail.com<mailto: > hope.zh@gmail.com>> wrote:

Hi, Rob, many thanks for your reply!

The source code of GenCumulativeSky can be found at: (including a short
guide prepared by Darren)

https://documents.epfl.ch/groups/u/ur/urbansimulation/www/GenCumSky/GenCumSky.zip

... the download link is mentioned in one of the chapters in the book
edited by Darren:
Robinson, Darren (Ed.). (2011). Computer modelling for sustainable urban
design : physical principles, methods and applications. London ;
Washington, DC: Earthscan.

It seems Prof Christoph Reinhart in MIT has revised the program and added
some new options, and the updated version is included in the latest DIVA
installation package, see the discussion at:
http://diva4rhino.com/forum/topics/gencumulativesky-exe-problem

Would appreciate if you can share the detailed procedures of the
compilation (for a C/C++ programming rookie)!

Thanks!
- Ji

On Thu, Dec 13, 2012 at 12:59 AM, Guglielmetti, Robert < > Robert.Guglielmetti@nrel.gov<mailto:Robert.Guglielmetti@nrel.gov>> wrote:
You don't even need to use the Xcode IDE, you can call the compiler (g++)
directly if there's a makefile. If you point me to the source code, I can
give it a whirl.

Rob Guglielmetti
National Renewable Energy Laboratory (NREL)
Commercial Buildings Research Group
15013 Denver West Parkway MS:RSF202
Golden, CO 80401
303.275.4319<tel:303.275.4319>
robert.guglielmetti@nrel.gov<mailto:robert.guglielmetti@nrel.gov>

On 12/12/12 7:52 AM, "Ji Zhang" <hope.zh@gmail.com<mailto: > hope.zh@gmail.com><mailto:hope.zh@gmail.com<mailto:hope.zh@gmail.com>>> > wrote:

May I ask if anybody compiled the GenCumulativeSky program created by
Darren Robinson for Mac OS?

Darren mentioned that the source code of GenCumulativeSky is written in
C++. I assume we can use Xcode to compile it as an executable program for
the Mac system. But I don't know how to do it ...

Currently, I have to run GenCumulativeSky in Win7 to generate the sky.cal
and SunFile.rad file based on the epw file for a given city and use the 2
files in Mac system with other Radiance program. It's just a little bit
inconvenient...

Advices are greatly appreciated!

- Ji

_______________________________________________
Radiance-general mailing list
Radiance-general@radiance-online.org<mailto:
Radiance-general@radiance-online.org>
http://www.radiance-online.org/mailman/listinfo/radiance-general

_______________________________________________
Radiance-general mailing list
Radiance-general@radiance-online.org
http://www.radiance-online.org/mailman/listinfo/radiance-general

Hi, Rob and the list, a small follow-up question:

I was testing GenCumulativeSky.exe to get the* annual "global horizontal
radiation"* for *a single unobstructed upward sensor*.

The results is* *always *SMALLER or LOWER *than the *SUM of the "global
horizontal radiation" column in the epw file*. (For London.epw, up to 2.7%
lower; for Paris.epw, up to 1.73% lower, for Singapore.epw, up to 1.5%
lower ...)

May I ask:
1) Is the difference in this kind of magnitude acceptable?
2) is the difference related to the parameters for rtrace (I assume not, as
the sensor is unobstructed and the scene is empty...)?

Thanks!
-Ji

···

On Thu, Dec 13, 2012 at 2:15 AM, Guglielmetti, Robert < Robert.Guglielmetti@nrel.gov> wrote:

--------
WARNING: At least one of the links in the message below goes to an .exe
file,
which could be malicious. To learn how to protect yourself, please go here:
http://www.lbl.gov/cyber/services/suspicious-links.html
--------

Hi Ji,

Thanks for the link, I grabbed the source and right in the readme was a
suggested compiler command:

"g++ -D_XOPEN_SOURCE *.cpp -lm -o gencumulativesky"

The above command worked a treat on my dilapidated Mac Pro (still running
10.6). The command expects a specifically-formatted weather file which I do
not have on hand, so I couldn't test it aside from calling the command with
no input and getting the help, but that did work. The only thing to
remember is to set the permissions to make it executable on your system
(e.g. "chmod 775 gencumulativesky").

P.S.
Christoph also mentions gencumulativesky in his (excellent) daylighting
chapter in this fairly awesome book:

http://www.amazon.com/Building-Performance-Simulation-Design-Operation/dp/0415474140

Rob Guglielmetti
National Renewable Energy Laboratory (NREL)
Commercial Buildings Research Group
15013 Denver West Parkway MS:RSF202
Golden, CO 80401
303.275.4319
robert.guglielmetti@nrel.gov

On 12/12/12 10:35 AM, "Ji Zhang" <hope.zh@gmail.com<mailto: > hope.zh@gmail.com>> wrote:

Hi, Rob, many thanks for your reply!

The source code of GenCumulativeSky can be found at: (including a short
guide prepared by Darren)

https://documents.epfl.ch/groups/u/ur/urbansimulation/www/GenCumSky/GenCumSky.zip

... the download link is mentioned in one of the chapters in the book
edited by Darren:
Robinson, Darren (Ed.). (2011). Computer modelling for sustainable urban
design : physical principles, methods and applications. London ;
Washington, DC: Earthscan.

It seems Prof Christoph Reinhart in MIT has revised the program and added
some new options, and the updated version is included in the latest DIVA
installation package, see the discussion at:
http://diva4rhino.com/forum/topics/gencumulativesky-exe-problem

Would appreciate if you can share the detailed procedures of the
compilation (for a C/C++ programming rookie)!

Thanks!
- Ji

On Thu, Dec 13, 2012 at 12:59 AM, Guglielmetti, Robert < > Robert.Guglielmetti@nrel.gov<mailto:Robert.Guglielmetti@nrel.gov>> wrote:
You don't even need to use the Xcode IDE, you can call the compiler (g++)
directly if there's a makefile. If you point me to the source code, I can
give it a whirl.

Rob Guglielmetti
National Renewable Energy Laboratory (NREL)
Commercial Buildings Research Group
15013 Denver West Parkway MS:RSF202
Golden, CO 80401
303.275.4319<tel:303.275.4319>
robert.guglielmetti@nrel.gov<mailto:robert.guglielmetti@nrel.gov>

On 12/12/12 7:52 AM, "Ji Zhang" <hope.zh@gmail.com<mailto: > hope.zh@gmail.com><mailto:hope.zh@gmail.com<mailto:hope.zh@gmail.com>>> > wrote:

May I ask if anybody compiled the GenCumulativeSky program created by
Darren Robinson for Mac OS?

Darren mentioned that the source code of GenCumulativeSky is written in
C++. I assume we can use Xcode to compile it as an executable program for
the Mac system. But I don't know how to do it ...

Currently, I have to run GenCumulativeSky in Win7 to generate the sky.cal
and SunFile.rad file based on the epw file for a given city and use the 2
files in Mac system with other Radiance program. It's just a little bit
inconvenient...

Advices are greatly appreciated!

- Ji

_______________________________________________
Radiance-general mailing list
Radiance-general@radiance-online.org<mailto:
Radiance-general@radiance-online.org>
http://www.radiance-online.org/mailman/listinfo/radiance-general

_______________________________________________
Radiance-general mailing list
Radiance-general@radiance-online.org
http://www.radiance-online.org/mailman/listinfo/radiance-general

No worries, Ji!

I should also mention that you sorta DO need Xcode to do this, because installing that is how you get your compilers and linkers, should you want to try this on your own on MacOS.

- Rob

···

On Dec 13, 2012, at 8:41 PM, Ji Zhang <hope.zh@gmail.com> wrote:

Hi, Rob, thank you very much! I'll ask a friend who knows C++ programming/compilation to try it out. Will digest Christoph's book chapter as well.

- Cheers, Ji.

On Thu, Dec 13, 2012 at 2:15 AM, Guglielmetti, Robert <Robert.Guglielmetti@nrel.gov> wrote:
--------
WARNING: At least one of the links in the message below goes to an .exe file,
which could be malicious. To learn how to protect yourself, please go here:
http://www.lbl.gov/cyber/services/suspicious-links.html
--------

Hi Ji,

Thanks for the link, I grabbed the source and right in the readme was a suggested compiler command:

"g++ -D_XOPEN_SOURCE *.cpp -lm -o gencumulativesky"

The above command worked a treat on my dilapidated Mac Pro (still running 10.6). The command expects a specifically-formatted weather file which I do not have on hand, so I couldn't test it aside from calling the command with no input and getting the help, but that did work. The only thing to remember is to set the permissions to make it executable on your system (e.g. "chmod 775 gencumulativesky").

P.S.
Christoph also mentions gencumulativesky in his (excellent) daylighting chapter in this fairly awesome book:
http://www.amazon.com/Building-Performance-Simulation-Design-Operation/dp/0415474140

Rob Guglielmetti
National Renewable Energy Laboratory (NREL)
Commercial Buildings Research Group
15013 Denver West Parkway MS:RSF202
Golden, CO 80401
303.275.4319
robert.guglielmetti@nrel.gov

On 12/12/12 10:35 AM, "Ji Zhang" <hope.zh@gmail.com<mailto:hope.zh@gmail.com>> wrote:

Hi, Rob, many thanks for your reply!

The source code of GenCumulativeSky can be found at: (including a short guide prepared by Darren)
https://documents.epfl.ch/groups/u/ur/urbansimulation/www/GenCumSky/GenCumSky.zip

... the download link is mentioned in one of the chapters in the book edited by Darren:
Robinson, Darren (Ed.). (2011). Computer modelling for sustainable urban design : physical principles, methods and applications. London ; Washington, DC: Earthscan.

It seems Prof Christoph Reinhart in MIT has revised the program and added some new options, and the updated version is included in the latest DIVA installation package, see the discussion at:
http://diva4rhino.com/forum/topics/gencumulativesky-exe-problem

Would appreciate if you can share the detailed procedures of the compilation (for a C/C++ programming rookie)!

Thanks!
- Ji

On Thu, Dec 13, 2012 at 12:59 AM, Guglielmetti, Robert <Robert.Guglielmetti@nrel.gov<mailto:Robert.Guglielmetti@nrel.gov>> wrote:
You don't even need to use the Xcode IDE, you can call the compiler (g++) directly if there's a makefile. If you point me to the source code, I can give it a whirl.

Rob Guglielmetti
National Renewable Energy Laboratory (NREL)
Commercial Buildings Research Group
15013 Denver West Parkway MS:RSF202
Golden, CO 80401
303.275.4319<tel:303.275.4319>
robert.guglielmetti@nrel.gov<mailto:robert.guglielmetti@nrel.gov>

On 12/12/12 7:52 AM, "Ji Zhang" <hope.zh@gmail.com<mailto:hope.zh@gmail.com><mailto:hope.zh@gmail.com<mailto:hope.zh@gmail.com>>> wrote:

May I ask if anybody compiled the GenCumulativeSky program created by Darren Robinson for Mac OS?

Darren mentioned that the source code of GenCumulativeSky is written in C++. I assume we can use Xcode to compile it as an executable program for the Mac system. But I don't know how to do it ...

Currently, I have to run GenCumulativeSky in Win7 to generate the sky.cal and SunFile.rad file based on the epw file for a given city and use the 2 files in Mac system with other Radiance program. It's just a little bit inconvenient...

Advices are greatly appreciated!

- Ji

_______________________________________________
Radiance-general mailing list
Radiance-general@radiance-online.org<mailto:Radiance-general@radiance-online.org>
http://www.radiance-online.org/mailman/listinfo/radiance-general

_______________________________________________
Radiance-general mailing list
Radiance-general@radiance-online.org
http://www.radiance-online.org/mailman/listinfo/radiance-general

_______________________________________________
Radiance-general mailing list
Radiance-general@radiance-online.org
http://www.radiance-online.org/mailman/listinfo/radiance-general

Hi Ji,

I was testing GenCumulativeSky.exe to get the* annual "global horizontal
radiation"* for *a single unobstructed upward sensor*.

The results is* *always *SMALLER or LOWER *than the *SUM of the "global
horizontal radiation" column in the epw file*. (For London.epw, up to 2.7%
lower; for Paris.epw, up to 1.73% lower, for Singapore.epw, up to 1.5%
lower ...)

May I ask:
1) Is the difference in this kind of magnitude acceptable?
2) is the difference related to the parameters for rtrace (I assume not, as
the sensor is unobstructed and the scene is empty...)?

I'd say those results are acceptable. You are always going to get small differences depending on the how the skies are normalised and the cumulative map generated. I'm not familiar with GenCumulativeSky, but my own cumulative sky approach usually gets me within 1 or 2% of the column total from the climate file. Anything in that range I wouldn't worry about.

Best
John

John Mardaljevic
Professor of Building Daylight Modelling
School of Civil & Building Engineering
Loughborough University
Loughborough
Leicestershire
LE11 3TU, UK

Tel: +44 1509 222630 (Direct)
Tel: +44 1509 228529 (Pam Allen, secretary)

j.mardaljevic@lboro.ac.uk<mailto:j.mardaljevic@lboro.ac.uk>

http://www.lboro.ac.uk/departments/cv/staff/profile/367.html<http://www.lboro.ac.uk/departments/cv/>

Personal daylighting website:

http://climate-based-daylighting.com<http://climate-based-daylighting.com/>

Hi, John, thanks for your reply!

Is your approach of generating cumulative sky described in your PhD thesis?
I'll go back to read through it.

BTW, I tried to compile GenCumulativeSky on Mac OS (the version modifed by
Prof Christoph Reinhart), and I got some error messages shown below which I
assume are related to C++ programming convention:

cSkyVault.cpp: In member function ‘void
cSkyVault::CalculateSky(cSkyVault::eSunType, bool, bool, double)’:
cSkyVault.cpp:183: warning: deprecated conversion from string constant to
‘char*’
climateFile.cpp: In member function ‘bool
cClimateFile::ReadClimateFile(char*, int, cClimateFile::eClimateFileFormat,
double, double, int, int, int, int)’:
climateFile.cpp:68: warning: format ‘%s’ expects type ‘char*’, but argument
8 has type ‘char (*)[1000]’
climateFile.cpp:68: warning: format ‘%s’ expects type ‘char*’, but argument
8 has type ‘char (*)[1000]’
climateFile.cpp:74: warning: format ‘%s’ expects type ‘char*’, but argument
3 has type ‘char (*)[1000]’
climateFile.cpp:74: warning: format ‘%s’ expects type ‘char*’, but argument
3 has type ‘char (*)[1000]’
gendiscretesky.cpp: In function ‘int main(int, char**)’:
gendiscretesky.cpp:180: warning: format ‘%2.0f’ expects type ‘double’, but
argument 3 has type ‘int’
gendiscretesky.cpp:180: warning: format ‘%2.0f’ expects type ‘double’, but
argument 4 has type ‘int’
gendiscretesky.cpp:180: warning: format ‘%2.0f’ expects type ‘double’, but
argument 5 has type ‘int’
gendiscretesky.cpp:180: warning: format ‘%2.0f’ expects type ‘double’, but
argument 6 has type ‘int’
gendiscretesky.cpp:180: warning: format ‘%2.0f’ expects type ‘double’, but
argument 3 has type ‘int’
gendiscretesky.cpp:180: warning: format ‘%2.0f’ expects type ‘double’, but
argument 4 has type ‘int’
gendiscretesky.cpp:180: warning: format ‘%2.0f’ expects type ‘double’, but
argument 5 has type ‘int’
gendiscretesky.cpp:180: warning: format ‘%2.0f’ expects type ‘double’, but
argument 6 has type ‘int’

Strangely, the compiled one can still be used with all the functions
intact.

So, I'd like to ask:
1) what does the error message mean?
2) will the errors affect the compilation?
3) what should I do to the source code to get rid of these errors?

- Cheers, Ji

···

On Sun, Dec 16, 2012 at 5:54 PM, John Mardaljevic <J.Mardaljevic@lboro.ac.uk > wrote:

Hi Ji,

  I was testing GenCumulativeSky.exe to get the* annual "global horizontal
radiation"* for *a single unobstructed upward sensor*.

The results is* *always *SMALLER or LOWER *than the *SUM of the "global
horizontal radiation" column in the epw file*. (For London.epw, up to 2.7%
lower; for Paris.epw, up to 1.73% lower, for Singapore.epw, up to 1.5%
lower ...)

May I ask:
1) Is the difference in this kind of magnitude acceptable?
2) is the difference related to the parameters for rtrace (I assume not, as
the sensor is unobstructed and the scene is empty...)?

I'd say those results are acceptable. You are always going to get small
differences depending on the how the skies are normalised and the
cumulative map generated. I'm not familiar with GenCumulativeSky, but my
own cumulative sky approach usually gets me within 1 or 2% of the column
total from the climate file. Anything in that range I wouldn't worry about.

Best
John

   John Mardaljevic
Professor of Building Daylight Modelling
School of Civil & Building Engineering
Loughborough University
Loughborough
Leicestershire
LE11 3TU, UK

Tel: +44 1509 222630 (Direct)
Tel: +44 1509 228529 (Pam Allen, secretary)

j.mardaljevic@lboro.ac.uk

http://www.lboro.ac.uk/departments/cv/staff/profile/367.html<http://www.lboro.ac.uk/departments/cv/>

Personal daylighting website:

http://climate-based-daylighting.com

_______________________________________________
Radiance-general mailing list
Radiance-general@radiance-online.org
http://www.radiance-online.org/mailman/listinfo/radiance-general

Hi Ji,

Is your approach of generating cumulative sky described in your PhD thesis?

No, it came a little later -- though the sky model mixing function used is the one in the thesis. Also, the brightdata format used for the cumulative sky is very similar to the one used to get the sky luminance scans into Radiance for the validation.

There's a number of ways that a cumulative sky can be fashioned.

1. Single 'glow' source with associated brightdata file containing the cumulative radiance of the diffuse sky and all the suns, i.e. the sun radiance is 'smeared' over the brightdata patch.

2. A 'glow' source as above, but now only for the cumulative diffuse sky component. Additionally, you must add a number of direct 'light' sources where each one is set to have the cumulative radiance of all the suns that occur in the occupied bins for a gridded distribution in altitude and azimuth. An 8deg bin width for both altitude and azimuth results in about 200 'light' sources depending on the latitude. Now, rather than being smeared, the suns are slightly displaced to the bin-mean alt-azi position.

I use option #2, i.e. 'glow' source for the sky and multiple 'light' sources for all the suns. It's more computationally expensive than #1, however the 'light' sources will get illumination deep into a model (i.e. through windows etc) without having to rely on cranking-up the resolution of the ambient parameters. Both types have their attractions; I don't know which one GenCumulativeSky uses.

The method used in #2 to aggregate the sun radiance is (mostly) described in this paper: J. Mardaljevic and M. Rylatt. Irradiation mapping of complex urban environments: an image-based approach. Energy and Buildings, 35(1):27–35, 1 2003. Send me an email if you have trouble getting hold of it.

Cheers
John

John Mardaljevic
Professor of Building Daylight Modelling
School of Civil & Building Engineering
Loughborough University
Loughborough
Leicestershire
LE11 3TU, UK

Tel: +44 1509 222630 (Direct)
Tel: +44 1509 228529 (Pam Allen, secretary)

j.mardaljevic@lboro.ac.uk<mailto:j.mardaljevic@lboro.ac.uk>
http://www.lboro.ac.uk/departments/cv/staff/profile/367.html<http://www.lboro.ac.uk/departments/cv/>

Personal daylighting website:
http://climate-based-daylighting.com<http://climate-based-daylighting.com/>

Ji

The messages you are seeing are not errors, just warnings. Errors stop the
compiler from creating the binary. In your case the binary is successfully
created.

The warnings seem harmless to me in the given context. So I suppose it's
save to ignore them.

Regards,
Thomas

···

On Sun, Dec 16, 2012 at 5:12 AM, Ji Zhang <hope.zh@gmail.com> wrote:

Hi, John, thanks for your reply!

Is your approach of generating cumulative sky described in your PhD
thesis? I'll go back to read through it.

BTW, I tried to compile GenCumulativeSky on Mac OS (the version modifed by
Prof Christoph Reinhart), and I got some error messages shown below which I
assume are related to C++ programming convention:

cSkyVault.cpp: In member function ‘void
cSkyVault::CalculateSky(cSkyVault::eSunType, bool, bool, double)’:
cSkyVault.cpp:183: warning: deprecated conversion from string constant to
‘char*’
climateFile.cpp: In member function ‘bool
cClimateFile::ReadClimateFile(char*, int, cClimateFile::eClimateFileFormat,
double, double, int, int, int, int)’:
climateFile.cpp:68: warning: format ‘%s’ expects type ‘char*’, but
argument 8 has type ‘char (*)[1000]’
climateFile.cpp:68: warning: format ‘%s’ expects type ‘char*’, but
argument 8 has type ‘char (*)[1000]’
climateFile.cpp:74: warning: format ‘%s’ expects type ‘char*’, but
argument 3 has type ‘char (*)[1000]’
climateFile.cpp:74: warning: format ‘%s’ expects type ‘char*’, but
argument 3 has type ‘char (*)[1000]’
gendiscretesky.cpp: In function ‘int main(int, char**)’:
gendiscretesky.cpp:180: warning: format ‘%2.0f’ expects type ‘double’, but
argument 3 has type ‘int’
gendiscretesky.cpp:180: warning: format ‘%2.0f’ expects type ‘double’, but
argument 4 has type ‘int’
gendiscretesky.cpp:180: warning: format ‘%2.0f’ expects type ‘double’, but
argument 5 has type ‘int’
gendiscretesky.cpp:180: warning: format ‘%2.0f’ expects type ‘double’, but
argument 6 has type ‘int’
gendiscretesky.cpp:180: warning: format ‘%2.0f’ expects type ‘double’, but
argument 3 has type ‘int’
gendiscretesky.cpp:180: warning: format ‘%2.0f’ expects type ‘double’, but
argument 4 has type ‘int’
gendiscretesky.cpp:180: warning: format ‘%2.0f’ expects type ‘double’, but
argument 5 has type ‘int’
gendiscretesky.cpp:180: warning: format ‘%2.0f’ expects type ‘double’, but
argument 6 has type ‘int’

Strangely, the compiled one can still be used with all the functions
intact.

So, I'd like to ask:
1) what does the error message mean?
2) will the errors affect the compilation?
3) what should I do to the source code to get rid of these errors?

- Cheers, Ji

On Sun, Dec 16, 2012 at 5:54 PM, John Mardaljevic < > J.Mardaljevic@lboro.ac.uk> wrote:

Hi Ji,

  I was testing GenCumulativeSky.exe to get the* annual "global
horizontal
radiation"* for *a single unobstructed upward sensor*.

The results is* *always *SMALLER or LOWER *than the *SUM of the "global
horizontal radiation" column in the epw file*. (For London.epw, up to 2.7%
lower; for Paris.epw, up to 1.73% lower, for Singapore.epw, up to 1.5%
lower ...)

May I ask:
1) Is the difference in this kind of magnitude acceptable?
2) is the difference related to the parameters for rtrace (I assume not,
as
the sensor is unobstructed and the scene is empty...)?

I'd say those results are acceptable. You are always going to get small
differences depending on the how the skies are normalised and the
cumulative map generated. I'm not familiar with GenCumulativeSky, but my
own cumulative sky approach usually gets me within 1 or 2% of the column
total from the climate file. Anything in that range I wouldn't worry about.

Best
John

   John Mardaljevic
Professor of Building Daylight Modelling
School of Civil & Building Engineering
Loughborough University
Loughborough
Leicestershire
LE11 3TU, UK

Tel: +44 1509 222630 (Direct)
Tel: +44 1509 228529 (Pam Allen, secretary)

j.mardaljevic@lboro.ac.uk

http://www.lboro.ac.uk/departments/cv/staff/profile/367.html<http://www.lboro.ac.uk/departments/cv/>

Personal daylighting website:

http://climate-based-daylighting.com

_______________________________________________
Radiance-general mailing list
Radiance-general@radiance-online.org
http://www.radiance-online.org/mailman/listinfo/radiance-general

_______________________________________________
Radiance-general mailing list
Radiance-general@radiance-online.org
http://www.radiance-online.org/mailman/listinfo/radiance-general

Thank you very much, John and Thomas!

I've found John's paper, and will read it later.

As far as I know, GenCumulativeSky also has two ways to create cumulative
sky: the smeared sun approach (+s1 option) and the binned sun approach (+s2
option), which might be similar to John's method #1 and #2 respectively
(see its options below, the -r, -p, and -E option were added by the
DIVA/DAYSIM team, I guess).

···

###################################
Usage: GenCumulativeSky [-d] [+s1|+s2] [-a latitude] [-o longitude] [-l]
[-m standard meridian] [-h hour shift] [-G|-B|-E] <climate file>
(Note: longitude +ve East of Greenwich)

        -d Ignore diffuse irradiance
        +s1 Use "smeared sun" approach (default)
        +s2 Use "binned sun" approach
        -l Output luminance instead of radiance
        -r Output radiance/179000 (ensures that units in the Radiance
Image Viewer are in kWhm-2)
        -p Output radiance/1000 (ensures that units in the Radiance
RGB data file are in kWhm-2)
        -G File format is col1=global irradiance (W/m2), col2=diffuse
irradiance (W/m2)
        -B File format is col1=direct horizontal irradiance (W/m2),
col2=diffuse irradiance (W/m2)
        -E File format is an energyplus weather file (*.epw) The
gprogram uses the global irradiance (W/m2) and diffuse irradiance (W/m2)
data columns.
                In combination with '-E' the considered time interval can
be specified:
                -time <start time of day> <end time of day>
                -date mm_start dd_start mm_end dd_end (if start-date after
end-date then the winter interval is considered)
####################################

- Cheers, Ji

On Mon, Dec 17, 2012 at 1:32 AM, John Mardaljevic <J.Mardaljevic@lboro.ac.uk > wrote:

Hi Ji,

  Is your approach of generating cumulative sky described in your PhD
thesis?

No, it came a little later -- though the sky model mixing function used
is the one in the thesis. Also, the brightdata format used for the
cumulative sky is very similar to the one used to get the sky luminance
scans into Radiance for the validation.

There's a number of ways that a cumulative sky can be fashioned.

1. Single 'glow' source with associated brightdata file containing the
cumulative radiance of the diffuse sky and all the suns, i.e. the sun
radiance is 'smeared' over the brightdata patch.

2. A 'glow' source as above, but now only for the cumulative diffuse sky
component. Additionally, you must add a number of direct 'light' sources
where each one is set to have the cumulative radiance of all the suns that
occur in the occupied bins for a gridded distribution in altitude and
azimuth. An 8deg bin width for both altitude and azimuth results in about
200 'light' sources depending on the latitude. Now, rather than being
smeared, the suns are slightly displaced to the bin-mean alt-azi position.

I use option #2, i.e. 'glow' source for the sky and multiple 'light'
sources for all the suns. It's more computationally expensive than #1,
however the 'light' sources will get illumination deep into a model (i.e.
through windows etc) without having to rely on cranking-up the resolution
of the ambient parameters. Both types have their attractions; I don't know
which one GenCumulativeSky uses.

The method used in #2 to aggregate the sun radiance is (mostly)
described in this paper: J. Mardaljevic and M. Rylatt. Irradiation mapping
of complex urban environments: an image-based approach. Energy and
Buildings, 35(1):27–35, 1 2003. Send me an email if you have trouble
getting hold of it.

Cheers
John

   John Mardaljevic
Professor of Building Daylight Modelling
School of Civil & Building Engineering
Loughborough University
Loughborough
Leicestershire
LE11 3TU, UK

Tel: +44 1509 222630 (Direct)
Tel: +44 1509 228529 (Pam Allen, secretary)

j.mardaljevic@lboro.ac.uk
http://www.lboro.ac.uk/departments/cv/staff/profile/367.html<http://www.lboro.ac.uk/departments/cv/>

Personal daylighting website:
http://climate-based-daylighting.com

_______________________________________________
Radiance-general mailing list
Radiance-general@radiance-online.org
http://www.radiance-online.org/mailman/listinfo/radiance-general

Yes, we added these options later to Darren's code so that the program becomes more usable. We have done a bit a 'validation' work of the tool as documented here: http://www.ibpsa.org/proceedings/BS2011/P_1813.pdf

Best,

Christoph

···

From: Ji Zhang [mailto:hope.zh@gmail.com]
Sent: Tuesday, December 18, 2012 3:05 AM
To: Radiance general discussion
Subject: Re: [Radiance-general] GenCumulativeSky compiled for Mac?

Thank you very much, John and Thomas!

I've found John's paper, and will read it later.

As far as I know, GenCumulativeSky also has two ways to create cumulative sky: the smeared sun approach (+s1 option) and the binned sun approach (+s2 option), which might be similar to John's method #1 and #2 respectively (see its options below, the -r, -p, and -E option were added by the DIVA/DAYSIM team, I guess).

###################################
Usage: GenCumulativeSky [-d] [+s1|+s2] [-a latitude] [-o longitude] [-l] [-m standard meridian] [-h hour shift] [-G|-B|-E] <climate file>
(Note: longitude +ve East of Greenwich)

        -d Ignore diffuse irradiance
        +s1 Use "smeared sun" approach (default)
        +s2 Use "binned sun" approach
        -l Output luminance instead of radiance
        -r Output radiance/179000 (ensures that units in the Radiance Image Viewer are in kWhm-2)
        -p Output radiance/1000 (ensures that units in the Radiance RGB data file are in kWhm-2)
        -G File format is col1=global irradiance (W/m2), col2=diffuse irradiance (W/m2)
        -B File format is col1=direct horizontal irradiance (W/m2), col2=diffuse irradiance (W/m2)
        -E File format is an energyplus weather file (*.epw) The gprogram uses the global irradiance (W/m2) and diffuse irradiance (W/m2) data columns.
                In combination with '-E' the considered time interval can be specified:
                -time <start time of day> <end time of day>
                -date mm_start dd_start mm_end dd_end (if start-date after end-date then the winter interval is considered)
####################################

- Cheers, Ji

On Mon, Dec 17, 2012 at 1:32 AM, John Mardaljevic <J.Mardaljevic@lboro.ac.uk<mailto:J.Mardaljevic@lboro.ac.uk>> wrote:
Hi Ji,

Is your approach of generating cumulative sky described in your PhD thesis?

No, it came a little later -- though the sky model mixing function used is the one in the thesis. Also, the brightdata format used for the cumulative sky is very similar to the one used to get the sky luminance scans into Radiance for the validation.

There's a number of ways that a cumulative sky can be fashioned.

1. Single 'glow' source with associated brightdata file containing the cumulative radiance of the diffuse sky and all the suns, i.e. the sun radiance is 'smeared' over the brightdata patch.

2. A 'glow' source as above, but now only for the cumulative diffuse sky component. Additionally, you must add a number of direct 'light' sources where each one is set to have the cumulative radiance of all the suns that occur in the occupied bins for a gridded distribution in altitude and azimuth. An 8deg bin width for both altitude and azimuth results in about 200 'light' sources depending on the latitude. Now, rather than being smeared, the suns are slightly displaced to the bin-mean alt-azi position.

I use option #2, i.e. 'glow' source for the sky and multiple 'light' sources for all the suns. It's more computationally expensive than #1, however the 'light' sources will get illumination deep into a model (i.e. through windows etc) without having to rely on cranking-up the resolution of the ambient parameters. Both types have their attractions; I don't know which one GenCumulativeSky uses.

The method used in #2 to aggregate the sun radiance is (mostly) described in this paper: J. Mardaljevic and M. Rylatt. Irradiation mapping of complex urban environments: an image-based approach. Energy and Buildings, 35(1):27-35, 1 2003. Send me an email if you have trouble getting hold of it.

Cheers
John

John Mardaljevic
Professor of Building Daylight Modelling
School of Civil & Building Engineering
Loughborough University
Loughborough
Leicestershire
LE11 3TU, UK

Tel: +44 1509 222630<tel:%2B44%201509%20222630> (Direct)
Tel: +44 1509 228529<tel:%2B44%201509%20228529> (Pam Allen, secretary)

j.mardaljevic@lboro.ac.uk<mailto:j.mardaljevic@lboro.ac.uk>
http://www.lboro.ac.uk/departments/cv/staff/profile/367.html<http://www.lboro.ac.uk/departments/cv/>

Personal daylighting website:
http://climate-based-daylighting.com<http://climate-based-daylighting.com/>

_______________________________________________
Radiance-general mailing list
Radiance-general@radiance-online.org<mailto:Radiance-general@radiance-online.org>
http://www.radiance-online.org/mailman/listinfo/radiance-general