Example #1
0
 def test_time_axis_given_time_pressure_lon_lat_dimensions(self):
     with netCDF4.Dataset(self.path, "w") as dataset:
         um = tutorial.UM(dataset)
         dims = ("time_1", "pressure_0", "longitude", "latitude")
         for dim in dims:
             dataset.createDimension(dim, 1)
         var = um.relative_humidity(dims)
     result = disk.time_axis(self.path, "relative_humidity")
     expect = 0
     self.assertEqual(expect, result)
Example #2
0
 def test_time_axis_given_dim0_format(self):
     coordinates = "forecast_period_1 forecast_reference_time pressure time"
     with netCDF4.Dataset(self.path, "w") as dataset:
         um = tutorial.UM(dataset)
         dims = ("dim0", "longitude", "latitude")
         for dim in dims:
             dataset.createDimension(dim, 1)
         var = um.relative_humidity(dims, coordinates=coordinates)
     result = disk.time_axis(self.path, "relative_humidity")
     expect = 0
     self.assertEqual(expect, result)