def test_height_flight_level(self):
     data = 'Z = 50.00000 FL'
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units='unknown', points=50.0, bounds=None,
         standard_name=None, long_name='flight_level')
     self.assertEqual(com, res)
 def test_height_above_sea_level(self):
     data = 'Z = 50.00000 m asl'
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units='m', points=50.0, bounds=None,
         standard_name='altitude', long_name='altitude above sea level')
     self.assertEqual(com, res)
 def test_height_above_ground(self):
     data = 'Z = 50.00000 m agl'
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units='m', points=50.0, bounds=None,
         standard_name='height', long_name='height above ground level')
     self.assertEqual(com, res)
Ejemplo n.º 4
0
 def test_bounded_flight_level(self):
     data = 'From FL0 - FL100'
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units='unknown', points=50.0, bounds=np.array([0., 100.]),
         standard_name=None, long_name='flight_level')
     self.assertEqual(com, res)
Ejemplo n.º 5
0
 def test_malformed_flight_level(self):
     # Parse height above ground level with additional stuff on the end of
     # the string (agl).
     data = 'From FL0 - FL100 and stuff'
     res = _cf_height_from_name(data)
     com = self._default_coord(data)
     self.assertEqual(com, res)
Ejemplo n.º 6
0
 def test_height_above_sea_level(self):
     data = 'Z = 50.00000 m asl'
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units='m', points=50.0, bounds=None,
         standard_name='altitude', long_name='altitude above sea level')
     self.assertEqual(com, res)
Ejemplo n.º 7
0
 def test_height_flight_level(self):
     data = 'Z = 50.00000 FL'
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units='unknown', points=50.0, bounds=None,
         standard_name=None, long_name='flight_level')
     self.assertEqual(com, res)
Ejemplo n.º 8
0
 def test_no_match(self):
     # Parse height information when there is no match.
     # No interpretation, just returns default values.
     data = 'Vertical integral'
     res = _cf_height_from_name(data)
     com = self._default_coord(data)
     self.assertEqual(com, res)
 def test_bounded_height_above_ground(self):
     data = 'From     0 -   100m agl'
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units='m', points=50.0, bounds=np.array([0., 100.]),
         standard_name='height', long_name='height above ground level')
     self.assertEqual(com, res)
Ejemplo n.º 10
0
 def test_height_above_ground(self):
     data = 'Z = 50.00000 m agl'
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units='m', points=50.0, bounds=None,
         standard_name='height', long_name='height above ground level')
     self.assertEqual(com, res)
Ejemplo n.º 11
0
 def test_bounded_height_above_ground(self):
     data = 'From     0 -   100m agl'
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units='m', points=50.0, bounds=np.array([0., 100.]),
         standard_name='height', long_name='height above ground level')
     self.assertEqual(com, res)
Ejemplo n.º 12
0
 def test_malformed_flight_level(self):
     # Parse height above ground level with additional stuff on the end of
     # the string (agl).
     data = 'From FL0 - FL100 and stuff'
     res = _cf_height_from_name(data)
     com = self._default_coord(data)
     self.assertEqual(com, res)
Ejemplo n.º 13
0
 def test_bounded_height_above_sea_level(self):
     data = 'From     0 -   100m asl'
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units='m', points=50.0, bounds=np.array([0., 100.]),
         standard_name='altitude', long_name='altitude above sea level')
     self.assertEqual(com, res)
Ejemplo n.º 14
0
 def test_malformed_height_above_sea_level(self):
     # Parse height above ground level, with additional stuff at string
     # end (agl).
     data = 'Z = 50.00000 m asl and stuff'
     res = _cf_height_from_name(data)
     com = self._default_coord(data)
     self.assertEqual(com, res)
Ejemplo n.º 15
0
 def test_no_match(self):
     # Parse height information when there is no match.
     # No interpretation, just returns default values.
     data = 'Vertical integral'
     res = _cf_height_from_name(data)
     com = self._default_coord(data)
     self.assertEqual(com, res)
Ejemplo n.º 16
0
 def test_malformed_flight_level(self):
     # Parse height above ground level (agl), with additional stuff at
     # string end.
     data = 'Z = 50.00000 FL and stuff'
     res = _cf_height_from_name(data)
     com = self._default_coord(data)
     self.assertEqual(com, res)
 def test_bounded_height_above_sea_level(self):
     data = 'From     0 -   100m asl'
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units='m', points=50.0, bounds=np.array([0., 100.]),
         standard_name='altitude', long_name='altitude above sea level')
     self.assertEqual(com, res)
 def test_bounded_flight_level(self):
     data = 'From FL0 - FL100'
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units='unknown', points=50.0, bounds=np.array([0., 100.]),
         standard_name=None, long_name='flight_level')
     self.assertEqual(com, res)
Ejemplo n.º 19
0
 def test_malformed_height_above_sea_level(self):
     # Parse height above ground level with additional stuff on the end of
     # the string (agl).
     data = "From     0 -   100m asl and stuff"
     res = _cf_height_from_name(data)
     com = self._default_coord(data)
     self.assertEqual(com, res)
Ejemplo n.º 20
0
 def test_malformed_flight_level(self):
     # Parse height above ground level (agl), with additional stuff at
     # string end.
     data = 'Z = 50.00000 FL and stuff'
     res = _cf_height_from_name(data)
     com = self._default_coord(data)
     self.assertEqual(com, res)
Ejemplo n.º 21
0
 def test_malformed_height_above_sea_level(self):
     # Parse height above ground level, with additional stuff at string
     # end (agl).
     data = 'Z = 50.00000 m asl and stuff'
     res = _cf_height_from_name(data)
     com = self._default_coord(data)
     self.assertEqual(com, res)
Ejemplo n.º 22
0
 def test_float_bounded_height_flight_level(self):
     # Parse height above ground level, as a float (agl).
     data = 'From FL0.0 - FL100.0'
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units='unknown', points=50.0, bounds=np.array([0., 100.]),
         standard_name=None, long_name='flight_level')
     self.assertEqual(com, res)
 def test_integer_height_above_sea_level(self):
     # Parse height above sea level (agl) when its an integer.
     data = 'Z = 50 m asl'
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units='m', points=50.0, bounds=None,
         standard_name='altitude', long_name=None)
     self.assertEqual(com, res)
 def test_pressure(self):
     # Parse air_pressure string.
     data = 'From     0 -   100 Pa'
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units='Pa', points=50.0, bounds=np.array([0., 100.]),
         standard_name='air_pressure', long_name=None)
     self.assertEqual(com, res)
 def test_float_bounded_height_above_sea_level(self):
     # Parse height above ground level as a float (agl).
     data = 'From     0.0 -   100.0m asl'
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units='m', points=50.0, bounds=np.array([0., 100.]),
         standard_name='altitude', long_name=None)
     self.assertEqual(com, res)
Ejemplo n.º 26
0
 def test_enotation_height_above_sea_level(self):
     # Parse height above sea level expressed in scientific notation
     data = 'Z = 0.0000000E+00 m asl'
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units='m', points=0.0, bounds=None,
         standard_name='altitude', long_name='altitude above sea level')
     self.assertEqual(com, res)
Ejemplo n.º 27
0
 def test_enotation_height_above_ground(self):
     # Parse height above ground expressed in scientific notation
     data = 'Z = 0.0000000E+00 m agl'
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units='m', points=0.0, bounds=None,
         standard_name='height', long_name='height above ground level')
     self.assertEqual(com, res)
Ejemplo n.º 28
0
 def test_pressure(self):
     # Parse air_pressure string.
     data = 'From     0 -   100 Pa'
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units='Pa', points=50.0, bounds=np.array([0., 100.]),
         standard_name='air_pressure', long_name=None)
     self.assertEqual(com, res)
 def test_pressure(self):
     # Parse pressure.
     data = 'Z = 50.00000 Pa'
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units='Pa', points=50.0, bounds=None,
         standard_name='air_pressure', long_name=None)
     self.assertEqual(com, res)
 def test_integer_height_above_ground(self):
     # Parse height above ground level when its an integer.
     data = 'Z = 50 m agl'
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units='m', points=50.0, bounds=None,
         standard_name='height', long_name=None)
     self.assertEqual(com, res)
Ejemplo n.º 31
0
 def test_pressure(self):
     # Parse pressure.
     data = 'Z = 50.00000 Pa'
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units='Pa', points=50.0, bounds=None,
         standard_name='air_pressure', long_name=None)
     self.assertEqual(com, res)
 def test_float_bounded_height_flight_level(self):
     # Parse height above ground level, as a float (agl).
     data = 'From FL0.0 - FL100.0'
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units='unknown', points=50.0, bounds=np.array([0., 100.]),
         standard_name=None, long_name='flight_level')
     self.assertEqual(com, res)
Ejemplo n.º 33
0
 def test_enotation_height_above_ground(self):
     # Parse height above ground expressed in scientific notation
     data = 'Z = 0.0000000E+00 m agl'
     res = _cf_height_from_name(data)
     com = AuxCoord(units='m',
                    points=0.0,
                    bounds=None,
                    standard_name='height',
                    long_name='height above ground level')
     self.assertEqual(com, res)
Ejemplo n.º 34
0
 def test_integer_height_above_sea_level(self):
     # Parse height above sea level (agl) when its an integer.
     data = 'Z = 50 m asl'
     res = _cf_height_from_name(data)
     com = AuxCoord(units='m',
                    points=50.0,
                    bounds=None,
                    standard_name='altitude',
                    long_name=None)
     self.assertEqual(com, res)
Ejemplo n.º 35
0
 def test_enotation_height_above_sea_level(self):
     # Parse height above sea level expressed in scientific notation
     data = 'Z = 0.0000000E+00 m asl'
     res = _cf_height_from_name(data)
     com = AuxCoord(units='m',
                    points=0.0,
                    bounds=None,
                    standard_name='altitude',
                    long_name='altitude above sea level')
     self.assertEqual(com, res)
Ejemplo n.º 36
0
 def test_integer_height_above_ground(self):
     # Parse height above ground level when its an integer.
     data = 'Z = 50 m agl'
     res = _cf_height_from_name(data)
     com = AuxCoord(units='m',
                    points=50.0,
                    bounds=None,
                    standard_name='height',
                    long_name=None)
     self.assertEqual(com, res)
Ejemplo n.º 37
0
 def test_float_bounded_height_above_sea_level(self):
     # Parse height above ground level as a float (agl).
     data = 'From     0.0 -   100.0m asl'
     res = _cf_height_from_name(data)
     com = AuxCoord(units='m',
                    points=50.0,
                    bounds=np.array([0., 100.]),
                    standard_name='altitude',
                    long_name=None)
     self.assertEqual(com, res)
Ejemplo n.º 38
0
 def test_bounded_height_above_sea_level(self):
     data = "From     0 -   100m asl"
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units="m",
         points=50.0,
         bounds=np.array([0.0, 100.0]),
         standard_name="altitude",
         long_name="altitude above sea level",
     )
     self.assertEqual(com, res)
Ejemplo n.º 39
0
 def test_height_above_ground(self):
     data = "Z = 50.00000 m agl"
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units="m",
         points=50.0,
         bounds=None,
         standard_name="height",
         long_name="height above ground level",
     )
     self.assertEqual(com, res)
Ejemplo n.º 40
0
 def test_bounded_flight_level(self):
     data = "From FL0 - FL100"
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units="unknown",
         points=50.0,
         bounds=np.array([0.0, 100.0]),
         standard_name=None,
         long_name="flight_level",
     )
     self.assertEqual(com, res)
Ejemplo n.º 41
0
 def test_height_flight_level(self):
     data = "Z = 50.00000 FL"
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units="unknown",
         points=50.0,
         bounds=None,
         standard_name=None,
         long_name="flight_level",
     )
     self.assertEqual(com, res)
Ejemplo n.º 42
0
 def test_height_above_sea_level(self):
     data = "Z = 50.00000 m asl"
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units="m",
         points=50.0,
         bounds=None,
         standard_name="altitude",
         long_name="altitude above sea level",
     )
     self.assertEqual(com, res)
Ejemplo n.º 43
0
 def test_bounded_height_above_ground(self):
     data = "From     0 -   100m agl"
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units="m",
         points=50.0,
         bounds=np.array([0.0, 100.0]),
         standard_name="height",
         long_name="height above ground level",
     )
     self.assertEqual(com, res)
Ejemplo n.º 44
0
 def test_pressure(self):
     # Parse air_pressure string.
     data = "From     0 -   100 Pa"
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units="Pa",
         points=50.0,
         bounds=np.array([0.0, 100.0]),
         standard_name="air_pressure",
         long_name=None,
     )
     self.assertEqual(com, res)
Ejemplo n.º 45
0
 def test_pressure(self):
     # Parse pressure.
     data = "Z = 50.00000 Pa"
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units="Pa",
         points=50.0,
         bounds=None,
         standard_name="air_pressure",
         long_name=None,
     )
     self.assertEqual(com, res)
Ejemplo n.º 46
0
 def test_integer_height_flight_level(self):
     # Parse flight level when its an integer.
     data = "Z = 50 FL"
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units="unknown",
         points=50.0,
         bounds=None,
         standard_name=None,
         long_name="flight_level",
         attributes={"positive": "up"},
     )
     self.assertEqual(com, res)
Ejemplo n.º 47
0
 def test_integer_height_above_sea_level(self):
     # Parse height above sea level (asl) when its an integer.
     data = "Z = 50 m asl"
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units="m",
         points=50.0,
         bounds=None,
         standard_name="altitude",
         long_name="altitude above sea level",
         attributes={"positive": "up"},
     )
     self.assertEqual(com, res)
Ejemplo n.º 48
0
 def test_enotation_height_above_sea_level(self):
     # Parse height above sea level expressed in scientific notation
     data = "Z = 0.0000000E+00 m asl"
     res = _cf_height_from_name(data)
     com = AuxCoord(
         units="m",
         points=0.0,
         bounds=None,
         standard_name="altitude",
         long_name="altitude above sea level",
         attributes={"positive": "up"},
     )
     self.assertEqual(com, res)