Esempio n. 1
0
    process_version = "1.0E"
    vapname = "mmcg"
    site = "sgp"
    facility = "I7"
    level = "c0"
    ncfile = sys.argv[1]
    odir = sys.argv[2]
    cf_alt = 320.0 / 1000.0
    cf_lat = dms_to_d([36.0, 36.0, 18.35])
    cf_lon = -1.0*dms_to_d([97.0, 29.0, 10.69])
    #mync=netCDF4.Dataset(ncfile)
    #myradar=radar.Radar(mync)
    myradar = pyart.io.read_netcdf(ncfile)
    print myradar.time['data'][0]
    cp = corner_to_point([myradar.location['latitude']['data'],
                          myradar.location['longitude']['data']],
                         [cf_lat, cf_lon])
    #mync.close()
    mygrids = grid.pyGrid(
        (myradar,), nxyz=(241, 241, 35),
        xyzr=((-120000 - cp[0], 120000 - cp[0]),
             (-120000 - cp[1], 120000 - cp[1]),
             (0, 17000)),
        params=['reflectivity_horizontal'],
        toa=20000, origin=[cf_lat, cf_lon, cf_alt], qrf=my_qrf)

    # plot for testing...
    refl = mygrids.fields['reflectivity_horizontal']['data']
    refl = np.ma.masked_equal(refl, -9999.0)
    fig = plt.figure()
    ax = fig.add_subplot(111)
Esempio n. 2
0
    process_version = "1.0E"
    vapname = "mmcg"
    site = "sgp"
    facility = "I7"
    level = "c0"
    ncfile = sys.argv[1]
    odir = sys.argv[2]
    cf_alt = 320.0 / 1000.0
    cf_lat = dms_to_d([36.0, 36.0, 18.35])
    cf_lon = -1.0 * dms_to_d([97.0, 29.0, 10.69])
    #mync=netCDF4.Dataset(ncfile)
    #myradar=radar.Radar(mync)
    myradar = pyart.io.read_netcdf(ncfile)
    print myradar.time['data'][0]
    cp = corner_to_point([
        myradar.location['latitude']['data'],
        myradar.location['longitude']['data']
    ], [cf_lat, cf_lon])
    #mync.close()
    mygrids = grid.pyGrid((myradar, ),
                          nxyz=(241, 241, 35),
                          xyzr=((-120000 - cp[0], 120000 - cp[0]),
                                (-120000 - cp[1], 120000 - cp[1]), (0, 17000)),
                          params=['reflectivity_horizontal'],
                          toa=20000,
                          origin=[cf_lat, cf_lon, cf_alt],
                          qrf=my_qrf)

    # plot for testing...
    refl = mygrids.fields['reflectivity_horizontal']['data']
    refl = np.ma.masked_equal(refl, -9999.0)
    fig = plt.figure()
Esempio n. 3
0
import vispy
import vispy.app
# from vispy.scene.widgets import ViewBox
from vispy.scene.visuals import Mesh
from vispy.scene.visuals import Text
from vispy.geometry import MeshData
from vispy.scene import STTransform, MatrixTransform, ChainTransform

from matplotlib.cm import ScalarMappable
from matplotlib.colors import Normalize

import glob

loc_ka = (33.73732, -101.84326)
loc_88d = (33.654140472412109, -101.81416320800781)
dx_ka, dy_ka = corner_to_point(loc_ka, loc_88d) #meters

#-------------------
# Selection of interesting times
#-------------------

# filenames = glob.glob('/data/20140607/Ka2/Ka2140608031*')#[5:10]
# filenames_88d = glob.glob('/data/20140607/88D/KLBB20140608_031*')
# t_start = datetime.datetime(2014,6,8,3,16,29)

# filenames = glob.glob('/data/20140607/Ka2/Ka2140608033*')#[5:10]
# filenames_88d = glob.glob('/data/20140607/88D/KLBB20140608_033*')
# t_start = datetime.datetime(2014,6,8,3,39,05)