diff --git a/test/test_um2netcdf.py b/test/test_um2netcdf.py index 3fee38b..3acb190 100644 --- a/test/test_um2netcdf.py +++ b/test/test_um2netcdf.py @@ -759,7 +759,7 @@ def test_fix_plevs_no_pressure_coord(get_fake_cube_coords): with pytest.raises(iris.exceptions.CoordinateNotFoundError): cube.coord("pressure") # ensure missing 'pressure' coord - um2nc.fix_plevs(cube) # should just exit + um2nc.fix_pressure_levels(cube) # should just exit def _add_attrs_points(m_plevs: mock.MagicMock, points): @@ -775,7 +775,7 @@ def test_fix_plevs_do_rounding(get_fake_cube_coords): extra = {"pressure": m_plevs} cube = get_fake_cube_coords(extra) - um2nc.fix_plevs(cube) + um2nc.fix_pressure_levels(cube) # TODO: test flaw, this verifies pressure coord but ignores fix_plevs() # returning a new cube if the pressure is reversed. This is verified @@ -792,7 +792,7 @@ def test_fix_plevs_reverse_pressure(get_fake_cube_coords): cube = get_fake_cube_coords(extra) with mock.patch("iris.util.reverse"): - um2nc.fix_plevs(cube) + um2nc.fix_pressure_levels(cube) # TODO: test flaw, this verifies pressure coord but ignores fix_plevs() # returning a new cube if the pressure is reversed. This is verified diff --git a/umpost/um2netcdf.py b/umpost/um2netcdf.py index 774bf44..f59e750 100644 --- a/umpost/um2netcdf.py +++ b/umpost/um2netcdf.py @@ -148,7 +148,7 @@ def _add_coord_bounds(coord): # TODO: split cube ops into functions, this will likely increase process() workflow steps def cubewrite(cube, sman, compression, use64bit, verbose): # TODO: move into process() AND if a new cube is returned, swap into filtered cube list - cube = fix_plevs(cube) or cube # NB: use new cube if pressure points are modified + cube = fix_pressure_levels(cube) or cube # NB: use new cube if pressure points are modified if not use64bit: if cube.data.dtype == 'float64': @@ -727,7 +727,7 @@ def fix_level_coord(cube, z_rho, z_theta, tol=1e-6): c_sigma.var_name = 'sigma_theta' -def fix_plevs(cube, decimals=5): +def fix_pressure_levels(cube, decimals=5): """ Reformat pressure level data for NetCDF output.