Exemplo n.º 1
0
def main():

    # parse sounding data
    parser = IgraParser.from_file("ASM00094703-data.txt.zip")

    # outputs general info about parsed data : stations, observations number and date range
    parser.analyze()
Exemplo n.º 2
0
def main():

    # parse sounding data
    parser = IgraParser.from_file("ASM00094703-data.txt.zip")

    # outputs headers of the 5 first soundings
    parser.head()
Exemplo n.º 3
0
def main():

    # parse sounding data
    parser = IgraParser.from_file("ASM00094703-data.txt.zip")

    # for each sounding display a human-readable header followed by the full JSON format
    for sounding in parser.parse():
        print(sounding.header())
        print(sounding.to_json())
Exemplo n.º 4
0
def main():

    start = datetime(1948, 3, 1, tzinfo=timezone.utc)
    end = datetime(1948, 4, 1, tzinfo=timezone.utc)

    # filters soundings observed on 1948, March
    parser = IgraParser.from_file("ASM00094703-data.txt.zip",
                                  lambda x: start <= x.obstime <= end)

    for sounding in parser.parse():
        print(sounding.header())
Exemplo n.º 5
0
def main():
    # Australia bounding box
    australia: Polygon = box(113.338953078, -43.6345972634, 153.569469029,
                             -10.6681857235)

    # filters soundings matching the given area
    parser = IgraParser.from_file(
        "ASM00094703-data.txt.zip",
        f_match=lambda x: shape(x.location).within(australia))

    for sounding in parser.parse():
        print(sounding.header())