Beispiel #1
0
def test_debug_info_all_disabled():
    modules = ['numpy', 'scipy', 'matplotlib', 'netCDF4', 'cylp', 'glpk',
               'cvxopt', 'mpl_toolkits', 'nose', 'pyart', 'platform']
    for module in modules:
        if module in sys.modules:
            del sys.modules[module]
    fail_loader = DisableModules(modules)
    sys.meta_path.append(fail_loader)
    with warnings.catch_warnings():
        warnings.simplefilter('ignore')
        # test to see that something is written when _debug_info is called
        # we don't care what is written, just that something is.
        buf = StringIO()
        pyart._debug_info(buf)
        assert len(buf.getvalue()) > 0
Beispiel #2
0
def test_debug_stdout():
    # lack of error is assumed to mean that call succeed
    pyart._debug_info()
Beispiel #3
0
def test_debug_info():
    # test to see that something is written when _debug_info is called
    # we don't care what is written, just that something is.
    buf = StringIO()
    pyart._debug_info(buf)
    assert len(buf.getvalue()) > 0
Beispiel #4
0
def test_debug_stdout():
    # lack of error is assumed to mean that call succeed
    pyart._debug_info()
Beispiel #5
0
def test_debug_info():
    # test to see that something is written when _debug_info is called
    # we don't care what is written, just that something is.
    buf = StringIO()
    pyart._debug_info(buf)
    assert len(buf.getvalue()) > 0
Beispiel #6
0
from time import time
from pyart.core.transforms import antenna_to_cartesian
import sys
from csu_radartools import (csu_fhc, csu_liquid_ice_mass, csu_blended_rain, 
                            csu_dsd, csu_kdp, csu_misc)
from cut_sails import cut_sails
from skewt import SkewT

#sys.exit()

#Check to make sure that pyart imported correctly (especially if you are concerned about the error)
if hasattr(pyart.graph, 'RadarMapDisplay'):
    print("Py-ART is ready")
else:
    print("ISSUES\n\nMissing\Broken Basemap\n")
    pyart._debug_info()

#==============================================================================
#Gridding flags
#==============================================================================
vert = 1
shy = 0

#==============================================================================
#Read in data
#==============================================================================
files = glob.glob('/Users/kurtispinkney/Desktop/MastersThesis/radar_data/2016/*')
#files = glob.glob('/Users/kurtispinkney/Desktop/MastersThesis/radar_data/2014/KHTX20120519_000129_V06.gz')

#loop through all radar files
for radar_file in files: