Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add forecast module #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 97 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
5604bb7
cloned origin/master
MoonRaker Oct 2, 2015
bbf9088
removed siphon files
MoonRaker Oct 2, 2015
989cc57
Added files for running and testing siphon
MoonRaker Oct 8, 2015
31df642
Renamed files and removed errant file
MoonRaker Oct 13, 2015
4d9f176
Subclassed forecast models
MoonRaker Oct 13, 2015
23da3e5
Updated forecast module: added more forecast classes.
MoonRaker Oct 20, 2015
c24b0b7
Added forecast module documentation.
MoonRaker Oct 20, 2015
8745589
Updated documentation and Travis build files.
MoonRaker Oct 22, 2015
fa3044b
Updated Travis build to include netcdf and siphon.
MoonRaker Oct 22, 2015
b13620d
Moved forecast_testing.py and added requirements.txt.
MoonRaker Oct 22, 2015
7cf13ac
updated Travis build conda requirements in /ci
MoonRaker Nov 3, 2015
52e6e7f
Modified forecast.py and updated testing docs.
MoonRaker Nov 4, 2015
cf93bc9
Updated setup.py and .travis.yml files
MoonRaker Nov 4, 2015
e756a82
Added nose tests for forecast.py
MoonRaker Nov 16, 2015
befb83b
Updated nosetests for forecast.py
MoonRaker Nov 16, 2015
cc48a13
Updated .gitignore
MoonRaker Nov 16, 2015
25bde12
Created forecast_to_power.ipynb and updated forecast.py
MoonRaker Nov 20, 2015
99883de
Updated test_forecast.py and forecast.py
MoonRaker Nov 21, 2015
54a70be
Added tests in test_forecast.py and modified forecast.py
MoonRaker Nov 23, 2015
444fbe2
change model names
wholmgren Nov 23, 2015
1e5393d
fix super and test
wholmgren Nov 24, 2015
279ced8
Merge pull request #8 from wholmgren/fx-names
MoonRaker Nov 24, 2015
6dabd70
Updated forecast class & radiation models
MoonRaker Dec 8, 2015
9595e0c
Updated forecast.py, fixes to solarposition.py, tools.py
MoonRaker Dec 11, 2015
2de7c09
Fixed time zone handling of forecast.py, updated tutorials.
MoonRaker Dec 12, 2015
941a556
Updated tutorials, radiation conversion for forecast.py
MoonRaker Dec 14, 2015
210ec96
Updated forecast.py tests
MoonRaker Dec 14, 2015
194313d
Updated forecast, tests, and notebooks
MoonRaker Dec 24, 2015
59ee607
Updated documentation, tutorials, and forecast.py
MoonRaker Jan 8, 2016
f918a1f
Updated forecast.py
MoonRaker Jan 8, 2016
d7cd8a9
add rtd ymls
wholmgren Jan 14, 2016
1230a26
add numpydoc to rtd conda env, remove from source
wholmgren Jan 14, 2016
56a5cdd
try adding a simple plot with ipython directives
wholmgren Jan 14, 2016
862e2dd
add ipython directives to conf.py
wholmgren Jan 14, 2016
a52e7c3
remove line numbers from ipython directives
wholmgren Jan 14, 2016
663ac8b
add blank line
wholmgren Jan 14, 2016
7d6bd96
add imports
wholmgren Jan 14, 2016
dc4e7e7
remove mocks
wholmgren Jan 14, 2016
70bf476
remove sphinxext
wholmgren Jan 14, 2016
ee68c23
add a blank line
wholmgren Jan 14, 2016
6edb069
move ipython directive out of numpydoc
wholmgren Jan 14, 2016
1f3e323
remove plot from module
wholmgren Jan 14, 2016
69ee623
merge masters 612e9ea into forecastings f918a1f
wholmgren Jan 14, 2016
1334091
merge rtdconda into forecasting
wholmgren Jan 14, 2016
97df447
clean up merge detritus
wholmgren Jan 14, 2016
98b0fd0
add siphon to env
wholmgren Jan 14, 2016
3460bc5
remove sphinx_rtd_theme from our source
wholmgren Jan 14, 2016
3a907b6
add siphon to ci ymls
wholmgren Jan 14, 2016
29a1739
Fixed test_temp_convert()
MoonRaker Jan 15, 2016
89c856e
Added exception for HTTPError
MoonRaker Jan 15, 2016
d67cc10
Added HTTPError exception
MoonRaker Jan 15, 2016
5ceabd5
Updated HTTPError exception
MoonRaker Jan 15, 2016
432b412
Updated HTTPError exception
MoonRaker Jan 15, 2016
fbcf180
Modified test_data_query
MoonRaker Jan 15, 2016
a218e95
Reverted test_data_query modification
MoonRaker Jan 15, 2016
8b30e01
merge ci and appveyor changes in pvlib/master into fx-master
wholmgren Jan 17, 2016
16a216f
add siphon to appveyor.yml
wholmgren Jan 17, 2016
9d76b49
Merge pull request #1 from MoonRaker/master
wholmgren Jan 17, 2016
9a7260b
fix tab problem
wholmgren Jan 17, 2016
4d49dbf
Merge branch 'fx-master' of github.com:wholmgren/pvlib-python into fx…
wholmgren Jan 17, 2016
c4abc16
add requires_siphon
wholmgren Jan 17, 2016
8a505a1
remove siphon from min and 3.5 ci files
wholmgren Jan 17, 2016
c881278
revert to pvlib/master setup.py. rm fx README and req
wholmgren Jan 17, 2016
ac59220
remove forecast module import from init
wholmgren Jan 17, 2016
3026230
protect test_forecast imports with has_siphon
wholmgren Jan 17, 2016
8f970ad
reorganize tutorials
wholmgren Feb 16, 2016
b57432d
merge pvlib master
wholmgren Feb 16, 2016
efc29d6
editing forecast docs
wholmgren Feb 16, 2016
7c4a250
fx documentation should work with ipython example
wholmgren Feb 16, 2016
ff8b339
remove fx model timerange in favor of start, end
wholmgren Feb 17, 2016
968baf8
add irrad plot
wholmgren Feb 17, 2016
44211a9
add model description and pv power
wholmgren Feb 17, 2016
0360e07
edit docs
wholmgren Feb 17, 2016
e76917d
pep8 stuff
wholmgren Feb 18, 2016
cfbae8d
refactor calc_radiation, add repr, add test generator
wholmgren Feb 18, 2016
ba9ba44
do not import forecasting
wholmgren Feb 18, 2016
4dc913e
add a few resolutions, update notebooks
wholmgren Feb 18, 2016
48a158a
more clean up and pep8
wholmgren Feb 18, 2016
d45268b
deleted unused images. now auto generated as appropriate
wholmgren Feb 18, 2016
6915011
clean up gitattributes
wholmgren Feb 18, 2016
a9a2ed5
use conda-forge channel instead of unidata
wholmgren Feb 23, 2016
c7ce063
add conda forge to appveyor
wholmgren Feb 23, 2016
00ef913
Merge remote-tracking branch 'pvlib/master' into merge030
wholmgren Apr 1, 2016
5e84d0b
create v0.4.0 whatsnew
wholmgren Apr 1, 2016
6c79341
update forecast module for 0.3 changes
wholmgren Apr 1, 2016
6c1f529
fix appveyor config file
wholmgren Apr 1, 2016
ee61321
clean up merge
wholmgren Apr 1, 2016
7d49655
notes on geographic location. clean up
wholmgren Apr 1, 2016
07f8a7e
refactor forecast.py to be more explicit
wholmgren Apr 3, 2016
67b2db2
update fx tutorials. minor doc fix
wholmgren Apr 3, 2016
56e15df
more doc edits
wholmgren Apr 4, 2016
1116844
add comments
wholmgren Apr 19, 2016
98871ad
merge 0.3 changes into fx
wholmgren May 20, 2016
50daf8c
add newline
wholmgren May 20, 2016
0ef526b
remove http from channel
wholmgren May 20, 2016
28af554
use a big tracker for forecast example
wholmgren May 20, 2016
4ef0a6c
fix import problem
wholmgren May 20, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated nosetests for forecast.py
  • Loading branch information
MoonRaker committed Nov 16, 2015
commit befb83b7271501d607efc7eee2cf701612c12420
106 changes: 54 additions & 52 deletions 106 pvlib/forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,12 +304,12 @@ def __init__(self,res='Half'):
super(GFS, self).__init__(model_type,model,data_labels)


class NAM(ForecastModel):
class GSD(ForecastModel):
'''
Subclass of the ForecastModel class representing NAM forecast model.
Subclass of the ForecastModel class representing NCEP forecast model.

Model data corresponds to NAM CONUS 12km resolution forecasts
from CONDUIT.
Model data corresponds to NOAA/GSD HRRR CONUS 3km resolution
surface forecasts.

Attributes
----------
Expand All @@ -324,36 +324,35 @@ class NAM(ForecastModel):
Name of the UNIDATA forecast model.
model_type: string
UNIDATA category in which the model is located.
res: string
Determines which resolution of the GFS to use, as 'Half' or 'Quarter'
variables: list
Names of default variables specific to the model.

'''
def __init__(self):
import warnings
warnings.warn('Experimental model. May not be available.')
model_type = 'Forecast Model Data'
model = 'NAM CONUS 12km from CONDUIT'
model = 'GSD HRRR CONUS 3km surface'
description = ''
variables = ['Temperature_surface',
'Temperature_isobaric',
'Total_cloud_cover_entire_atmosphere_single_layer',
'Low_cloud_cover_low_cloud',
'Medium_cloud_cover_middle_cloud',
'High_cloud_cover_high_cloud',
'Downward_Short-Wave_Radiation_Flux_surface',
'Downward_Short-Wave_Radiation_Flux_surface_Mixed_intervals_Average']
cols = super(NAM, self).columns
idx = [0,1,3,4,5,6,9,10]
'Total_cloud_cover_entire_atmosphere',
'Low_cloud_cover_UnknownLevelType-214',
'Medium_cloud_cover_UnknownLevelType-224',
'High_cloud_cover_UnknownLevelType-234',
'Downward_short-wave_radiation_flux_surface']
cols = super(GSD, self).columns
idx = [0,3,4,5,6,9]
data_labels = dict(zip(cols[idx],variables))
super(NAM, self).__init__(model_type,model,data_labels)
super(GSD, self).__init__(model_type,model,data_labels)


class RAP(ForecastModel):

class NAM(ForecastModel):
'''
Subclass of the ForecastModel class representing RAP forecast model.
Subclass of the ForecastModel class representing NAM forecast model.

Model data corresponds to Rapid Refresh CONUS 20km resolution
forecasts.
Model data corresponds to NAM CONUS 12km resolution forecasts
from CONDUIT.

Attributes
----------
Expand All @@ -368,23 +367,28 @@ class RAP(ForecastModel):
Name of the UNIDATA forecast model.
model_type: string
UNIDATA category in which the model is located.
res: string
Determines which resolution of the GFS to use, as 'Half' or 'Quarter'
variables: list
Names of default variables specific to the model.

'''
def __init__(self):
model_type = 'Forecast Model Data'
model = 'Rapid Refresh CONUS 20km'
model = 'NAM CONUS 12km from CONDUIT'
description = ''
variables = ['Temperature_surface',
'Temperature_isobaric',
'Total_cloud_cover_entire_atmosphere_single_layer',
'Low_cloud_cover_low_cloud',
'Medium_cloud_cover_middle_cloud',
'High_cloud_cover_high_cloud']
cols = super(RAP, self).columns
idx = [0,3,4,5,6]
'High_cloud_cover_high_cloud',
'Downward_Short-Wave_Radiation_Flux_surface',
'Downward_Short-Wave_Radiation_Flux_surface_Mixed_intervals_Average']
cols = super(NAM, self).columns
idx = [0,1,3,4,5,6,9,10]
data_labels = dict(zip(cols[idx],variables))
super(RAP, self).__init__(model_type,model,data_labels)
super(NAM, self).__init__(model_type,model,data_labels)


class NCEP(ForecastModel):
Expand Down Expand Up @@ -425,12 +429,11 @@ def __init__(self):
super(NCEP, self).__init__(model_type,model,data_labels)


class GSD(ForecastModel):
class NDFD(ForecastModel):
'''
Subclass of the ForecastModel class representing NCEP forecast model.
Subclass of the ForecastModel class representing NDFD forecast model.

Model data corresponds to NOAA/GSD HRRR CONUS 3km resolution
surface forecasts.
Model data corresponds to NWS CONUS CONDUIT forecasts.

Attributes
----------
Expand All @@ -449,28 +452,26 @@ class GSD(ForecastModel):
Names of default variables specific to the model.

'''
def __init__(self):
model_type = 'Forecast Model Data'
model = 'GSD HRRR CONUS 3km surface'

def __init__(self):
model_type = 'Forecast Products and Analyses'
model = 'National Weather Service CONUS Forecast Grids (CONDUIT)'
description = ''
variables = ['Temperature_surface',
'Total_cloud_cover_entire_atmosphere',
'Low_cloud_cover_UnknownLevelType-214',
'Medium_cloud_cover_UnknownLevelType-224',
'High_cloud_cover_UnknownLevelType-234',
'Downward_short-wave_radiation_flux_surface']
cols = super(GSD, self).columns
idx = [0,3,4,5,6,9]
'Wind_speed_surface',
'Total_cloud_cover_surface']
cols = super(NDFD, self).columns
idx = [0,2,3]
data_labels = dict(zip(cols[idx],variables))
super(GSD, self).__init__(model_type,model,data_labels)
super(NDFD, self).__init__(model_type,model,data_labels)


class NDFD(ForecastModel):
class RAP(ForecastModel):
'''
Subclass of the ForecastModel class representing NDFD forecast model.
Subclass of the ForecastModel class representing RAP forecast model.

Model data corresponds to NWS CONUS CONDUIT forecasts.
Model data corresponds to Rapid Refresh CONUS 20km resolution
forecasts.

Attributes
----------
Expand All @@ -489,15 +490,16 @@ class NDFD(ForecastModel):
Names of default variables specific to the model.

'''

def __init__(self):
model_type = 'Forecast Products and Analyses'
model = 'National Weather Service CONUS Forecast Grids (CONDUIT)'
model_type = 'Forecast Model Data'
model = 'Rapid Refresh CONUS 20km'
description = ''
variables = ['Temperature_surface',
'Wind_speed_surface',
'Total_cloud_cover_surface']
cols = super(NDFD, self).columns
idx = [0,2,3]
'Total_cloud_cover_entire_atmosphere_single_layer',
'Low_cloud_cover_low_cloud',
'Medium_cloud_cover_middle_cloud',
'High_cloud_cover_high_cloud']
cols = super(RAP, self).columns
idx = [0,3,4,5,6]
data_labels = dict(zip(cols[idx],variables))
super(NDFD, self).__init__(model_type,model,data_labels)
super(RAP, self).__init__(model_type,model,data_labels)
104 changes: 0 additions & 104 deletions 104 pvlib/test/test_forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,110 +40,6 @@ def test_fmcreation():
_models[model[0]] = amodel


def test_GFSdict():

gfs = _models['GFS']

varlist = ['Temperature_isobaric',
'Total_cloud_cover_entire_atmosphere_Mixed_intervals_Average',
'Total_cloud_cover_low_cloud_Mixed_intervals_Average',
'Total_cloud_cover_middle_cloud_Mixed_intervals_Average',
'Total_cloud_cover_high_cloud_Mixed_intervals_Average',
'Total_cloud_cover_boundary_layer_cloud_Mixed_intervals_Average',
'Total_cloud_cover_convective_cloud']

idx = [1,3,4,5,6,7,8]
label_dict = dict(zip(_variables[idx],varlist))

for key, _ in gfs.data_labels.iteritems():
assert label_dict[key] == gfs.data_labels[key]


def test_GSDdict():

gsd = _models['GFS']

varlist = ['Temperature_surface',
'Total_cloud_cover_entire_atmosphere',
'Low_cloud_cover_UnknownLevelType-214',
'Medium_cloud_cover_UnknownLevelType-224',
'High_cloud_cover_UnknownLevelType-234',
'Downward_short-wave_radiation_flux_surface']

idx = [0,3,4,5,6,9]
label_dict = dict(zip(_variables[idx],varlist))

for key, _ in gsd.data_labels.iteritems():
assert label_dict[key] == gsd.data_labels[key]


def test_NAMdict():

nam = _models['GFS']

varlist = ['Temperature_surface',
'Temperature_isobaric',
'Total_cloud_cover_entire_atmosphere_single_layer',
'Low_cloud_cover_low_cloud',
'Medium_cloud_cover_middle_cloud',
'High_cloud_cover_high_cloud',
'Downward_Short-Wave_Radiation_Flux_surface',
'Downward_Short-Wave_Radiation_Flux_surface_Mixed_intervals_Average']
idx = [0,1,3,4,5,6,9,10]
label_dict = dict(zip(_variables[idx],varlist))

for key, _ in nam.data_labels.iteritems():
assert label_dict[key] == nam.data_labels[key]


def test_NCEPdict():

ncep = _models['GFS']

varlist = ['Total_cloud_cover_entire_atmosphere',
'Low_cloud_cover_low_cloud',
'Medium_cloud_cover_middle_cloud',
'High_cloud_cover_high_cloud',]

idx = [3,4,5,6]
label_dict = dict(zip(_variables[idx],varlist))

for key, _ in ncep.data_labels.iteritems():
assert label_dict[key] == ncep.data_labels[key]


def test_NDFDdict():

ndfd = _models['GFS']

varlist = ['Temperature_surface',
'Wind_speed_surface',
'Total_cloud_cover_surface']

idx = [0,2,3]
label_dict = dict(zip(_variables[idx],varlist))

for key, _ in ndfd.data_labels.iteritems():
assert label_dict[key] == ndfd.data_labels[key]


def test_RAPdict():

rap = _models['GFS']

varlist = ['Temperature_surface',
'Total_cloud_cover_entire_atmosphere_single_layer',
'Low_cloud_cover_low_cloud',
'Medium_cloud_cover_middle_cloud',
'High_cloud_cover_high_cloud']

idx = [0,3,4,5,6]
label_dict = dict(zip(_variables[idx],varlist))

for key, _ in rap.data_labels.iteritems():
assert label_dict[key] == rap.data_labels[key]


def test_data_query():

for name, model in _models.items():
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.