Skip to content

Commit

Permalink
Handle missing station data file rather than exiting with an exception (
Browse files Browse the repository at this point in the history
#198)

Add zeroed data if a station data file is missing to ensure continued
execution.

Resolves #197 

## Dependencies
Not a huge deal but I started this branch from my fix for #196 so that
should be merged before this change.

---------

Co-authored-by: Cory Martin <cory.r.martin@noaa.gov>
  • Loading branch information
EdwardSafford-NOAA and CoryMartin-NOAA authored Jul 12, 2024
1 parent ab1b07c commit ab0444c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/eva/data/mon_data_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,10 @@ def read_stn_ieee(self, file_name, coords, dims, ndims_used, dims_arr,
dims['ydef'] = numobs
f.close()

else:
rtn_array = np.zeros((len(vars), 1, 1), float)
dims['ydef'] = 1

rtn_lat = np.asarray(lat).reshape(-1)
rtn_lon = np.asarray(lon).reshape(-1)

Expand Down

0 comments on commit ab0444c

Please sign in to comment.