Skip to content

Commit

Permalink
#2474 Removed the convertion option
Browse files Browse the repository at this point in the history
  • Loading branch information
Howard Soh committed Apr 14, 2023
1 parent 3f09e21 commit d4c8844
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions scripts/python/examples/read_ascii_point.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import sys

from met.point import met_point_tools as tools
from met.point import met_point_tools

########################################################################

Expand All @@ -17,14 +17,7 @@
print("ERROR: read_ascii_point.py -> Missing an input file.")
sys.exit(1)

do_convert = False
last_index = 2
if arg_cnt > last_index:
opt_convert = sys.argv[2]
if opt_convert.lower() == "do_convert" or opt_convert.lower() == "convert":
do_convert = True
last_index += 1

if last_index < arg_cnt:
print(" INFO: read_ascii_point.py -> Too many argument, ignored {o}.".format(
o=' '.join(sys.argv[last_index:])))
Expand All @@ -48,13 +41,9 @@
# (11) numeric: Observation_Value

# Read 11 column text input data by using pandas package
point_data = tools.read_text_point_obs(input_file)
point_data = met_point_tools.read_text_point_obs(input_file)
print(" point_data: Data Length:\t" + repr(len(point_data)))
print(" point_data: Data Type:\t" + repr(type(point_data)))
if do_convert:
# Convert 11 column list to MET's internal python instance
met_point_data = tools.convert_point_data(point_data)
print(" met_point_data: Data Type:\t" + repr(type(met_point_data)))
except FileNotFoundError:
print(f"The input file {input_file} does not exist")
sys.exit(1)
Expand Down

0 comments on commit d4c8844

Please sign in to comment.