ArcticSnow / TopoPyScale

TopoPyScale: a Python library to perform simplistic climate downscaling at the hillslope scale
https://topopyscale.readthedocs.io
MIT License
40 stars 9 forks source link

#toposcale: How to deal with situation where the lowest pressure level #9

Closed ArcticSnow closed 2 years ago

ArcticSnow commented 3 years ago

In the case the elevation of the point is lower than the geopotential elevation of the lowest pressure level (1000hPa for ERA5), toposcale currently breaks down.

Strategies:

  1. skip the point and return NaNs
  2. take values from closest pressure level without interpolation

Implementation

ArcticSnow commented 2 years ago

In this situation, the point is skipped, and nothing is returned for this point. The problem was a bug in the code which is now fixed, located: https://github.com/ArcticSnow/TopoPyScale/blob/e15b7c117a1119435293963fdf5a1fa197613ad7/TopoPyScale/topo_scale.py#L135