Пример #1
0
def test_level_success_2_1():
    line = "21 -9999 101300B-9999    46B-9999    39   120    15"
    expected = Sounding.Level(
        major=LevelType.Major.OTHER,
        minor=LevelType.Minor.SURFACE,
        elapsed=(None, QualityFlag.MISSING),
        pressure=(101300, QualityFlag.PASSED),
        height=(None, QualityFlag.UNCHECKED),
        temperature=(4.6, QualityFlag.PASSED),
        humidity=(None, QualityFlag.MISSING),
        dewpoint=(3.9, QualityFlag.PASSED),
        winddir=(120, QualityFlag.PASSED),
        windspeed=(1.5, QualityFlag.PASSED)
    )
    level = IgraParser.parse_level(line)
    assert level == expected
Пример #2
0
def test_level_success_2_3():
    line = "20 -9999 100700 -9999    82B-9999    39 -9999 -9999"
    expected = Sounding.Level(
        major=LevelType.Major.OTHER,
        minor=LevelType.Minor.OTHER,
        elapsed=(None, QualityFlag.MISSING),
        pressure=(100700, QualityFlag.UNCHECKED),
        height=(None, QualityFlag.UNCHECKED),
        temperature=(8.2, QualityFlag.PASSED),
        humidity=(None, QualityFlag.MISSING),
        dewpoint=(3.9, QualityFlag.PASSED),
        winddir=(None, QualityFlag.MISSING),
        windspeed=(None, QualityFlag.MISSING)
    )
    level = IgraParser.parse_level(line)
    assert level == expected
Пример #3
0
def test_level_success_1_2():
    line = "20 -9999 101600A-9999    66B-9999    60 -9999 -9999"
    expected = Sounding.Level(
        major=LevelType.Major.OTHER,
        minor=LevelType.Minor.OTHER,
        elapsed=(None, QualityFlag.MISSING),
        pressure=(101600, QualityFlag.TIERS1),
        height=(None, QualityFlag.UNCHECKED),
        temperature=(6.6, QualityFlag.PASSED),
        humidity=(None, QualityFlag.MISSING),
        dewpoint=(6.0, QualityFlag.PASSED),
        winddir=(None, QualityFlag.MISSING),
        windspeed=(None, QualityFlag.MISSING)
    )
    level = IgraParser.parse_level(line)
    assert level == expected