diff --git a/mvcm/main_tests_only.py b/mvcm/main_tests_only.py index f68660e621c97cf4fb062732f9c8bcfbc2a9ab4c..517bc45285739c7ceeeac06340a8473e95eabfc1 100644 --- a/mvcm/main_tests_only.py +++ b/mvcm/main_tests_only.py @@ -264,6 +264,7 @@ def main( cmin = np.minimum( np.power(cmin_g1 * cmin_g2 * cmin_g3 * cmin_g4 * cmin_g5, 1 / utils.group_count(qabit)), cmin, + dtype=np.float32, ) # cmin_3d[i, :, :] = cmin # cmin_3d = np.minimum(cmin_3d, cmin) @@ -408,7 +409,7 @@ def main( # cmin, # bits['r06'])[idx] - cmin_final = cmin + csc = cmin # bits translation MVCM-python -> MVCM-C # 01 13 test_11um @@ -423,12 +424,12 @@ def main( # 15 16 test_1_38um_high_clouds # 16 17 thin_cirrus_4_12um_BTD_test - csc = cmin_final integer_cloud_mask = np.zeros(csc.shape, dtype=np.byte) integer_cloud_mask[csc > 0.99] = 3 integer_cloud_mask[(csc <= 0.99) & (csc > 0.95)] = 2 integer_cloud_mask[(csc <= 0.95) & (csc > 0.66)] = 1 integer_cloud_mask[csc <= 0.66] = 0 + integer_cloud_mask = integer_cloud_mask.astype(np.int8) # logger.debug(f"Memory: {tracemalloc.get_traced_memory()}") cloud_mask = np.zeros((6, csc.shape[0], csc.shape[1]), dtype=np.byte) @@ -442,7 +443,7 @@ def main( "sensor_azimuth": {"dims": ("x", "y"), "data": viirs_data.sensor_azimuth.values}, "solar_zenith": {"dims": ("x", "y"), "data": viirs_data.solar_zenith.values}, "solar_azimuth": {"dims": ("x", "y"), "data": viirs_data.solar_azimuth.values}, - "confidence": {"dims": ("x", "y"), "data": cmin_final}, + "confidence": {"dims": ("x", "y"), "data": csc}, "cloud_mask": {"dims": ("bits", "x", "y"), "data": cloud_mask}, "quality_assurance": {"dims": ("x", "y", "qa"), "data": quality_assurance}, "integer_cloud_mask": {"dims": ("x", "y"), "data": integer_cloud_mask},