Skip to content

Commit

Permalink
forcing the default hurricane to use the official run by default
Browse files Browse the repository at this point in the history
  • Loading branch information
PhillipsOwen committed Oct 9, 2024
1 parent 5f0a725 commit 2289939
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/common/pg_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def get_terria_map_workbench_data(self, **kwargs):

# create the sql to get the latest runs for the workbench lookup
sql: str = f"SELECT public.get_latest_runs(_insertion_date:={kwargs['insertion_date']}, _met_class:={kwargs['met_class']}, " \
f"_physical_location:={kwargs['physical_location']}, _ensemble_name:={kwargs['ensemble_name']}, _project_code:=" \
f"_physical_location:={kwargs['physical_location']}, _ensemble_name:='{kwargs['ensemble_name']}', _project_code:=" \
f"{kwargs['project_code']})"

# get the max age
Expand All @@ -96,9 +96,6 @@ def get_terria_map_workbench_data(self, **kwargs):
else:
# for each of the entries returned
for item in ret_val:
# interrogate the results we are looking to get this down to the latest relevant tropical run
# or the latest synoptic run catalog member.

# is there a tropical run and is it too old to display?
if item['met_class'] == 'tropical':
# get the number of days from the last tropical run to now
Expand Down Expand Up @@ -141,6 +138,9 @@ def get_terria_map_catalog_data(self, **kwargs):
# init the return
ret_val: dict = {}

# TODO: force ofcl ensembles for now
kwargs['ensemble_name'] = 'ofcl'

# get the new workbench data
workbench_data: dict = self.get_workbench_data(**kwargs)

Expand Down Expand Up @@ -221,7 +221,7 @@ def get_workbench_data(self, **kwargs):
kwargs.update({param: 'null'})

# add in the max age int
kwargs.update({'max_age': 1})
kwargs.update({'max_age': 3})

# try to make the call for records
ret_val = self.get_terria_map_workbench_data(**kwargs)
Expand Down

0 comments on commit 2289939

Please sign in to comment.