Skip to content

Commit

Permalink
#2474 Formating (intend), Moved convert_point_data to under met_point…
Browse files Browse the repository at this point in the history
…_tools
  • Loading branch information
Howard Soh committed Apr 14, 2023
1 parent aa395e5 commit c893ed0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/python/met/point.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ def check_csv_record(self, csv_point_data, index):
error_msgs.append("{i}-th data: obs_value: only NA is accepted as string".format(i=index))
return error_msgs

def check_csv_point_data(self, all_records=False):
def check_csv_point_data(self, all_records=False):
if 0 == len(self.point_data):
self.add_error_msg("No data!")
elif all_records:
Expand Down Expand Up @@ -572,7 +572,7 @@ def convert_point_data(self):
for key, idx in obs_var_map.items():
self.obs_var_table[idx] = key

def get_num_value(self, column_value):
def get_num_value(self, column_value):
num_value = column_value
if isinstance(column_value, str):
if self.is_number(column_value):
Expand All @@ -583,7 +583,7 @@ def get_num_value(self, column_value):
self.log_info(f'{column_value} is not a number, converted to the missing value')
return num_value

def is_grib_code(self):
def is_grib_code(self):
grib_code = True
for _point_data in self.point_data:
if isinstance(_point_data[6], int):
Expand All @@ -593,7 +593,7 @@ def is_grib_code(self):
break;
return grib_code

def is_num_string(self, column_value):
def is_num_string(self, column_value):
is_string = isinstance(column_value, str)
if is_string:
is_num = True if self.is_number(column_value) or column_value.lower() == 'na' or column_value.lower() == 'n/a' else False
Expand Down

0 comments on commit c893ed0

Please sign in to comment.