computing pressure from PP – in #9: CCLM

in #9: CCLM

update / solution:

For everyone having the same problem: my INT2LM setting is irefatm = 2

From looking into the source code it seems to me that that:
reference_atmosphere_2 and thus pref3 is used because of my INT2LM setting irefatm = 2

I think the formula from the excel sheet and from the documentation are for the case irefatm = 1

From the documentation I get the same as from the source code:

The new reference atmosphere is based on the temperature profile t0(z) = (t0sl-delta_t) + delta_t*exp(-z/h_scal), where z = hhl(k) is the height of a model grid point.

From the source code vgrid_refatm_utils.f90 / reference_atmosphere_2 :
The base-state pressure at main levels is computed from the analytically integrated hydrostatic equation, assuming that the height at full levels (zhfl) is the arithmetic mean of the adjacent half levels.

which I interprete to be the equation pref3 with (hhl[,,1:60]+hhl[,,2:61])/2 instead of vcoord
When I did the analytical integration of the hydrostatic equation myself I got a different formula than pref3, but they give the same values :D so in short:

My opionion: If irefatm = 2 then p_reference(z) = p0sl * exp( -g*h_scal/ R/t00 * log( (exp(z/h_scal)*t00 + delta_t)/(t00 + delta_t)) )
with the values from my earlier posts

  @rolfzentek in #2b9ff43

update / solution:

For everyone having the same problem: my INT2LM setting is irefatm = 2

From looking into the source code it seems to me that that:
reference_atmosphere_2 and thus pref3 is used because of my INT2LM setting irefatm = 2

I think the formula from the excel sheet and from the documentation are for the case irefatm = 1

From the documentation I get the same as from the source code:

The new reference atmosphere is based on the temperature profile t0(z) = (t0sl-delta_t) + delta_t*exp(-z/h_scal), where z = hhl(k) is the height of a model grid point.

From the source code vgrid_refatm_utils.f90 / reference_atmosphere_2 :
The base-state pressure at main levels is computed from the analytically integrated hydrostatic equation, assuming that the height at full levels (zhfl) is the arithmetic mean of the adjacent half levels.

which I interprete to be the equation pref3 with (hhl[,,1:60]+hhl[,,2:61])/2 instead of vcoord
When I did the analytical integration of the hydrostatic equation myself I got a different formula than pref3, but they give the same values :D so in short:

My opionion: If irefatm = 2 then p_reference(z) = p0sl * exp( -g*h_scal/ R/t00 * log( (exp(z/h_scal)*t00 + delta_t)/(t00 + delta_t)) )
with the values from my earlier posts

update / solution:

For everyone having the same problem: my INT2LM setting is irefatm = 2

From looking into the source code it seems to me that that:
reference_atmosphere_2 and thus pref3 is used because of my INT2LM setting irefatm = 2

I think the formula from the excel sheet and from the documentation are for the case irefatm = 1

From the documentation I get the same as from the source code:

The new reference atmosphere is based on the temperature profile t0(z) = (t0sl-delta_t) + delta_t*exp(-z/h_scal), where z = hhl(k) is the height of a model grid point.

From the source code vgrid_refatm_utils.f90 / reference_atmosphere_2 :
The base-state pressure at main levels is computed from the analytically integrated hydrostatic equation, assuming that the height at full levels (zhfl) is the arithmetic mean of the adjacent half levels.

which I interprete to be the equation pref3 with (hhl[,,1:60]+hhl[,,2:61])/2 instead of vcoord
When I did the analytical integration of the hydrostatic equation myself I got a different formula than pref3, but they give the same values :D so in short:

My opionion: If irefatm = 2 then p_reference(z) = p0sl * exp( -g*h_scal/ R/t00 * log( (exp(z/h_scal)*t00 + delta_t)/(t00 + delta_t)) )
with the values from my earlier posts