Skip to content

Commit

Permalink
Adds support for ingesting NWM v1.2 outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
EdisonOrellana-NOAA committed Apr 23, 2024
1 parent 9b777b3 commit 0799006
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Core/LAMBDA/viz_functions/viz_db_ingest/lambda_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,13 @@ def lambda_handler(event, context):
print("Regex pattern for the forecast hour didn't match the netcdf file")

try:
ds['nwm_vers'] = float(ds.NWM_version_number.replace("v",""))
try:
ds['nwm_vers'] = float(ds.NWM_version_number.replace("v",""))
except:
try:
ds['nwm_vers'] = float(ds.model_version.replace("NWM ",""))
except:
raise
if 'nwm_vers' not in target_cols:
target_cols.append('nwm_vers')
except:
Expand Down

0 comments on commit 0799006

Please sign in to comment.