Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit f46571f
Merge: 77f4d33 d847937
Author: cdeline <chris.deline@nrel.gov>
Date:   Tue Dec 10 14:25:27 2019 -0700

    Merge pull request #199 from NREL/master-JOSS

    Modifications to address documentation suggestions by JOSS reviewers

commit d847937
Author: cdeline <chris.deline@nrel.gov>
Date:   Tue Dec 10 14:18:06 2019 -0700

    Revert "Removed deprecated nMods and nRows inputs and warning to makeScene1axis"

    This reverts commit c2386c8.

commit 1df9d2d
Merge: 6338954 9047fdf
Author: cdeline <chris.deline@nrel.gov>
Date:   Tue Dec 10 14:06:50 2019 -0700

    Merge branch 'master-JOSS' of https://github.com/NREL/bifacial_radiance into master-JOSS

commit 6338954
Author: cdeline <chris.deline@nrel.gov>
Date:   Tue Dec 10 14:06:41 2019 -0700

    remove extraneous tutorial1 .py file

commit 9047fdf
Author: Silvana Ayala <silvana.ayala@nrel.gov>
Date:   Fri Dec 6 22:13:57 2019 -0700

    update installation.rst

commit 8c0f63e
Author: Silvana Ayala <silvana.ayala@nrel.gov>
Date:   Fri Dec 6 21:56:35 2019 -0700

    installation PR fix

commit 7a9000a
Author: Silvana Ayala <silvana.ayala@nrel.gov>
Date:   Fri Dec 6 08:23:13 2019 -0700

    journal2 path fix #217

commit b090a15
Author: Silvana Ayala <silvana.ayala@nrel.gov>
Date:   Fri Dec 6 07:32:06 2019 -0700

    small fix #217

    Just journal 1 atm, testing it.

commit d360efa
Author: Ayala <sayala@nrel.gov>
Date:   Thu Dec 5 13:35:36 2019 -0700

    package overview #191

    Added text and images to package overview. Also added link to Webinar tutorial as the package is very well explained there with animations

commit 3ee75cd
Author: Ayala <sayala@nrel.gov>
Date:   Thu Dec 5 12:37:30 2019 -0700

    Update installation.rst

    Addresses various comments on PR #199

commit af43110
Author: Ayala <sayala@nrel.gov>
Date:   Thu Dec 5 12:08:56 2019 -0700

    platform and python version updates #198

    updated paper, instead of adding the installer, for the moment. Created a issue-wishlist to add other platforms at a later time (#214)

commit 2cc760e
Author: Ayala <sayala@nrel.gov>
Date:   Thu Dec 5 12:01:01 2019 -0700

    improvements to contributing #196

commit f5ebf9e
Author: Ayala <sayala@nrel.gov>
Date:   Thu Dec 5 11:40:24 2019 -0700

    added citations paper.md #197 #193

    Added citations pvlib, pvfactors, pvsyst and sam citations

commit 04db364
Merge: ea8e752 77f4d33
Author: Silvana Ayala <silvana.ayala@nrel.gov>
Date:   Thu Dec 5 10:47:48 2019 -0700

    Merge branch 'master' into master-JOSS

commit ea8e752
Author: Ayala <sayala@nrel.gov>
Date:   Thu Dec 5 10:41:21 2019 -0700

    pytest otherfix and notes

commit 77f4d33
Author: Silvana Ayala <silvana.ayala@nrel.gov>
Date:   Thu Dec 5 10:38:14 2019 -0700

    citation on readme update #213

commit 9818770
Author: Ayala <sayala@nrel.gov>
Date:   Thu Dec 5 10:36:57 2019 -0700

    update main citation #213

    It's updated on JOSS but since not sure when we're merging, updating here.

commit a452fd2
Author: Ayala <sayala@nrel.gov>
Date:   Thu Dec 5 10:33:25 2019 -0700

    update to DOE citation #213

    update to main DOE citation -- modified 11/18.

commit fe3923f
Author: Ayala <sayala@nrel.gov>
Date:   Thu Dec 5 10:24:50 2019 -0700

    dumb dumb fix

commit 27f4ef8
Author: Ayala <sayala@nrel.gov>
Date:   Thu Dec 5 10:17:53 2019 -0700

    pytest smallfix

    asserting file names varies between my computer and online due to skies/skyblablah or skies\\skyblablah so changed the assertion to just 'skies'

commit c2386c8
Author: Silvana Ayala <silvana.ayala@nrel.gov>
Date:   Wed Nov 27 16:31:10 2019 -0700

    Removed deprecated nMods and nRows inputs and warning to makeScene1axis

    Deprecation warning on makeScene1axis has been there for a long time. Time to remove it. Addresses #208 for next release.

commit c5cafa0
Author: Silvana Ayala <silvana.ayala@nrel.gov>
Date:   Wed Nov 27 16:28:20 2019 -0700

    pytest getSingleTimestampTrackerAngle

commit e0af625
Author: Silvana Ayala <silvana.ayala@nrel.gov>
Date:   Wed Nov 27 16:01:47 2019 -0700

    added small pytests

    added pytests for exportTrackerDict(),
    and makeModule() (empty input),
    and added hpc=True on makeOct and makeImage to go over those lines as well.

commit 98932d3
Author: Silvana Ayala <silvana.ayala@nrel.gov>
Date:   Wed Nov 27 15:35:16 2019 -0700

    pytest sceneDict HEIGHT options on makeScene1axis

    added some validations for various height input options. it'd be awesome if we deprecated all of this options and just made it obligatory to use hub_height and clearance_height,... it would trim many dumb lines of code and warnings.

commit 2f05732
Author: Silvana Ayala <silvana.ayala@nrel.gov>
Date:   Wed Nov 27 15:27:01 2019 -0700

    add test for makeImage and makeFalseColor, small fix gendaylit2manual test

commit a039529
Author: Silvana Ayala <silvana.ayala@nrel.gov>
Date:   Wed Nov 27 15:13:41 2019 -0700

    pytest gendaylit2manual, small fix test_1axis_genCumSky()

    added gendaylit2manual test

    small fix test_1axis_genCumSky(): I removed the ygap of the makeModule so the assertion didn't work. Added it back

commit 9d1c6fa
Author: Silvana Ayala <silvana.ayala@nrel.gov>
Date:   Wed Nov 27 15:04:01 2019 -0700

    pytest Torquetubes smallfix

    assertion was too long for Python 2.7, so reduced it :)

commit 08a579e
Author: Silvana Ayala <silvana.ayala@nrel.gov>
Date:   Wed Nov 27 14:59:32 2019 -0700

    makeSCene1axis test for sceneDict with Pitch and with GCR (#204 test)

    pytest improvement, doesn't solve but helps identify if #204 is addressed.

commit 1252917
Author: Silvana Ayala <silvana.ayala@nrel.gov>
Date:   Wed Nov 27 14:45:42 2019 -0700

    added test_1axis_gencumSky()

    Improves coverage by another 1% :D now at 68%

commit f2297f2
Author: Silvana Ayala <silvana.ayala@nrel.gov>
Date:   Wed Nov 27 14:19:41 2019 -0700

    pytest TorqueTubes on Modules

    Improves coverage by 2%, by making different modules with torquetubes of diff. shapes. Ta-da :D

commit 856049c
Author: Silvana Ayala <silvana.ayala@nrel.gov>
Date:   Wed Nov 27 14:05:52 2019 -0700

    quickExample fix #201 and pytest

    adding testfolder optional input to quickExample() so it can be used in the pytest, and also returning analysis so it can be used in the pytest. Also calls now the interative directory from main.py instead of re-defining it inside.
    Solves #201

    Added pytest

commit bedea2a
Author: Silvana Ayala <silvana.ayala@nrel.gov>
Date:   Wed Nov 27 13:08:31 2019 -0700

    remove HPCExample from main.py, add HPCExample Tutorial Notebook

    remove HPCExample from main.py, add HPCExample Tutorial Notebook.
    It was not working as an internal function nayways it was mostly for demonstration. Now as a journal it almost does stuff... still need to debug why it's not going into runJob().
    Improves coverage by 2% (now at 64!)

commit 76c2767
Author: Silvana Ayala <silvana.ayala@nrel.gov>
Date:   Wed Nov 27 11:46:52 2019 -0700

    pytest  getEPW

    added test for lines 424-495 (71 continuous lines) for getEPW. 2% improvement in coverage of Main (at 62% now.

commit cd709aa
Author: cdeline <chris.deline@nrel.gov>
Date:   Tue Nov 19 09:53:28 2019 -0700

    move make_gencumsky directions into optional note.

commit f21b502
Author: cdeline <chris.deline@nrel.gov>
Date:   Tue Nov 19 09:43:07 2019 -0700

    update Linux installation and make_gencumsky note.

commit c0334b1
Author: Silvana Ayala <silvana.ayala@nrel.gov>
Date:   Tue Nov 19 09:20:40 2019 -0700

    Addressing #194

    Addresing #194 Jupyter dependency:
    -Mentioned on installation, that it is suggested to install the latest Anaconda to also get Jupyter for use with the tutorials.
    -Added the code snippet to setup.py

commit 8b7c683
Author: Silvana Ayala <silvana.ayala@nrel.gov>
Date:   Tue Nov 19 09:00:12 2019 -0700

    Addresses #192, #193

    Addressing #192 Intended Audience:
    -Modified index page of documentation to include intended audience
    -Modified paper.md to include intended audience.

    Addressing #193 State of hte Field:
    -Added state of hte field description, with tools comparable to bifacial_radiance and agreement in paper.md
    -Still need to address pvfactors and pvlib mention and references.

commit 3fe059c
Author: Silvana Ayala <silvana.ayala@nrel.gov>
Date:   Tue Nov 19 08:55:25 2019 -0700

    Addressing #190

    Improvement of installation instructions #190:
    -Mention of pip install option
    -Added section dedicated to compatibility -- linux based systems OK
    -Step 2 on install mentiosn how to install for Linux/Mac OSX steps.
    -Step 3 phrasing on 'Scene' was modified/expanded for clarity.
    -Youtube's description now includes updates to mention how to pip install bifacial_radiance, pip install pvlib, and comments for Linux/Mac OSX users to read the install guide on readthedocs.

commit e5aa985
Merge: 5274425 0865425
Author: Silvana Ayala <silvana.ayala@nrel.gov>
Date:   Tue Nov 19 08:23:33 2019 -0700

    Merge branch 'master' of https://github.com/NREL/bifacial_radiance

commit 5274425
Author: Silvana Ayala <silvana.ayala@nrel.gov>
Date:   Tue Nov 19 08:23:26 2019 -0700

    Journal 8 small date change ~

    Modified end date of data query to one day after, otherwise it got an empty array.

commit 0865425
Author: cdeline <chris.deline@nrel.gov>
Date:   Mon Nov 18 13:02:42 2019 -0700

    Standard BSD-3, remove special notice.
  • Loading branch information
cdeline committed Dec 10, 2019
1 parent f3bd03a commit 9a2907c
Show file tree
Hide file tree
Showing 21 changed files with 1,132 additions and 486 deletions.
9 changes: 1 addition & 8 deletions LICENSE
@@ -1,13 +1,6 @@
BSD 3-Clause License

Copyright 2017 Alliance for Sustainable Energy, LLC

NOTICE: This software was developed at least in part by Alliance for Sustainable
Energy, LLC (“Alliance”) under Contract No. DE-AC36-08GO28308 with the U.S.
Department of Energy and the U.S. Government retains for itself and others acting
on its behalf a nonexclusive, paid-up, irrevocable worldwide license in the software
to reproduce, prepare derivative works, distribute copies to the public, perform
publicly and display publicly, and to permit others to do so.
Copyright 2017-2019 Alliance for Sustainable Energy, LLC

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Expand Down
5 changes: 2 additions & 3 deletions README.md
Expand Up @@ -67,9 +67,8 @@ community. We also make new version announcements on the google group.

If you use bifacial_radiance in a published work, please cite:

Deline, Chris, Marion, William, and Ayala, Silvana. Bifacial_Radiance.
Computer Software. https://github.com/NREL/bifacial_radiance.
17 Dec. 2017. Web. doi:10.11578/dc.20180530.16. https://www.osti.gov/doecode/biblio/6869
Deline, Chris, and Ayala, Silvana. Bifacial_Radiance. Computer Software. https://github.com/NREL/bifacial_radiance. USDOE Office of Energy Efficiency and Renewable Energy (EERE), Solar Energy Technologies Office (EE-4S). 17 Dec. 2017.
Web. doi:10.11578/dc.20180530.16. https://www.osti.gov/doecode/biblio/6869


Additional bifacial_radiance publications with validation of the software include:
Expand Down
125 changes: 6 additions & 119 deletions bifacial_radiance/main.py
Expand Up @@ -3665,131 +3665,18 @@ def runJob(daydate):
modWanted=modWanted,
rowWanted=rowWanted,
sensorsy=sensorsy)

def hpcExample():
"""
Example of HPC Job call
This allocates the day_dates generated to the different codes in as many nodes are available.
Works inside and outside of slurm for testing (but set FullYear to False so it only does two days)
Full year takes 1 min in 11 Nodes.
Variables stored in input_bf.py. First configure this on top:
.. code-block :: python
if __name__ == "__main__": #in case this is run as a script not a module.
from readepw import readepw
from load import loadTrackerDict
from input_bf import *
else: # module imported or loaded normally
from bifacial_radiance.readepw import readepw # epw file reader from pvlib development forums #module load format
from bifacial_radiance.load import loadTrackerDict
from bifacial_radiance.input_bf import *
Procedure for a Full Year Run (~1 min in 11 nodes of 36 cores each > 365 days):
.. code-block :: python
Connect to Eagle
- $ cd bifacial_radiance/bifacial_radiance
- $ srun -A pvsoiling -t 5 -N 11 --pty bash
- $ module load conda
- $ . activate py3
- $ srun bifacial_radiance2.py
Procedure for testing before joining SLURM:

.. code-block :: python
change fullYear to False.
- $ cd bifacial_radiance/bifacial_radiance
- $ module load conda
- $ . activate py3
- $ nano bifacial_radiance.py
- $ python bifacial_radiance2.py
.. warning::
Do not load conda twice nor activate .py3 twice.
(following above) Either activate conda or .py3 in the login node
or on the slurm
"""

import multiprocessing as mp

daylist = []

fullYear = True # running faster testing on HPC ~ only 2 days.

if fullYear:
start = datetime.datetime.strptime("01-01-2014", "%d-%m-%Y")
end = datetime.datetime.strptime("31-12-2014", "%d-%m-%Y") # 2014 not a leap year.
daylist.append('12_31') # loop doesn't add last day. Adding it at the beginning because why not.
daylimit = 365
else:
start = datetime.datetime.strptime("14-02-2014", "%d-%m-%Y")
end = datetime.datetime.strptime("26-02-2014", "%d-%m-%Y") # 2014 not a leap year.
daylimit = 1
date_generated = [start + datetime.timedelta(days=x) for x in range(0, (end-start).days)]
for date in date_generated:
daylist.append(date.strftime("%m_%d"))

# print("This is daydate %s" % (daydate))
demo = RadianceObj(simulationname,path=testfolder)
demo.setGround(albedo)
# HPC IMPORTANT NOTE:
# Multiple Nodes get confused when trying to write the JSON at the same time,
# so make sure moduletype is created before running slurm job for it to work.
# 2 DO: Fix at some point of course.
# moduleDict=demo.makeModule(name=moduletype,x=x,y=y,bifi=bifi,
# torquetube=torqueTube, diameter = diameter, tubetype = tubetype,
# material = torqueTubeMaterial, zgap = zgap, numpanels = numpanels, ygap = ygap,
# rewriteModulefile = True, xgap=xgap,
# axisofrotationTorqueTube=axisofrotationTorqueTube, cellLevelModule=cellLevelModule,
# numcellsx=numcellsx, numcellsy = numcellsy)
sceneDict = {'module_type':moduletype, 'pitch': pitch, 'hub_height':hub_height, 'nMods':nMods, 'nRows':nRows}

cores = mp.cpu_count()
pool = mp.Pool(processes=cores)
res = None

try:
nodeID = int(os.environ['SLURM_NODEID'])
except KeyError:
nodeID = 0 # in case testing for hpc not on slurm yet.

hpccores = 36 # this is valid for Eagle. Find out how many cores are in each node of your HPC to make this work.

day_index = (hpccores * (nodeID))

for job in range(cores):
if day_index+job>=len(daylist): # this makes sure no days above 356 are attempted:
break
pool.apply_async(runJob, (daylist[day_index+job],))

pool.close()
pool.join()
pool.terminate()

def quickExample():
def quickExample(testfolder=None):
"""
Example of how to run a Radiance routine for a simple rooftop bifacial system
"""
def _interactive_directory(title=None):
# Tkinter directory picker. Now Py3.6 compliant!
import tkinter
from tkinter import filedialog
root = tkinter.Tk()
root.withdraw() #Start interactive file input
root.attributes("-topmost", True) #Bring to front
return filedialog.askdirectory(parent=root, title=title)

import bifacial_radiance
testfolder = _interactive_directory(title = 'Select or create an empty directory for the Radiance tree')
# testfolder = r'C:\Users\sayala\Documents\RadianceScenes\Demo3'

if testfolder == None:
testfolder = bifacial_radiance.main._interactive_directory(title = 'Select or create an empty directory for the Radiance tree')

demo = bifacial_radiance.RadianceObj('simple_panel',path = testfolder) # Create a RadianceObj 'object'

# A=load_inputvariablesfile()
Expand Down Expand Up @@ -3830,4 +3717,4 @@ def _interactive_directory(title=None):
print('Annual bifacial ratio average: %0.3f' %(
sum(analysis.Wm2Back) / sum(analysis.Wm2Front) ) )


return analysis
Binary file added docs/images_wiki/Webinar/mainsteps.PNG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images_wiki/Webinar/wrapper.PNG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions docs/sphinx/source/conf.py
Expand Up @@ -192,10 +192,9 @@ def setup(app):
#latex_domain_indices = True
"""
# extlinks alias
extlinks = {'issue': ('https://github.com/NREL/bifacial_radiance/issues/%s',
'GH'),
'wiki': ('https://github.com/NREL/bifacial_radiance/wiki/%s',
'wiki '),
extlinks = {'issue': ('https://github.com/NREL/bifacial_radiance/issues/%s', 'GH'),
'pull': ('https://github.com/NREL/bifacial_radiance/pull/%s', 'GH'),
'wiki': ('https://github.com/NREL/bifacial_radiance/wiki/%s', 'wiki '),
'doi': ('http://dx.doi.org/%s', 'DOI: '),
'ghuser': ('https://github.com/%s', '@')}
"""
Expand Down
35 changes: 21 additions & 14 deletions docs/sphinx/source/contributing.rst
Expand Up @@ -199,9 +199,9 @@ style.

Remove any ``logging`` calls and ``print`` statements that you added
during development. ``warning`` is ok.


We typically use GitHub's
"`squash and merge` <https://help.github.com/articles/about-pull-request-merges/#squash-and-merge-your-pull-request-commits>_"
"`squash and merge <https://help.github.com/articles/about-pull-request-merges/#squash-and-merge-your-pull-request-commits>`_"
feature to merge your pull request into bifacial_radiance. GitHub will condense the
commit history of your branch into a single commit when merging into
bifacial_radiance/master (the commit history on your branch remains
Expand Down Expand Up @@ -231,17 +231,30 @@ specific types may be used:

Parameters that specify a specific type require that specific input type.

A relatively easy way to test your documentation is to build it on
`readthedocs.org <https://readthedocs.org>` by following their
`Import Your Docs <http://docs.readthedocs.io/en/stable/getting_started.html#import-your-docs>`_
instructions and enabling your branch on the readthedocs
`versions admin page <http://docs.readthedocs.io/en/stable/features.html#versions>`_.
Read the Docs will automatically build the documentation for each pull
request. Please confirm the documentation renders correctly by following
the ``continuous-documentation/read-the-docs`` link within the checks
status box at the bottom of the pull request.

To build the docs locally, install the ``doc`` dependencies specified in the
`setup.py <https://github.com/NREL/bifacial_radiance/blob/master/setup.py>`_
file. See :ref:`installation` instructions for more information.

.. _testing:

Testing
~~~~~~~

Developers **must** include comprehensive tests for any additions or
modifications to bifacial_radiance. New unit test code should be placed in the corresponding test module in the bifacial_radiance/test directory.

A pull request will automatically run the tests for you on Linux platform and python versions 2.7 and 3.6. However, it is typically more efficient to run and debug the tests in your own local
environment.

To run the tests locally, install the ``test`` dependencies specified in the
`setup.py <https://github.com/NREL/bifacial_radiance/blob/master/setup.py>`_
file. See :ref:`installation` instructions for more information.i

bifacial_radiance's unit tests can easily be run by executing ``pytest`` on the
bifacial_radiance directory:

Expand All @@ -257,7 +270,7 @@ or, for a single test:

We suggest using pytest's ``--pdb`` flag to debug test failures rather
than using ``print`` or ``logging`` calls. For example:


``pytest bifacial_radiance/test/modelchain.py --pdb``

will drop you into the
Expand All @@ -266,12 +279,6 @@ location of a test failure. As described in :ref:`code-style`, bifacial_radiance
code does not use ``print`` or ``logging`` calls, and this also applies
to the test suite (with rare exceptions).

New unit test code should be placed in the corresponding test module in
the bifacial_radiance/test directory.

Developers **must** include comprehensive tests for any additions or
modifications to bifacial_radiance.

This documentation
~~~~~~~~~~~~~~~~~~

Expand Down
7 changes: 4 additions & 3 deletions docs/sphinx/source/index.rst
Expand Up @@ -6,12 +6,14 @@ Welcome to bifacial_radiance's documentation!

bifacial_radiance is a NREL supported tool that provides a set of functions and classes for simulating the performance of bifacial PV systems. More information on bifacial_radiance can be found at the Wiki page.

The intended audience ranges from PV performance researchers, Engineering Procurement Construction (EPC) companies, installers, investors, consumers and analysts of the PV industry interested in predicting and evaluating bifacial photovoltaic systems.

The source code for bifacial_radiance is hosted on `github
<https://github.com/NREL/bifacial_radiance>`_.

Please see the :ref:`installation` page for installation help.

For examples on how to use bifacial_radiance, please see :ref:`package_overview` and our `Jupyter Notebook tutorials
For examples on how to use bifacial_radiance, please see our `Webinar tutorial video <https://www.youtube.com/watch?v=1X9L-R-RVGA>`_. Also find more information on :ref:`package_overview` and our `Jupyter Notebook tutorials
<http://github.com/Nrel/bifacial_radiance/docs/tutorials/>`_. The documentation assumes general familiarity with Python, NumPy, and Pandas. Google searches will yield many excellent tutorials for these packages.

The bifacial_radiance GitHub wiki has a `Projects and publications that use bifacial_radiance <https://github.com/NREL/bifacial_radiance/wiki/>`_ page for inspiration and listing of your application.
Expand All @@ -26,8 +28,7 @@ Many of the contributors to bifacial_radiance work in institutions where
citation metrics are used in performance or career evaluations. If you
use bifacial_radiance in a published work, please cite:

Deline, Chris, Marion, William, and Ayala Pelaez, Silvana. Bifacial_Radiance. Computer Software. https://github.com/NREL/bifacial_radiance. California Energy Commission. 17 Dec. 2017. Web. doi:10.11578/dc.20180530.16.
https://www.osti.gov/doecode/biblio/6869
Deline, Chris, and Ayala, Silvana. Bifacial_Radiance. Computer Software. https://github.com/NREL/bifacial_radiance. USDOE Office of Energy Efficiency and Renewable Energy (EERE), Solar Energy Technologies Office (EE-4S). 17 Dec. 2017. Web. doi:10.11578/dc.20180530.16. https://www.osti.gov/doecode/biblio/6869

Please also cite the DOI corresponding to the specific version of
bifacial_radiance that you used. bifacial_radiance DOIs are listed at
Expand Down
59 changes: 48 additions & 11 deletions docs/sphinx/source/installation.rst
Expand Up @@ -3,10 +3,16 @@
Installation
============

Compatibility
~~~~~~~~~~~~~

bifacial_radiance is coded and tested in Windows, but can also work on Linux and Mac OSX, particularly after improvements in the latest release :ref:`whatsnew_0302` which solved some of the binary issues for gencumsky. However, the functionalities in Linux are still being improved, for example the GUI requires special QT installation described in (:issue:`130`:).


Video Instructions
~~~~~~~~~~~~~~~~~~

`https://youtu.be/4A9GocfHKyM <https://youtu.be/4A9GocfHKyM>`_ This video shows how to install the bifacial_radiance software and all associated softwares needed. More info on the Wiki. Instructions are also shown below.
`https://youtu.be/4A9GocfHKyM <https://youtu.be/4A9GocfHKyM>`_ This video shows how to install the bifacial_radiance software and all associated softwares needed for Windows. More info on the Wiki. Instructions for Windows and Linux-based OS are also shown below.


PREREQUISITES (Step 0)
Expand All @@ -15,13 +21,38 @@ This software requires the previous installation of ``RADIANCE`` from https://gi

Make sure you add radiance to the system PATH so Python can interact with the radiance program

If you are on a PC you should also copy the `Jaloxa radwinexe-5.0.a.8-win64.zip <http://www.jaloxa.eu/resources/radiance/radwinexe.shtml>`_ executables into ``program files/radiance/bin``
Windows:

If you are on a Windows computer you should also copy the `Jaloxa radwinexe-5.0.a.8-win64.zip <http://www.jaloxa.eu/resources/radiance/radwinexe.shtml>`_ executables into ``program files/radiance/bin``. This executables allow for some nifty visualization options of your generated scene inside of bifacial_radiance, like falsecolor images.

Linux/Mac OSX:

* For Linux/Mac OSX, you will need to install QT for the GUI to work properly. Installation and details described in (:issue:`131`:):
1. Install ``qt5-default`` from Ubuntu using ``apt``,
2. get the official Radiance 5.2 source tarball with auxiliary libraries ``rad5R2all.tar.gz`` from either `RADIANCE <https://www.radiance-online.org/download-install/radiance-source-code/latest-release>`_ online or `LBL <https://floyd.lbl.gov/radiance/framed.html>`_ - do _not_clone the GitHub repo as it doesn't have the auxiliary libraries which you may also need. Finally extract the tarball.
3. you may also need to install ``csh`` and ``cmake``
4. make directories where you want to install radiance, for example ``~/.local/opt/radiance``
5. read the README and run ``./makeall install clean`` and choose where you want ``bin`` and ``lib``
You can test it by rendering the daffodil.


**Note: bifacial_radiance is not endorsed by or officially connected with the Radiance software package or its development team.**


Prerequisite: PYTHON:
~~~~~~~~~~~~~~~~~~~~~~
You will need python installed to run bifacial_radiance. We suggest using the latest release of `Anaconda with Python 3.7 <https://www.anaconda.com/distribution/>`_ (Python 2.7 is still supported but in the process of being deprecated). Anaconda will install ``Spyder`` to work with the python scripts, and also it will install ``Jupyter``, which is the tool we use for our `tutorial trainings <https://github.com/NREL/bifacial_radiance/tree/master/docs/tutorials>`_


STEP 1
~~~~~~
Install and Import bifacial_radiance

The simplest option is to open a command prompt and run::

pip install bifacial_radiance
An alternative which is shown in the Video Instructions, if you want to install bifacial_radiance in a local folder of your choosing and/or be able to modify the internal code to suit your needs, you can do the following:

* clone the bifacial_radiance repo to your local directory or download and unzip the .zip file
* navigate to the \bifacial_radiance directory using anaconda command line
Expand All @@ -31,30 +62,36 @@ Install and Import bifacial_radiance

The period ``.`` is required, the ``-e`` flag is optional and installs in development mode where changes to the `bifacial_radiance.py` files are immediately incorporated into the module if you re-start the python kernel)

For best compatibility, deploy in an `Anaconda 2.7` environment, or run::
For best compatibility, deploy in an `Anaconda 2019.10` environment, or run::

pip install -r requirements.txt
pip install -r requirements.txt


STEP 2
~~~~~~
Move gencumulativesky.exe
Windows:

* Copy gencumulativesky.exe from the repo's ``/bifacial_radiance/data/`` directory and copy into your Radiance install directory.
This is typically found in ``/program files/radiance/bin/``.

Linux/Mac OSX:

* Copy the gencumulativesky executable from the repo's ``/bifacial_radiance/data/`` directory and copy into your Radiance install directory.
This is typically found in ``/usr/local/radiance/bin/``.


.. note::
GenCumulativeSky is detailed in the publication "Robinson, D., Stone, A., Irradiation modeling made simple: the cumulative sky approach and its applications, Proc. PLEA 2004, Eindhoven 2004."

The source is `available from the authors here <https://documents.epfl.ch/groups/u/ur/urbansimulation/www/GenCumSky/GenCumSky.zip>`_
The gencumsky source is included in the repo's ``/bifacial_radiance/data/gencumsky`` directory along with a make_gencumskyexe.py script which builds the multi-platform gencumulativesky executables. More details on the use of this script in readme.txt or on thread (:issue:`182`).


STEP 3
~~~~~~
Create a local Radiance directory for storing the scene files created
Create a local directory for storing your simulations and runs results.
If run in the default directory, simulation results will be saved in the TEMP folder, but will also be overwritten with every run. We recommend to keep the simulation files (scene geometry, skies, results, etc) separate from the bifacial_radiance directory by creating a local directory somewhere to be used for storing those files.


Keep scene geometry files separate from the bifacial_radiance directory. Create a local directory somewhere to be used for storing scene files.

STEP 4
~~~~~~
Reboot the computer
Expand Down

0 comments on commit 9a2907c

Please sign in to comment.