Пример #1
0
 def test_trailing(self):
     ds = get_radarserver_datasets('http://thredds.ucar.edu/thredds/')
     assert len(ds) == 5
Пример #2
0
 def test_catalog_access(self):
     ds = get_radarserver_datasets('http://thredds.ucar.edu/thredds/')
     url = ds['NEXRAD Level III Radar from IDD'].follow().catalog_url
     assert RadarServer(url)
Пример #3
0
 def test_no_trailing(self):
     ds = get_radarserver_datasets('http://thredds.ucar.edu/thredds')
     eq_(len(ds), 5)
Пример #4
0
 def test_get_rs_datasets_denied_throws(self):
     get_radarserver_datasets(
         'http://thredds-aws.unidata.ucar.edu/thredds/')
Пример #5
0
 def test_catalog_access(self):
     """Test that getting datasets returns a proper catalog."""
     ds = get_radarserver_datasets('http://thredds.ucar.edu/thredds/')
     url = ds['NEXRAD Level III Radar from IDD'].follow().catalog_url
     assert RadarServer(url)
Пример #6
0
def test_get_rs_datasets_denied_throws():
    """Test that getting radar server datasets raises an error for permission denied."""
    with pytest.raises(HTTPError):
        get_radarserver_datasets(
            'http://thredds-aws.unidata.ucar.edu/thredds/')
Пример #7
0
 def test_get_rs_datasets_denied_throws(self):
     get_radarserver_datasets('http://thredds-aws.unidata.ucar.edu/thredds/')
Пример #8
0
def test_get_rs_datasets_denied_throws():
    with pytest.raises(HTTPError):
        get_radarserver_datasets('http://thredds-aws.unidata.ucar.edu/thredds/')
Пример #9
0
 def test_trailing(self):
     ds = get_radarserver_datasets('http://thredds.ucar.edu/thredds/')
     eq_(len(ds), 5)
Пример #10
0
 def test_catalog_access(self):
     ds = get_radarserver_datasets('http://thredds.ucar.edu/thredds/')
     url = ds['NEXRAD Level III Radar from IDD'].follow().catalog_url
     assert RadarServer(url)
Пример #11
0
def test_get_rs_datasets_denied_throws():
    """Test that getting radar server datasets raises an error for permission denied."""
    with pytest.raises(HTTPError):
        get_radarserver_datasets('http://thredds-aws.unidata.ucar.edu/thredds/')
Пример #12
0
 def test_catalog_access(self):
     """Test that getting datasets returns a proper catalog."""
     ds = get_radarserver_datasets('http://thredds.ucar.edu/thredds/')
     url = ds['NEXRAD Level III Radar from IDD'].follow().catalog_url
     assert RadarServer(url)
Пример #13
0
 def test_trailing(self):
     """Test that passing a url with a trailing slash works."""
     ds = get_radarserver_datasets('http://thredds.ucar.edu/thredds/')
     assert len(ds) == 5
Пример #14
0
def test_get_rs_datasets_denied_throws():
    with pytest.raises(HTTPError):
        get_radarserver_datasets(
            'http://thredds-aws.unidata.ucar.edu/thredds/')
Пример #15
0
 def test_trailing(self):
     """Test that passing a url with a trailing slash works."""
     ds = get_radarserver_datasets('http://thredds.ucar.edu/thredds/')
     assert len(ds) == 5
Пример #16
0
=======================

Use Siphon to get NEXRAD Level 3 data from a TDS.
"""
from datetime import datetime

import matplotlib.pyplot as plt
import numpy as np

from siphon.cdmr import Dataset
from siphon.radarserver import get_radarserver_datasets, RadarServer

###########################################
# First, point to the top-level thredds radar server accessor to find what datasets are
# available.
ds = get_radarserver_datasets('http://thredds.ucar.edu/thredds/')
print(list(ds))

###########################################
# Now create an instance of RadarServer to point to the appropriate
# radar server access URL. This is pulled from the catalog reference url.
url = ds['NEXRAD Level III Radar from IDD'].follow().catalog_url
rs = RadarServer(url)

###########################################
# Look at the variables available in this dataset
print(rs.variables)

###########################################
# Create a new query object to help request the data. Using the chaining
# methods, ask for data from radar FTG (Denver) for now for the product
Пример #17
0
 def test_no_trailing(self):
     ds = get_radarserver_datasets('http://thredds.ucar.edu/thredds')
     assert len(ds) == 5