# Path: pymeteo/skewt.py
# def plot_cm1h5(filename, xi, yi, output):
# def plot_wrf(filename, lat, lon, time, output):
# def plot_sounding_data(filename, output):
# def plot_sounding_data_uwyo(filename, output, stationID=0, date=None):
# def plot_sounding_data_csv(filename, output):
# def plot_cm1(path, filename, xi, yi,output):
# def plot_old(x, y, z, time, th, p, qv, u, v, title, output):
# def plot(loc, z, th, p, qv, u, v, output, time = None, title = None):
# def plot_sounding_axes(axes):
# def plot_wind_axes(axes):
# def plot_hodo_axes(axes):
# def plot_legend(axes):
# def plot_wind(axes, z, p, u, v, x=0):  
# def plot_sounding(axes, z, th, p, qv, u = None, v = None):
# def plot_wind_barbs(axes, z, p, u, v):
# def plot_hodograph(axes, z, u, v):
# def calc_sounding_stats(_z, _th, _p, _qv):
# def calc_hodograph_stats(_z, _u, _v):
# def plot_datablock(ax4, _x,_z,_t,_th,_p,_qv,_u,_v, _title):
# def print_3col(name, value, unit, x, y):
# def print_parcel_info(title, pcl, x, y):
# def remove_tick_labels(axes):
# def set_fontscalefactor(newfactor):
# def label(x, y, s, c, r, axes):
# def label_h(x, y, s, c, r, axes):
# def label_h2(x, y, s, c, r, axes):
# def label_m(x, y, s, axes):
# def draw_hodograph(axes, bounds):
# def hodograph_circle(r):
# def draw_wind_line(axes):
# def skew(p):
# def draw_isotherms(axes):
# def draw_isobars(axes):
# def draw_dry_adiabat(axes):
# def draw_moist_adiabat(axes):
# def draw_water_mix_ratio(axes):
# def label_std_heights(axes):
# def TMR(W, p):
#     N = 'N'
#         N = 'S'
#     E = 'E'
#         E = 'W'
#   T = met.T(th,p) - met.T00                          # T (C)
#   T = met.T(_th,_p)                        # T (K)
#         T_1000 = T = T + met.T00
#         T = T_1000
#             T = TMR(W,p/100.) 
#         T = TMR(W,1075.)
#   TMR = 10 ** (0.0498646455 * x + 2.4082965) - 280.23475 + 38.9114 * ((10 ** (0.0915 * x) - 1.2035) ** 2)
# 
# Path: pymeteo/dynamics.py
# def avg_wind(_u, _v, _z, zmin, zmax):
# def storm_motion_rasmussen(_u,_v,_z):
# def storm_motion_bunkers(_u,_v,_z):
# def circulation(u, v, w, x, y, z):
# def integral_Bdz(th, thp, z):
# def integral_dt(i, t):
# def uv_to_deg(u,v):
# def wind_deg_to_uv(direction, speed):
# def shear(_u, _v, _z, zbot, ztop):
# def srh(_u,_v,_z, zbot, ztop, cx, cy):
# def mean_wind(_u,_v,_z, zbot, ztop):
# def brn(_u,_v,_z,cape):
#   C = 0.0
#   C = np.sum(-uavg*dx - vavg*dy - wavg*dz) 
#   C = C * km2m  # C now in units m2/s


from PyQt5 import QtWidgets, QtGui, QtCore
from PyQt5.QtCore import pyqtSlot, pyqtSignal
from pymeteo import skewt
from pymeteo import dynamics
import numpy as np
from __future__ import print_function


# widgets -> skewt wind sounding etc

class StatWidget(QtWidgets.QFrame):

  statsdone = pyqtSignal()


# Path: pymeteo/skewt.py
# def plot_cm1h5(filename, xi, yi, output):
# def plot_wrf(filename, lat, lon, time, output):
# def plot_sounding_data(filename, output):
# def plot_sounding_data_uwyo(filename, output, stationID=0, date=None):
# def plot_sounding_data_csv(filename, output):
# def plot_cm1(path, filename, xi, yi,output):
# def plot_old(x, y, z, time, th, p, qv, u, v, title, output):
# def plot(loc, z, th, p, qv, u, v, output, time = None, title = None):
# def plot_sounding_axes(axes):
# def plot_wind_axes(axes):
# def plot_hodo_axes(axes):
# def plot_legend(axes):
# def plot_wind(axes, z, p, u, v, x=0):  
# def plot_sounding(axes, z, th, p, qv, u = None, v = None):
# def plot_wind_barbs(axes, z, p, u, v):
# def plot_hodograph(axes, z, u, v):
# def calc_sounding_stats(_z, _th, _p, _qv):
# def calc_hodograph_stats(_z, _u, _v):
# def plot_datablock(ax4, _x,_z,_t,_th,_p,_qv,_u,_v, _title):
# def print_3col(name, value, unit, x, y):
# def print_parcel_info(title, pcl, x, y):
# def remove_tick_labels(axes):
# def set_fontscalefactor(newfactor):
# def label(x, y, s, c, r, axes):
# def label_h(x, y, s, c, r, axes):
# def label_h2(x, y, s, c, r, axes):
# def label_m(x, y, s, axes):
# def draw_hodograph(axes, bounds):
# def hodograph_circle(r):
# def draw_wind_line(axes):
# def skew(p):
# def draw_isotherms(axes):
# def draw_isobars(axes):
# def draw_dry_adiabat(axes):
# def draw_moist_adiabat(axes):
# def draw_water_mix_ratio(axes):
# def label_std_heights(axes):
# def TMR(W, p):
#     N = 'N'
#         N = 'S'
#     E = 'E'
#         E = 'W'
#   T = met.T(th,p) - met.T00                          # T (C)
#   T = met.T(_th,_p)                        # T (K)
#         T_1000 = T = T + met.T00
#         T = T_1000
#             T = TMR(W,p/100.) 
#         T = TMR(W,1075.)
#   TMR = 10 ** (0.0498646455 * x + 2.4082965) - 280.23475 + 38.9114 * ((10 ** (0.0915 * x) - 1.2035) ** 2)
# 
# Path: pymeteo/dynamics.py
# def avg_wind(_u, _v, _z, zmin, zmax):
# def storm_motion_rasmussen(_u,_v,_z):
# def storm_motion_bunkers(_u,_v,_z):
# def circulation(u, v, w, x, y, z):
# def integral_Bdz(th, thp, z):
# def integral_dt(i, t):
# def uv_to_deg(u,v):
# def wind_deg_to_uv(direction, speed):
# def shear(_u, _v, _z, zbot, ztop):
# def srh(_u,_v,_z, zbot, ztop, cx, cy):
# def mean_wind(_u,_v,_z, zbot, ztop):
# def brn(_u,_v,_z,cape):
#   C = 0.0
#   C = np.sum(-uavg*dx - vavg*dy - wavg*dz) 
#   C = C * km2m  # C now in units m2/s


# Path: pymeteo/cm1/StatWidget.py
from PyQt5 import QtWidgets, QtGui, QtCore
from PyQt5.QtCore import pyqtSlot, pyqtSignal
from pymeteo import skewt
from pymeteo import dynamics
import numpy as np

from __future__ import print_function


# widgets -> skewt wind sounding etc

class StatWidget(QtWidgets.QFrame):

  statsdone = pyqtSignal()


  def __init__(self, parent=None):