Working my way through PR #16, I noticed some problems on the HRRR interface.
When getting data from HRRR using wind_velocity_direction_at_altitude, at any height AGL height_above_ground above 100 m, we fall into the following else to get the appropriate pressure level:
https://github.com/NREL/SSRS/blob/a9114c7a65fd1d71c8c9eb8f2f7d53f1685dfccb/ssrs/hrrr/hrrr.py#L350-L363
where ground_level_m is used as an argument to nearest_pressures. However, oftentimes the call to wind_velocity_direction_at_altitude does not include ground_level_m, but rather height_above_ground_m. The ground_level_m is zero by default:
https://github.com/NREL/SSRS/blob/a9114c7a65fd1d71c8c9eb8f2f7d53f1685dfccb/ssrs/hrrr/hrrr.py#L260
According to the nearest_pressures function's docstring, h is the height above sea level:
https://github.com/NREL/SSRS/blob/a9114c7a65fd1d71c8c9eb8f2f7d53f1685dfccb/ssrs/hrrr/hrrr.py#L92-L93
so I'm not sure if it is appropriate to use height_above_ground_m
What should we use here? Not specifying ground_level_m does not work because of the default 0 (and would not even be appropriate). Should we first get the ground level and then combine it with the height AGL?
Right now, in the latest commit from PR #16, I replaced line 359 above with
https://github.com/NREL/SSRS/blob/43a728fe9559ed2d2b668eb6a905de795c4963f6/ssrs/hrrr/hrrr.py#L376
However, I do understand that this is not really appropriate.
What would be appropriate path forward here?
Working my way through PR #16, I noticed some problems on the HRRR interface.
When getting data from HRRR using
wind_velocity_direction_at_altitude, at any height AGLheight_above_groundabove 100 m, we fall into the followingelseto get the appropriate pressure level:https://github.com/NREL/SSRS/blob/a9114c7a65fd1d71c8c9eb8f2f7d53f1685dfccb/ssrs/hrrr/hrrr.py#L350-L363
where
ground_level_mis used as an argument tonearest_pressures. However, oftentimes the call towind_velocity_direction_at_altitudedoes not includeground_level_m, but ratherheight_above_ground_m. Theground_level_mis zero by default:https://github.com/NREL/SSRS/blob/a9114c7a65fd1d71c8c9eb8f2f7d53f1685dfccb/ssrs/hrrr/hrrr.py#L260
According to the
nearest_pressuresfunction's docstring,his the height above sea level:https://github.com/NREL/SSRS/blob/a9114c7a65fd1d71c8c9eb8f2f7d53f1685dfccb/ssrs/hrrr/hrrr.py#L92-L93
so I'm not sure if it is appropriate to use
height_above_ground_mWhat should we use here? Not specifying
ground_level_mdoes not work because of the default0(and would not even be appropriate). Should we first get the ground level and then combine it with the height AGL?Right now, in the latest commit from PR #16, I replaced line 359 above with
https://github.com/NREL/SSRS/blob/43a728fe9559ed2d2b668eb6a905de795c4963f6/ssrs/hrrr/hrrr.py#L376
However, I do understand that this is not really appropriate.
What would be appropriate path forward here?