From 3d3172c00d4c520cf7133e5ecfc5611609ad0261 Mon Sep 17 00:00:00 2001 From: ctena Date: Mon, 20 Feb 2023 11:05:26 +0100 Subject: [PATCH] Updated tests --- tests/2.2-test_create_shapefile.py | 10 +++++----- tests/2.3-test_bounds.py | 8 ++++---- tests/2.4-test_cell_area.py | 8 ++++---- tests/3.1-test_vertical_interp.py | 2 +- tests/4.1-test_daily_stats.py | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/2.2-test_create_shapefile.py b/tests/2.2-test_create_shapefile.py index 75331cd..d41b593 100644 --- a/tests/2.2-test_create_shapefile.py +++ b/tests/2.2-test_create_shapefile.py @@ -13,7 +13,7 @@ size = comm.Get_size() parallel_method = 'Y' -result_path = "Times_test_2.2_read_write_projection_{0}_{1:03d}.csv".format(parallel_method, size) +result_path = "Times_test_2.2_create_shapefile_{0}_{1:03d}.csv".format(parallel_method, size) result = pd.DataFrame(index=['read', 'calculate'], columns=['2.2.1.Existing', '2.2.2.New_Regular', '2.2.3.New_Rotated', '2.2.4.New_LCC', '2.2.5.New_Mercator']) @@ -22,7 +22,7 @@ result = pd.DataFrame(index=['read', 'calculate'], # ===================================== CREATE SHAPEFILE FROM EXISTING GRID ========================================== # ====================================================================================================================== -test_name = '2-2.1.Existing' +test_name = '2.2.1.Existing' if rank == 0: print(test_name) @@ -57,7 +57,7 @@ sys.stdout.flush() # ===================================== CREATE SHAPEFILE FROM NEW REGULAR GRID ======================================= # ====================================================================================================================== -test_name = '2-2.2.New_Regular' +test_name = '2.2.2.New_Regular' if rank == 0: print(test_name) @@ -91,7 +91,7 @@ sys.stdout.flush() # ===================================== CREATE SHAPEFILE FROM NEW ROTATED GRID ======================================= # ====================================================================================================================== -test_name = '2-2.3.New_Rotated' +test_name = '2.2.3.New_Rotated' if rank == 0: print(test_name) @@ -126,7 +126,7 @@ sys.stdout.flush() # ===================================== CREATE SHAPEFILE FROM NEW LCC GRID =========================================== # ====================================================================================================================== -test_name = '2-2.4.New_LCC' +test_name = '2.2.4.New_LCC' if rank == 0: print(test_name) diff --git a/tests/2.3-test_bounds.py b/tests/2.3-test_bounds.py index b1e33d7..3bee2ed 100644 --- a/tests/2.3-test_bounds.py +++ b/tests/2.3-test_bounds.py @@ -12,7 +12,7 @@ size = comm.Get_size() parallel_method = 'Y' -result_path = "Times_test_2-3_bounds_{0}_{1:03d}.csv".format(parallel_method, size) +result_path = "Times_test_2.3_bounds_{0}_{1:03d}.csv".format(parallel_method, size) result = pd.DataFrame(index=['read', 'calculate', 'write'], columns=['2.3.1.With_bounds', '2.3.2.Without_bounds', "2.3.3.Create_new"]) @@ -20,7 +20,7 @@ result = pd.DataFrame(index=['read', 'calculate', 'write'], # ===================================== FILE WITH EXISTING BOUNDS ==================================================== # ====================================================================================================================== -test_name = "2-3.1.With_bounds" +test_name = "2.3.1.With_bounds" if rank == 0: print(test_name) @@ -63,7 +63,7 @@ sys.stdout.flush() # =================================== FILE WITHOUT EXISTING BOUNDS =================================================== # ====================================================================================================================== -test_name = '2-3.2.Without_bounds' +test_name = '2.3.2.Without_bounds' if rank == 0: print(test_name) @@ -107,7 +107,7 @@ sys.stdout.flush() # ==================================== CREATE NES REGULAR LAT-LON ==================================================== # ====================================================================================================================== -test_name = "2-3.3.Create_new" +test_name = "2.3.3.Create_new" if rank == 0: print(test_name) diff --git a/tests/2.4-test_cell_area.py b/tests/2.4-test_cell_area.py index 238b95f..4c9b152 100644 --- a/tests/2.4-test_cell_area.py +++ b/tests/2.4-test_cell_area.py @@ -21,7 +21,7 @@ result = pd.DataFrame(index=['read', 'calculate', 'write'], # ===================================== CALCULATE CELLS AREA FROM NEW GRID =========================================== # ====================================================================================================================== -test_name = "2-4.1.New_file_grid_area" +test_name = "2.4.1.New_file_grid_area" if rank == 0: print(test_name) @@ -75,7 +75,7 @@ del nessy # ===================================== CALCULATE CELLS AREA FROM GEOMETRIES ========================================= # ====================================================================================================================== -test_name = "2-4.2.New_file_geometry_area" +test_name = "2.4.2.New_file_geometry_area" if rank == 0: print(test_name) @@ -117,7 +117,7 @@ sys.stdout.flush() # ===================================== CALCULATE CELLS AREA FROM EXISTING GRID ====================================== # ====================================================================================================================== -test_name = '2-4.3.Existing_file_grid_area' +test_name = '2.4.3.Existing_file_grid_area' if rank == 0: print(test_name) @@ -159,7 +159,7 @@ del nessy # ===================================== CALCULATE CELLS AREA FROM GEOMETRIES FROM EXISTING GRID ====================== # ====================================================================================================================== -test_name = '2-4.4.Existing_file_geometry_area' +test_name = '2.4.4.Existing_file_geometry_area' if rank == 0: print(test_name) diff --git a/tests/3.1-test_vertical_interp.py b/tests/3.1-test_vertical_interp.py index 494fa04..d7bcfed 100644 --- a/tests/3.1-test_vertical_interp.py +++ b/tests/3.1-test_vertical_interp.py @@ -45,7 +45,7 @@ result.loc['read', test_name] = timeit.default_timer() - st_time # INTERPOLATE st_time = timeit.default_timer() source_data.vertical_var_name = 'mid_layer_height_agl' -level_list = [0.,50.,100.,250.,500.,750.,1000.,2000.,3000.,5000.] +level_list = [0., 50., 100., 250., 500., 750., 1000., 2000., 3000., 5000.] interp_nes = source_data.interpolate_vertical(level_list, info=True, kind='linear', extrapolate=None) comm.Barrier() result.loc['calculate', test_name] = timeit.default_timer() - st_time diff --git a/tests/4.1-test_daily_stats.py b/tests/4.1-test_daily_stats.py index fa384f5..dd00407 100644 --- a/tests/4.1-test_daily_stats.py +++ b/tests/4.1-test_daily_stats.py @@ -20,7 +20,7 @@ result = pd.DataFrame(index=['read', 'calculate', 'write'], # ================================================== CALCULATE MEAN ================================================== # ====================================================================================================================== -test_name = '4-1.1.Mean' +test_name = '4.1.1.Mean' if rank == 0: print(test_name) -- GitLab