README
------
NREL provides a C implementation of the solar position algorithm described in
[Reda, I.; Andreas, A. (2003). Solar Position Algorithm for Solar Radiation Applications. 55 pp.; NREL Report No. TP-560-34302](http://www.nrel.gov/docs/fy08osti/34302.pdf).
This folder contains the files required to make SPA C code accessible
to the `pvlib-python` package. We use the Cython package to wrap the NREL SPA
implementation.
** Due to licensing issues, the SPA C files can _not_ be distributed with
`pvlib-python`. You must download the SPA C files from the
[NREL website](https://midcdmz.nrel.gov/spa/). **
Download the `spa.c` and `spa.h` files from NREL, and copy them into the
`pvlib/spa_c_files` directory. When the extension is built, the ``timezone``
field in the SPA C files is replaced with `time_zone` to avoid a nameclash
with the function `__timezone` that is redefined by Python>=3.5. This issue
is [Python bug 24643](https://bugs.python.org/issue24643).
There are a total of 5 files needed to compile the C code, described below:
* `spa.c`: original C code from NREL
* `spa.h`: header file for spa.c
* `cspa_py.pxd`: a cython header file which essentially tells cython which
parts of the main header file to pay attention to
* `spa_py.pyx`: the cython code used to define both functions in the python
namespace. NOTE: It is possible to provide user access to other paramters of
the SPA algorithm through modifying this file
* `setup.py`: a distutils file which performs the compiling of the cython code
The cython compilation process produces two files:
* `spa_py.c`: an intermediate cython c file
* `spa_py.so` or `spa_py.<cpyver-plat>.pyd`: the python module which
can be imported into a namespace
To create the SPA Python extension, use the following shell command inside this
folder:
$ python setup.py build_ext --inplace
There are four optional keyword arguments `delta_ut1=0`, `slope=30.0`,
`azm_rotation=-10`, `atmos_refract` that effect four optional return values
`incidence`, `suntransit`, `sunrise`, and `sunset`. If not given, the defaults
shown are used.
There is an example in `spa_py_example.py` that contains a test function called
`spa_calc_example` that users can use to check that the result is consistent
with expected values:
>>> from spa_py_example import spa_calc_example
>>> r = spa_calc_example()
{
'year': 2004,
'month': 10,
'day': 17,
'hour': 12,
'minute': 30,
'second': 30.0,
'delta_ut1': 0.0,
'delta_t': 67.0,
'time_zone': -7.0,
'longitude': -105.1786,
'latitude': 39.742476,
'elevation': 1830.14,
'pressure': 820.0,
'temperature': 11.0,
'slope': 30.0,
'azm_rotation': -10.0,
'atmos_refract': 0.5667,
'function': 3,
'e0': 39.59209464796398,
'e': 39.60858878898177,
'zenith': 50.39141121101823,
'azimuth_astro': 14.311961805946808,
'azimuth': 194.3119618059468,
'incidence': 25.42168493680471,
'suntransit': 11.765833793714224,
'sunrise': 6.22578372122376,
'sunset': 17.320379610556166
}
没有合适的资源?快使用搜索试试~ 我知道了~
pvlib.zip光伏能源模拟
共147个文件
py:88个
csv:31个
txt:7个
需积分: 28 1 下载量 156 浏览量
2022-01-22
19:18:11
上传
评论
收藏 26.45MB ZIP 举报
温馨提示
pvlib.zip光伏能源模拟
资源详情
资源评论
资源推荐
收起资源包目录
pvlib.zip光伏能源模拟 (147个子文件)
sam-library-cec-modules-2019-03-05.csv 5.21MB
PVsyst_demo.csv 3.67MB
test_read_psm3.csv 1.73MB
703165TY.csv 1.69MB
723170TYA.CSV 1.65MB
test_psm3_2017.csv 932KB
tmy_45.000_8.000_2005_2016.csv 573KB
singleaxis_tracker_wslope.csv 563KB
sam-library-cec-inverters-2019-03-05.csv 558KB
test_psm3_tmy-2017.csv 468KB
BIRD_08_16_2012_patm.csv 367KB
BIRD_08_16_2012.csv 367KB
pvwatts_8760_roofmount.csv 330KB
pvwatts_8760_rackmount.csv 330KB
adr-library-2013-10-01.csv 329KB
soiling_hsu_example_inputs.csv 321KB
sam-library-sandia-modules-2015-6-30.csv 191KB
PVsyst_demo_model.csv 165KB
test_psm3_2019_5min.csv 27KB
bishop88_numerical_precision.csv 17KB
spectrl2_example_spectra.csv 11KB
cams_radiation_1min_verbose.csv 6KB
cams_mcclear_1min_verbose.csv 4KB
inverter_fit_snl_meas.csv 4KB
cams_radiation_monthly.csv 3KB
cams_mcclear_monthly.csv 3KB
variables_style_rules.csv 2KB
ivtools_numdiff.csv 2KB
pvgis_hourly_Timeseries_45.000_8.000_SA_30deg_0deg_2016_2016.csv 1KB
inverter_fit_snl_sim.csv 1KB
detect_clearsky_data.csv 973B
bsrn-lr0100-pay0616.dat 5.46MB
pvgis_tmy_test.dat 671KB
surfrad-slv16001.dat 333KB
greensboro_kimber_soil_manwash.dat 275KB
greensboro_kimber_soil_nowash.dat 275KB
msn19056.dat 796B
abq19056.dat 563B
tmy_45.000_8.000_2005_2016.epw 1.77MB
NLD_Amsterdam062400_IWEC.epw 1.48MB
bsrn-pay0616.dat.gz 4.13MB
LinkeTurbidities.h5 14.91MB
tmy_45.000_8.000_2005_2016.json 1.38MB
tmy_45.000_8.000_userhorizon.json 1.37MB
pvgis_hourly_Timeseries_45.000_8.000_CM_10kWp_CIS_5_2a_2013_2014.json 4KB
pvgis_tmy_meta.json 2KB
README.md 3KB
SPA_NOTICE.md 2KB
aod550_tcwv_20121101_test.nc 231KB
cspa_py.pxd 825B
pvsystem.py 122KB
irradiance.py 111KB
test_pvsystem.py 90KB
test_modelchain.py 88KB
modelchain.py 77KB
sdm.py 51KB
solarposition.py 51KB
spa.py 49KB
test_irradiance.py 41KB
forecast.py 39KB
clearsky.py 38KB
test_solarposition.py 37KB
temperature.py 31KB
test_clearsky.py 31KB
singlediode.py 29KB
tmy.py 29KB
pvgis.py 28KB
test_pvgis.py 27KB
tracking.py 26KB
iam.py 25KB
atmosphere.py 24KB
test_tracking.py 22KB
bsrn.py 21KB
spectrl2.py 19KB
inverter.py 19KB
test_spa.py 17KB
sde.py 17KB
epw.py 17KB
_version.py 17KB
test_sdm.py 16KB
sodapro.py 16KB
utils.py 15KB
test_sodapro.py 14KB
test_sde.py 14KB
conftest.py 14KB
_deprecation.py 13KB
test_location.py 12KB
psm3.py 12KB
location.py 12KB
test_temperature.py 12KB
ecmwf_macc.py 11KB
test_singlediode.py 11KB
scaling.py 11KB
test_iam.py 10KB
midc.py 9KB
soiling.py 9KB
test_soiling.py 8KB
test_atmosphere.py 8KB
test_inverter.py 7KB
tools.py 7KB
共 147 条
- 1
- 2
Victor575
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0