Exemplo n.º 1
0
 def test_trailing(self):
     ds = get_radarserver_datasets('http://thredds.ucar.edu/thredds/')
     assert len(ds) == 5
Exemplo n.º 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)
Exemplo n.º 3
0
 def test_no_trailing(self):
     ds = get_radarserver_datasets('http://thredds.ucar.edu/thredds')
     eq_(len(ds), 5)
Exemplo n.º 4
0
 def test_get_rs_datasets_denied_throws(self):
     get_radarserver_datasets(
         'http://thredds-aws.unidata.ucar.edu/thredds/')
Exemplo n.º 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)
Exemplo n.º 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/')
Exemplo n.º 7
0
 def test_get_rs_datasets_denied_throws(self):
     get_radarserver_datasets('http://thredds-aws.unidata.ucar.edu/thredds/')
Exemplo n.º 8
0
def test_get_rs_datasets_denied_throws():
    with pytest.raises(HTTPError):
        get_radarserver_datasets('http://thredds-aws.unidata.ucar.edu/thredds/')
Exemplo n.º 9
0
 def test_trailing(self):
     ds = get_radarserver_datasets('http://thredds.ucar.edu/thredds/')
     eq_(len(ds), 5)
Exemplo n.º 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)
Exemplo n.º 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/')
Exemplo n.º 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)
Exemplo n.º 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
Exemplo n.º 14
0
def test_get_rs_datasets_denied_throws():
    with pytest.raises(HTTPError):
        get_radarserver_datasets(
            'http://thredds-aws.unidata.ucar.edu/thredds/')
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 17
0
 def test_no_trailing(self):
     ds = get_radarserver_datasets('http://thredds.ucar.edu/thredds')
     assert len(ds) == 5