IODA Bundle
test_goes_converter.py
Go to the documentation of this file.
1 #
2 # test_goes_converter.py
3 #
4 # This script is a test driver for the GoesConverter class.
5 #
6 #
7 import sys
8 import time
9 from goes_converter import GoesConverter
10 
11 
12 def test_goes_converter(input_file_paths, latlon_file_path, output_file_path_rf, output_file_path_bt):
13  """
14  Test driver for the GoesConverter class.
15  input_file_paths - a list containing 16 absolute paths corresponding to the output files for each channel of a
16  single GOERS_16 or GOES-17 scan
17  latlon_file_path - The path to an existing Goes LatLon file or if it does not exist the path to write the file
18  output_file_path_rf - The path to write the IODAv2 reflectance factor data file
19  output_file_path_bt - The path to write the IODAv2 brightness temperature data file
20  """
21  goes_converter = GoesConverter(input_file_paths, latlon_file_path, output_file_path_rf, output_file_path_bt)
22  goes_converter.convert()
23 
24 
25 if __name__ == '__main__':
26  start_time = time.time()
27  # input_file_paths should be a comma separated list containing 16 absolute paths corresponding to
28  # the output files for each channel of a single GOES_16 or GOES-17 scan
29  input_file_paths = sys.argv[1].split(',')
30  latlon_file_path = sys.argv[2]
31  output_file_path_rf = sys.argv[3]
32  output_file_path_bt = sys.argv[4]
33  test_goes_converter(input_file_paths, latlon_file_path, output_file_path_rf, output_file_path_bt)
34  elapsed_time = time.time() - start_time
35  print(f'elapsed time:{elapsed_time:.3g}s')
def test_goes_converter(input_file_paths, latlon_file_path, output_file_path_rf, output_file_path_bt)