Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# in ModelChain
def __init__(..., singlediode_calcparams_model=None)
# calls setters
self.singlediode_calcparams_model = singlediode_calcparams_model
@property
def singlediode_calcparams_model(self):
return self._singlediode_calcparams_model
@singlediode_calcparams_model.setter
@wholmgren
wholmgren / ktus_precip_probability_201802013.ipynb
Created February 13, 2018 00:49
a simple subjective probabilistic rain forecast
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# based on scipy/optimize/Zeros/brentq.c
# modified to python by
# William Holmgren william.holmgren@gmail.com @wholmgren
# University of Arizona, 2018
# /* Written by Charles Harris charles.harris@sdl.usu.edu */
#
# #include <math.h>
# #include "zeros.h"
#
@wholmgren
wholmgren / newton_example.pyx
Created February 5, 2018 20:24 — forked from mikofski/newton_example.pyx
cythonized example of scipy.optimized.newton to solve solar-cell for 100,000 different cases
from __future__ import division, print_function, absolute_import
from math import exp, sin
from scipy.optimize.cython_optimize cimport zeros
NUM_OF_IRRAD = 10
IL = [sin(il) + 6.0 for il in range(NUM_OF_IRRAD)]
# governing equations
@wholmgren
wholmgren / brentq.py
Last active March 6, 2018 21:42
preliminary results for numba'ed maximum power point code. non-numba code was developed in https://github.com/pvlib/pvlib-python/pull/409
# based on scipy/optimize/Zeros/brentq.c
# modified to python by
# William Holmgren william.holmgren@gmail.com @wholmgren
# University of Arizona, 2018
# /* Written by Charles Harris charles.harris@sdl.usu.edu */
#
# #include <math.h>
# #include "zeros.h"
#
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Column Description
Pac0 AC-power output from inverter based on input power and voltage (W)
Pdc0 DC-power input to inverter, typically assumed to be equal to the PV array maximum power (W)
Vdc0 DC-voltage level at which the AC-power rating is achieved