Skip to content

Commit 6adef5a

Browse files
committed
remove negative value
1 parent c36f7d2 commit 6adef5a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

climada/entity/exposures/black_marble.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,8 @@ def _process_land(exp, geom, nightlight, coord_nl, res_fact, res_km):
479479
LOGGER.info('Generating resolution of approx %s km.', res_km)
480480
nightlight_res = ndimage.zoom(nightlight[in_lat[0]:in_lat[-1]+1, :] \
481481
[:, in_lon[0]:in_lon[-1]+1].todense(), res_fact)
482+
nightlight_res[nightlight_res < 0.0] = 0.0
483+
482484
lat_res, lon_res = np.mgrid[
483485
coord_nl[0, 0] + in_lat[0]*coord_nl[0, 1]:
484486
coord_nl[0, 0] + in_lat[1]*coord_nl[0, 1]:

0 commit comments

Comments
 (0)