Skip to content

Commit

Permalink
print out where corrupted GC files are (#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
laestrada authored Nov 21, 2024
1 parent eeb6cbd commit 696ab49
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/inversion_scripts/operators/operator_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,11 @@ def concat_tracers(run_id, gc_date, config, sv_elems, n_elements, baserun=False)

ds_concat = xr.concat([dsmf[v] for v in keepvars], "element").rename("ch4")
ds_concat = ds_concat.to_dataset().assign_attrs(dsmf.attrs)
ds_concat = ds_concat.isel(time=gc_date.hour, drop=True) # subset hour of interest
try:
ds_concat = ds_concat.isel(time=gc_date.hour, drop=True) # subset hour of interest
except Exception as e:
print(f"Run id {run_id}. Failed at {gc_date} with error: {e}", flush=True)
raise e
if not baserun:
ds_concat = ds_concat.assign_coords({"element": sv_elems})
return ds_concat
Expand Down

0 comments on commit 696ab49

Please sign in to comment.