There are a lot of negative values returned for topo and height variables for the HIWRAP radar. Calculations seem straight-forward, subtract range from aircraft altitude in 1D for topo and 2D for height. Data files for netcdf and hdf appear to be different (used GRIP and IPHEx, respectively), but tried to make the function as general as possible.