...
Alternatively, there is a customer-supplied script (which runs on Microsoft Windows) that computes geopotential on model levels for a specific location. This script was written for the ERA-Interim dataset, but can be adapted to ERA5. Please see the article ERA-Interim: compute geopotential on model levels for details.
For users experienced in Metview, there is a built-in function called mvl_geopotential_on_ml.
...