# Path: pymeteo/data/acars.py
# def getAvailableDatasets():
# def getDataSet(set):
# def getAirportByCode(airport_id):
# def processDataSet(data):
#         _T = nc["temperature"][:]


from PyQt5 import QtWidgets, QtGui, QtCore
from PyQt5.QtCore import pyqtSignal, pyqtSlot
from pymeteo.data import acars
import pymeteo.cm1.PlotWidget as PW
import pymeteo.cm1.StatWidget as SW
        self.profiles.clear()
        self.data = acars.processDataSet(acars.getDataSet(acarsFile)) 
        for profile in self.data:
            desc = self.profileDesc(profile)
            print("[-] Adding profile {0}".format(desc))
            self.profiles.addItem(desc)

    def displayProfile(self, index):
        print("[+] Displaying profile {0}".format(index))
        profile = self.data[index]
        desc = self.profileDesc(profile)
        print("[-] {0}".format(desc))
        self.Sounding.plot_sounding(
            profile["z"],
            profile["th"],
            profile["p"],
            profile["qv"],
            profile["u"],
            profile["v"]
        )
        self.Hodograph.plot_hodograph(
            profile["z"],
            profile["u"],
            profile["v"]
        )


    exportSounding = pyqtSignal(str)

    def export(self):

# Path: pymeteo/data/acars.py
# def getAvailableDatasets():
# def getDataSet(set):
# def getAirportByCode(airport_id):
# def processDataSet(data):
#         _T = nc["temperature"][:]


# Path: pymeteo/UI/acars.py
from PyQt5 import QtWidgets, QtGui, QtCore
from PyQt5.QtCore import pyqtSignal, pyqtSlot
from pymeteo.data import acars
import pymeteo.cm1.PlotWidget as PW
import pymeteo.cm1.StatWidget as SW

        self.profiles.clear()
        self.data = acars.processDataSet(acars.getDataSet(acarsFile)) 
        for profile in self.data:
            desc = self.profileDesc(profile)
            print("[-] Adding profile {0}".format(desc))
            self.profiles.addItem(desc)

    def displayProfile(self, index):
        print("[+] Displaying profile {0}".format(index))
        profile = self.data[index]
        desc = self.profileDesc(profile)
        print("[-] {0}".format(desc))
        self.Sounding.plot_sounding(
            profile["z"],
            profile["th"],
            profile["p"],
            profile["qv"],
            profile["u"],
            profile["v"]
        )
        self.Hodograph.plot_hodograph(
            profile["z"],
            profile["u"],
            profile["v"]
        )


    exportSounding = pyqtSignal(str)

    def export(self):

       self.exportSounding.emit(self.lineEdit.text())