[Radiance-general] Annual illuminance simulation anomaly

David Smith dbs176 at gmail.com
Tue Mar 2 16:05:40 PST 2010


Dear Radiance gurus,

First, thank you all very much for your help and suggestions. I also
should have mentioned that I initially turned to Daysim, but it was
having trouble with the geometry, and the only way to get the geometry
to compile was to use meshes.

I guess I have two actual questions out of all of this:
A. If I wanted to get a Radiance scene description that would [best]
match the climate, what are the best data to use as inputs?
B. Is gendaylit a prudent way forward instead of gensky CIE skies for
this climate? What about other climates?

So, keeping those in mind, let's see if I can address some other
people's questions:
1. I double checked everything and am quite certain I was picking the
right columns (see test code below email).
2. As far as Greg's thought about basically having a large intensity
to generate high enough horizontal illuminance values, shouldn't that
be the case in the morning as well?
3. I had never used gendaylit before, but gave that a chance. I'm
unsure how to catch errors on the output though, so I ended up
ignoring the errors (script assumes illuminance is 0 and outputs that
instead).
4. I also ran an empty Daysim scene using the same weather file (60
minute step) with a sensor point at 0 0 0 in direction 0 0 1. I pulled
in the .ill file to the mix to compare it to the rest as well.
5. The vector to the sun is parsed out of gensky output, I assume that
it is very similar to the gendaylit vector, but I didn't check.

I ended up running the test loop over again with these additional bits
of information as well as plotting the actual information within the
weather file.

I've posted a chart of the June hourly averages for Abu Dhabi here:
http://i47.tinypic.com/2r7a98m.png

Some thoughts:
+ I have a lot of confidence in the Daysim and gendaylit outputs that
seem to follow each other and other lines' trends.
+ I haven't looked at the Radmap code to see how it handles the
information, and I'm only part way through wrapping my head around
some of the annual simulation readings that were recently introduced
to the list.
+ I've read the ASHRAE papers on how the weather files were made. It's
like making laws or sausages - best not to look behind the scenes if
you want to appreciate them.

Any further insight is appreciated. Again, thank you.

Cheers,

--Dave



============ Python code snippet =============

# Important: Python is white-space sensitive, your (or my) mail
program may have fiddled with line breaks and the white-space

# Super simple unzipping of an epw file (comma separated values) into
an indexed dictionary
# Posted to Radiance general mailing list 20100302

import os

# define the files
path = "/home/dave/rad/test_annual"
epwfile = "abu.epw"

# define all the fields
data_types = "year,month,day,hour,minute,uncertainty,dry_bulb,dew_point,relative_humidity,pressure,extraterrestrial_horizontal_radiation,extraterrestrial_direct_normal_radiation,horizontal_ir_radiation,global_horizontal_radiation,direct_normal_radiation,diffuse_horizontal_radiation,global_horizontal_illuminance,direct_normal_illuminance,diffuse_horizontal_illuminance,zenith_luminance,wind_direction,wind_speed,total_sky_cover,opaque_sky_cover,visibility,ceiling,weather_observation,weather_codes,precipitation,aerosol_optical_depth,snow_depth,days_since_last_snowfall"

# get data from the weather file
os.chdir(path)
handle = open(path+os.sep+epwfile,"r")
raw = handle.read()
handle.close()
lines = raw.splitlines()

# figure out the average number of columns in each line, it's going to
be really close to the lengths of the data lines
counter = 0
tally = 0
for line in lines:
    counter+=1
    wxarray = line.split(',')
    tally+=len(wxarray)
linelength = int(round(1.0*tally/counter))

# try getting data out
for line in lines:
    if len(line.split(','))==linelength:
        wxarray = dict(map(None,data_types.split(','),line.split(',')))
        m = str(int(wxarray["month"]))
        d = str(int(wxarray["day"]))
        h = str(int(wxarray["hour"]))
        direct = str(int(wxarray["direct_normal_radiation"]))
        diffuse = str(int(wxarray["diffuse_horizontal_radiation"]))

        print m,d,h,direct,diffuse



More information about the Radiance-general mailing list