Skip to content

Ncep provider - #34

Merged
sdc50 merged 47 commits into
erdc:masterfrom
AaronV77:ncep_provider
Apr 27, 2018
Merged

Ncep provider#34
sdc50 merged 47 commits into
erdc:masterfrom
AaronV77:ncep_provider

Conversation

@AaronV77

@AaronV77 AaronV77 commented Apr 9, 2018

Copy link
Copy Markdown
Collaborator

Added the ncep provider, updated the docs, and added ncep_client and terrapin to the environment files for python 2 and 3.

display_name = 'NCEP GFS Provider'
description = 'Services avaliable through the NOAA NCEP Server.'
organization_name = 'National Centers for Environmental Prediction'
organization_abbr = 'NCEP' No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W292 no newline at end of file

Comment thread test/data.py
'svc://cuahsi-hydroshare:hs_geo': {},
'svc://cuahsi-hydroshare:hs_norm': {},
'svc://noaa-ncep:ncep_gfs': {'properties': [{'default': None,
'description': 'YYYYMMDD',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E128 continuation line under-indented for visual indent

Comment thread test/data.py
'svc://cuahsi-hydroshare:hs_norm': {},
'svc://noaa-ncep:ncep_gfs': {'properties': [{'default': None,
'description': 'YYYYMMDD',
'name': 'date',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E128 continuation line under-indented for visual indent

Comment thread test/data.py
'svc://noaa-ncep:ncep_gfs': {'properties': [{'default': None,
'description': 'YYYYMMDD',
'name': 'date',
'type': 'String'},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E128 continuation line under-indented for visual indent

Comment thread test/data.py
'description': 'YYYYMMDD',
'name': 'date',
'type': 'String'},
{'default': None,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E128 continuation line under-indented for visual indent

Comment thread test/data.py Outdated
'description': 'Paramerter',
'name': 'format',
'range': [['enkf', 'enkf'],
['gdas', 'gdas'],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E128 continuation line under-indented for visual indent

Comment thread test/data.py
'description': 'Parameter3',
'name': 'product',
'range': [["0.50 deg 'full' file description",
"0.50 deg 'full' file description"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E128 continuation line under-indented for visual indent

Comment thread test/data.py
'name': 'product',
'range': [["0.50 deg 'full' file description",
"0.50 deg 'full' file description"],
['32km Lambert Conformal grid', '32km Lambert Conformal grid'],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E128 continuation line under-indented for visual indent

Comment thread test/data.py Outdated
['global longitude-latitude grid (1.0 deg)',
'global longitude-latitude grid (1.0 deg)']],
'type': 'ObjectSelector'}],
'title': 'NCEP GFS Service Download Options'}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E121 continuation line under-indented for hanging indent

@AaronV77 AaronV77 assigned AaronV77 and sdc50 and unassigned AaronV77 Apr 9, 2018
@AaronV77 AaronV77 added the enhancement New feature or request label Apr 9, 2018
@AaronV77 AaronV77 added this to the RD WorkShop milestone Apr 9, 2018
AaronV77 and others added 8 commits April 16, 2018 11:45
* Added the cuahsi coverage fix. The change was not getting all the resources and just getting all resources that had a coverage from the world.

* Made kwargs the standard over using options, params, and kwargs.

* Updated the load_providers to only update if update-cache is True or if the global is None.
Comment thread quest/util/misc.py

providers = {name: driver.DriverManager('quest.services', name, invoke_on_load=True, invoke_kwds={'name': name}).driver for name in web_services}
if update_cache or the_providers is None:
providers = {name: driver.DriverManager('quest.services', name, invoke_on_load=True, invoke_kwds={'name': name}).driver for name in web_services}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E501 line too long (153 > 120 characters)

Comment thread quest/util/misc.py
if len(settings.get('USER_SERVICES', [])) > 0:
for uri in settings.get('USER_SERVICES', []):
try:
drv = driver.DriverManager('quest.services', 'user', invoke_on_load=True, invoke_kwds={'uri': uri}).driver

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E501 line too long (126 > 120 characters)


return metadata

class NCEPProvider(ProviderBase):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E302 expected 2 blank lines, found 1

Comment thread test/data.py
'global longitude-latitude grid (1.0 deg)']],
'type': 'ObjectSelector'}],
'title': 'NCEP GFS Service Download Options'},
'svc://noaa-ncep:ncep_nam': {'properties': [{'default': None,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E131 continuation line unaligned for hanging indent

Comment thread test/data.py
'type': 'ObjectSelector'}],
'title': 'NCEP GFS Service Download Options'},
'svc://noaa-ncep:ncep_nam': {'properties': [{'default': None,
'description': 'YYYYMMDD',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E128 continuation line under-indented for visual indent

Comment thread test/data.py
'title': 'NCEP GFS Service Download Options'},
'svc://noaa-ncep:ncep_nam': {'properties': [{'default': None,
'description': 'YYYYMMDD',
'name': 'date',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E128 continuation line under-indented for visual indent

Comment thread test/data.py
'svc://noaa-ncep:ncep_nam': {'properties': [{'default': None,
'description': 'YYYYMMDD',
'name': 'date',
'type': 'String'},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E128 continuation line under-indented for visual indent

Comment thread test/data.py
'description': 'YYYYMMDD',
'name': 'date',
'type': 'String'},
{'default': None,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E128 continuation line under-indented for visual indent

Comment thread test/data.py
'NAM 215 AWIPS Grid - CONUS (20-km Resolution)'],
['NAM 216 AWIPS Grid - Regional - Alaska (45-km Resolution)',
'NAM 216 AWIPS Grid - Regional - Alaska (45-km Resolution)'],
['NAM 218 AWIPS Grid - CONUS (12-km Resolution; full complement of pressure level fields and some surface-based fields)',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E501 line too long (126 > 120 characters)

Comment thread test/data.py
['NAM 216 AWIPS Grid - Regional - Alaska (45-km Resolution)',
'NAM 216 AWIPS Grid - Regional - Alaska (45-km Resolution)'],
['NAM 218 AWIPS Grid - CONUS (12-km Resolution; full complement of pressure level fields and some surface-based fields)',
'NAM 218 AWIPS Grid - CONUS (12-km Resolution; full complement of pressure level fields and some surface-based fields)'],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E501 line too long (127 > 120 characters)

Comment thread test/data.py
'NAM 221 AWIPS Grid - High Resolution North American Master Grid (32-km Resolution)'],
['NAM 221 AWIPS Grid - N. American Master (32-km Resolution) (GOES Simulated Brightness Temp.)',
'NAM 221 AWIPS Grid - N. American Master (32-km Resolution) (GOES Simulated Brightness Temp.)'],
['NAM 242 AWIPS Grid - Over Alaska (11.25 KM Resolution; full complement of pressure level fields and some surface-based fields)',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E501 line too long (135 > 120 characters)

Comment thread test/data.py
['NAM 221 AWIPS Grid - N. American Master (32-km Resolution) (GOES Simulated Brightness Temp.)',
'NAM 221 AWIPS Grid - N. American Master (32-km Resolution) (GOES Simulated Brightness Temp.)'],
['NAM 242 AWIPS Grid - Over Alaska (11.25 KM Resolution; full complement of pressure level fields and some surface-based fields)',
'NAM 242 AWIPS Grid - Over Alaska (11.25 KM Resolution; full complement of pressure level fields and some surface-based fields)'],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E501 line too long (136 > 120 characters)

Comment thread test/data.py
['global longitude-latitude grid (1.0 deg)',
'global longitude-latitude grid (1.0 deg)']],
'type': 'ObjectSelector'}],
'title': 'NCEP GFS Service Download Options'},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E121 continuation line under-indented for hanging indent

AaronV77 and others added 6 commits April 18, 2018 08:22
* I got the basic authentication piece setup for the nasa provider.

* Made a small fix to the authentication fix. This provider is working again.

* Nasa provider syntax fix.

* Minor updates (#38)

* Added the cuahsi coverage fix. The change was not getting all the resources and just getting all resources that had a coverage from the world.

* Made kwargs the standard over using options, params, and kwargs.

* Updated the load_providers to only update if update-cache is True or if the global is None.

* I got the basic authentication piece setup for the nasa provider.

* Made a small fix to the authentication fix. This provider is working again.

* Nasa provider syntax fix.

* I never added the uncommented the nasa download options to the tests in data.py. This fixes the tests.
Comment thread quest/services/nasa.py

def _read_granules(self, short_name, page_num):
try:
return requests.get(granules_url % (short_name, page_num), auth=(self.info['username'], self.info['password'])).json()['feed']['entry']

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E501 line too long (147 > 120 characters)

display_name = 'NCEP Provider'
description = 'Services avaliable through the NOAA NCEP Server.'
organization_name = 'National Centers for Environmental Prediction'
organization_abbr = 'NCEP' No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W292 no newline at end of file

Comment thread test/data.py
SERVICE_FEATURE_DOWNLOAD_OPTIONS = [
# ('svc://nasa:srtm-3-arc-second/G1034711987-LPDAAC_ECS' , None),
# ('svc://nasa:srtm-30-arc-second/G1005651728-LPDAAC_ECS', None),
('svc://nasa:srtm-3-arc-second/G1034711987-LPDAAC_ECS' , None),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E203 whitespace before ','

Comment thread test/data.py
DOWNLOAD_OPTIONS_FROM_ALL_SERVICES = {
# 'svc://nasa:srtm-3-arc-second': {},
# 'svc://nasa:srtm-30-arc-second': {},
'svc://nasa:srtm-3-arc-second': {},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E121 continuation line under-indented for hanging indent

Comment thread test/data.py
'description': 'Parameter3',
'name': 'product',
'range': [['NAM', 'NAM'],
['NAM - Binary Universal Form for the Representation of meteorological data (BUFR)',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E128 continuation line under-indented for visual indent

@sdc50 sdc50 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests failing because of the NASA provider, which will be fixed in a future PR.

@sdc50
sdc50 merged commit 6a80777 into erdc:master Apr 27, 2018
@AaronV77
AaronV77 deleted the ncep_provider branch May 8, 2018 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants