For this, I am using python to plot and manipulate the data.

I am using reanalysis data in a netcdf format for this problem.

The data includes geopotential, for which I estimated the geopotential height through the following.

The netcdf variable for geopotential is as follows:

<class 'netCDF4._netCDF4.Variable'>
int16 z(time, level, latitude, longitude)
    scale_factor: 0.9163788350787961
    add_offset: 28797.397523473086
    _FillValue: -32767
    missing_value: -32767
    units: m**2 s**-2
    long_name: Geopotential
    standard_name: geopotential
unlimited dimensions: 
current shape = (1, 2, 51, 101)
filling on

I then proceeded to extract this variable as follows, and calculate the geopotential height by dividing the variable geop by $g_{o} = 9.81$. I then assigned this to a variable $Z$

geop    = file.variables['z'][:]
g = 9.81
Z = geop/g # Geopotential Height

Now I plot this variable and the resulting plot is shown below (Units in geopotential meters):

Through the hydrostatic equation $ dp = -\rho gdz $, I tried directly calculating for p. by doing the following calculation:

rho = 1.25
g = 9.81
dp = -1 *(rho*g*Zl)  # employing the hydrostatic approximation

Which gives me these values as seen below and in the plot:

  data=[[[410.9842133392113, 307.8915943928496, 209.38086962187754, ...,
          187.6168722887587, 256.3452849196665, 289.56401769127297],
         [650.3881840035501, 506.05851747863653, 360.58337740988014,
          ..., 358.29243032218073, 456.8031550931528, 493.4583084963061],
         [901.2468901063676, 731.716805616793, 570.2050359341547, ...,
          334.23748590136256, 433.893684216182, 479.71262597012355],
         [-1690.9597396227766, -1719.596578218989, -1756.251731622142,
          ..., -348.46474623233917, -248.80854791751972,
         [-1539.7572318347738, -1561.5212291678972, -1642.84985078114,
          ..., -371.37421710930994, -324.409801811521,
         [-1335.8629410297408, -1397.7185123975598, -1535.1753376593797,
          ..., -397.7201086178229, -355.3375874954281,
  mask=[[[False, False, False, ..., False, False, False],
         [False, False, False, ..., False, False, False],
         [False, False, False, ..., False, False, False],
         [False, False, False, ..., False, False, False],
         [False, False, False, ..., False, False, False],
         [False, False, False, ..., False, False, False]]],

enter image description here

but it gives me negative values.

How do I exactly convert geopotential height to pressure at surface?

  • 1
    $\begingroup$ You didn't show enough detail in how you used the assumption of hydrostatic equilibrium. You should get values close to 1000 hPa. By "close to" I mean within 30 hPa or so of 1000 hPa. By the way, that assumption of hydrostatic equilibrium is not exactly valid (that plot shows an atmosphere that is slightly out of hydrostatic equilibrium) but it's close enough. $\endgroup$ Oct 16, 2021 at 12:53
  • $\begingroup$ I have voted to close because of the lack of detail. $\endgroup$ Oct 16, 2021 at 12:53
  • 2
    $\begingroup$ Hi. I've edited and added more details on how I used the hydrostatic assumption. Yes, it should just an approximate to the pressure at the surface, but I still get negative values. Any help on where I am going wrong? $\endgroup$
    – meteo_96
    Oct 16, 2021 at 15:20
  • $\begingroup$ I've retracted my vote to close given the added details. $\endgroup$ Oct 16, 2021 at 15:29

1 Answer 1


You should expect some negative values for $dp$ as that's the pressure difference from 1000 hPa. Another thing that are doing wrong is not scaling your $dp$ values to convert from pascals to hPa. The product of a density in kg/m3, acceleration in m/s2, and distance in meters is pressure in pascals. Divide by 100 to yield hPa.

It also appears that you have a sign problem. If the 1000 hPa geopotential height is positive (above sea level), the pressure at sea level should be higher than 1000 hPa, The opposite applies if the 1000 hPa geopotential height is negative.

From your first plot, it appears that the 1000 hPa geopotential height ranges from 125.2 meters below sea level (the deepest blue) to 274.8 meters above sea level (the deepest red). That 400 meter range means that is not quite correct to assume constant density, but it's close enough for a zeroth order approximation. The -125.2 meter geopotential height results in a sea level pressure of 984.7 hPa (assuming a constant density of $1.25\,\text{kg}/\text{m}^3$ and a constant gravitational acceleration of $9.80665\,\text{m}/\text{s}^2$), while the +274.8 meter geopotential height results in a sea level pressure of 1033.7 hPa.

  • 2
    $\begingroup$ @alberto_gar dp is change in pressure. You need to add 1000 hPa. It's that simple. $\endgroup$ Oct 16, 2021 at 18:52
  • $\begingroup$ So do I need to do some adjustment to this dp that I calculated in order to get the pressure at the surface? Thanks $\endgroup$
    – meteo_96
    Oct 16, 2021 at 18:53
  • 2
    $\begingroup$ @alberto_gar dp is not pressure. It is change in pressure. In this case, it is change in pressure from 1000 hPa. So in this case you add 1000 hPa to your dp values to get the values at sea level. You do need to get the sign and the units correct. I provided Wolfram Alpha links in my latest edit that shows how I arrived at those numbers. Click on 984.7 hPa and 1033.7 hPa. The calculations are simple with those zeroth order simplifying assumptions. $\endgroup$ Oct 16, 2021 at 18:59
  • $\begingroup$ Thanks for the help! $\endgroup$
    – meteo_96
    Oct 16, 2021 at 19:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.