Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pressure levels for heights AGL between 100 and 250 m in HRRR #17

Open
rthedin opened this issue Sep 29, 2022 · 3 comments
Open

Pressure levels for heights AGL between 100 and 250 m in HRRR #17

rthedin opened this issue Sep 29, 2022 · 3 comments

Comments

@rthedin
Copy link
Collaborator

rthedin commented Sep 29, 2022

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:

SSRS/ssrs/hrrr/hrrr.py

Lines 350 to 363 in a9114c7

if height_above_ground_m > 0.0 and height_above_ground_m < 45.0:
grib_field = f'{varname}:10 m above ground:anl'
u_data_var = 'u10'
v_data_var = 'v10'
elif height_above_ground_m >= 45.0 and height_above_ground_m < 100.0:
grib_field = f'{varname}:80 m above ground:anl'
u_data_var = 'u'
v_data_var = 'v'
else:
nearest_pressures = self.nearest_pressures(ground_level_m)
closest_pressure_above = nearest_pressures['closest_pressure_above']
grib_field = f'{varname}:{closest_pressure_above} mb'
u_data_var = 'u'
v_data_var = 'v'

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:
ground_level_m=0.0,

According to the nearest_pressures function's docstring, h is the height above sea level:

SSRS/ssrs/hrrr/hrrr.py

Lines 92 to 93 in a9114c7

h: float
Height above sea level in meters

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

nearest_pressures = self.nearest_pressures(height_above_ground_m)

However, I do understand that this is not really appropriate.

What would be appropriate path forward here?

@rthedin
Copy link
Collaborator Author

rthedin commented Sep 29, 2022

@ewquon @rimplesandhu

@ewquon
Copy link
Collaborator

ewquon commented Oct 3, 2022

Hi @rthedin, good catch. I think it should be ground_level_m + height_above_ground_m to give the altitude above sea level. However, I don't think we need to be too concerned about this because we need to rework nearest_pressures() anyway and--correct me if I'm wrong @rimplesandhu--I don't think this is currently used. I think we can use the hypsometric equation instead of a hard-coded lookup table.

@rimplesandhu
Copy link
Collaborator

No, I have only focused on 10 and 80 m for annotating telemetry data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants