Skip to content

Instantly share code, notes, and snippets.

View kandersolar's full-sized avatar
🐌
Nigel the snail

Kevin Anderson kandersolar

🐌
Nigel the snail
  • Sandia National Laboratories
View GitHub Profile
@kandersolar
kandersolar / cheat_sheet.rst
Last active February 25, 2022 13:40
Cheat sheet for conda envs, git, et al

Conda

  • create a new environment
    conda create -n myenv python=3.7
  • delete an environment
    conda env remove --name myenv
  • show environments
    conda env list
@kandersolar
kandersolar / passias_masking_angle_comparison.py
Created August 4, 2020 02:01
Comparisons of Equation 9 in Passias & Kallbach, "Shading effects in rows of solar cell panels"
import numpy as np
import matplotlib.pyplot as plt
def passias_masking_angle_original(slant_height, pitch, surface_tilt,
reverse_minus):
"""
implementation of Equation 9. `correct_minus` is a boolean that
controls whether an unclear minus sign is included or not.
"""
B = slant_height
@kandersolar
kandersolar / SPECTRL2.ipynb
Last active December 22, 2020 22:47
SPECTRL2 implementation comparison
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kandersolar
kandersolar / sum_uniformly_distributed_variables.ipynb
Created September 25, 2020 18:29
Sum of non-identical uniform distributions
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kandersolar
kandersolar / MERRA2_demo.ipynb
Created August 3, 2021 18:53
MERRA2 -> hourly time series dataframe
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kandersolar
kandersolar / h5_nc_showdown.ipynb
Created August 27, 2021 21:29
timing comparisons of reading hdf5 and netcdf4 data with various python libraries
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kandersolar
kandersolar / pvfactors_tilt_zero.ipynb
Created November 1, 2021 18:47
Notebook to reproduce a pvfactors issue when surface_tilt is exactly zero
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kandersolar
kandersolar / rearside_nonuniformity.ipynb
Created November 5, 2021 22:55
Modeling the nonuniformity of rear-side irradiance w/ pvfactors
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kandersolar
kandersolar / ground-sky-vf.ipynb
Last active December 30, 2021 01:22
Calculating sky dome vf for a point on the ground in an infinite sheds array. See https://nbviewer.org/gist/kanderso-nrel/68176ccd617851dfa26623452681fbeb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.