Skip to content

Commit

Permalink
name hffmc with UTC based time
Browse files Browse the repository at this point in the history
  • Loading branch information
dgboss committed Dec 5, 2024
1 parent 51059b1 commit c348767
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api/app/sfms/hourly_ffmc_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async def process(self, s3_client: S3Client, input_dataset_context: MultiDataset
temp_key, rh_key, wind_speed_key, precip_key = self.addresser.get_weather_data_keys_hffmc(rdps_model_run_start, hour)
weather_keys_exist = await s3_client.all_objects_exist(temp_key, rh_key, wind_speed_key, precip_key)
if not weather_keys_exist:
logging.warning(f"Missing weather keys for model run: {rdps_model_run_start}")
logging.warning(f"Missing weather keys for model run: {rdps_model_run_start} and hour {hour}")
break

# Prefix our S3 keys for access via gdal
Expand Down
5 changes: 2 additions & 3 deletions api/app/sfms/raster_addresser.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ def get_calculated_hffmc_index_key(self, datetime_utc: datetime):
:return: An S3 key for hFFMC using PDT time.
"""
assert_all_utc(datetime_utc)
datetime_pdt = convert_utc_to_pdt(datetime_utc)
iso_date = datetime_pdt.date().isoformat()
iso_date = datetime_utc.date().isoformat()
weather_param_prefix = "fine_fuel_moisture_code"
return f"{self.sfms_calculated_prefix}/hourlies/{iso_date}/{weather_param_prefix}{iso_date.replace('-', '')}{datetime_pdt.hour:02d}.tif"
return f"{self.sfms_calculated_prefix}/hourlies/{iso_date}/{weather_param_prefix}{iso_date.replace('-', '')}{datetime_utc.hour:02d}.tif"

0 comments on commit c348767

Please sign in to comment.