Skip to content

Commit

Permalink
more rigorous height levels
Browse files Browse the repository at this point in the history
  • Loading branch information
bbuzz31 committed Jul 26, 2023
1 parent a5d56a6 commit 97d6dd5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
2 changes: 1 addition & 1 deletion test/test_HRRR_ztd.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_scenario_1():

new_data = xr.load_dataset(os.path.join(SCENARIO_DIR, 'HRRR_tropo_20200101T120000_ztd.nc'))
new_data1 = new_data.sel(x=-91.84, y=36.84, z=0, method='nearest')
golden_data = 2.2600022, 0.0358646 # hydro|wet
golden_data = 2.2622863, 0.0361021 # hydro|wet

np.testing.assert_almost_equal(golden_data[0], new_data1['hydro'].data)
np.testing.assert_almost_equal(golden_data[1], new_data1['wet'].data)
Expand Down
32 changes: 20 additions & 12 deletions tools/RAiDER/models/model_levels.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,15 +507,23 @@
]

## HRRR Model Levels
# these are computed as the spatial (over CONUS) average of the HRRR pressure field
LEVELS_50_HEIGHTS = [26143.662, 24907.1, 23820.475, 22836.285, 21934.553,
21099.717, 20316.678, 19577.092, 18876.715, 18185.781,
17453.205, 16682.344, 15936.782, 15257.467, 14641.991,
14077.848, 13555.656, 13068.57, 12611.642, 12181.063,
11773.499, 11377.56, 10973.201, 10551.642, 10113.527,
9654.279, 9170.161, 8661.178, 8127.03, 7568.2935,
6985.858, 6378.0234, 5743.416, 5095.357, 4469.7725,
3899.744, 3392.3884, 2941.3154, 2540.2717, 2184.2336,
1869.1932, 1591.8563, 1347.2079, 1128.5986, 935.72327,
775.0872, 651.92017, 567.2376, 515.85925, 486.44925,
200, 100, 0, -10, -20, -50, -100, -200, -500]
# Computed according to: H = a + b * Z where:
# H is the resulting levels in geometric height
# a is the Surface geopotential height (in meters)
# the surface geopotential is fetched from Herbie and divided by g0=9.80665
# averaged in space over CONUS
# b is the native (sigma) model levels (https://rapidrefresh.noaa.gov/faq/HRRR.faq.html)
# Z is the spatial average geopotential height of the sigma level (in meters)
LEVELS_50_HEIGHTS = [2.61580385e+04, 2.48712879e+04, 2.36910518e+04, 2.25524744e+04,
2.13986900e+04, 2.02464207e+04, 1.90883153e+04, 1.79427740e+04,
1.68476065e+04, 1.57399654e+04, 1.45826790e+04, 1.33886515e+04,
1.22171878e+04, 1.11019360e+04, 1.00395775e+04, 9.01965365e+03,
8.03486128e+03, 7.09323111e+03, 6.27822334e+03, 5.57101666e+03,
4.96120000e+03, 4.42159162e+03, 3.94118518e+03, 3.51064883e+03,
3.12371808e+03, 2.77490670e+03, 2.45941860e+03, 2.17290722e+03,
1.90394551e+03, 1.66716448e+03, 1.44127808e+03, 1.22697117e+03,
1.02507126e+03, 8.38877887e+02, 6.74297597e+02, 5.34810131e+02,
4.18916771e+02, 3.23291544e+02, 2.44985788e+02, 1.81492083e+02,
1.34383211e+02, 1.02007390e+02, 7.70762881e+01, 5.77739913e+01,
4.31591299e+01, 3.26389095e+01, 2.52657431e+01, 2.02104423e+01,
1.66520787e+01, 1.39366382e+01, 0, -10, -20, -50, -100, -200, -500]

0 comments on commit 97d6dd5

Please sign in to comment.