Skip to content

Commit

Permalink
remove raise warning as causing crash of programme - print message is…
Browse files Browse the repository at this point in the history
… sufficient
  • Loading branch information
joelfiddes committed Sep 20, 2024
1 parent 0c59649 commit f8da401
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TopoPyScale/topo_scale.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def pt_downscale_interp(row, ds_plev_pt, ds_surf_pt, meta):

if (row.elevation < plev_interp.z.isel(level=-1)).sum():
pt_elev_diff = np.round(np.min(row.elevation - plev_interp.z.isel(level=-1).values), 0)
raise Warning(f"---> WARNING: Point {pt_id} is {pt_elev_diff} m lower than the {plev_interp.isel(level=-1).level.data} hPa geopotential\n=> "
print(f"---> WARNING: Point {pt_id} is {pt_elev_diff} m lower than the {plev_interp.isel(level=-1).level.data} hPa geopotential\n=> "
"Values sampled from Psurf and lowest Plevel. No vertical interpolation")

ind_z_top = (plev_interp.where(plev_interp.z > row.elevation).z - row.elevation).argmin('level')
Expand Down

0 comments on commit f8da401

Please sign in to comment.