computing pressure from PP – in #9: CCLM

in #9: CCLM

<p> update / solution: </p> <p> For everyone having the same problem: my <strong> INT2LM setting is <code> irefatm = 2 </code> </strong> </p> <p> From looking into the source code it seems to me that that: <br/> <code> reference_atmosphere_2 </code> and thus <code> pref3 </code> is used because of my INT2LM setting <code> irefatm = 2 </code> </p> <p> I think the formula from the excel sheet and from the documentation are for the case <code> irefatm = 1 </code> </p> <p> From the documentation I get the same as from the source code: <br/> <pre> 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. </pre> <br/> From the source code <code> vgrid_refatm_utils.f90 </code> / <code> reference_atmosphere_2 </code> : <br/> <pre> 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. </pre> <br/> which I interprete to be the equation <code> pref3 </code> with <code> (hhl[,,1:60]+hhl[,,2:61])/2 </code> instead of <code> vcoord </code> <br/> 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: </p> <p> <strong> My opionion: If <code> irefatm = 2 </code> then <code> p_reference(z) = p0sl * exp( -g*h_scal/ R/t00 * log( (exp(z/h_scal)*t00 + delta_t)/(t00 + delta_t)) ) </code> </strong> <br/> with the values from my earlier posts </p>

  @rolfzentek in #2b9ff43

<p> update / solution: </p> <p> For everyone having the same problem: my <strong> INT2LM setting is <code> irefatm = 2 </code> </strong> </p> <p> From looking into the source code it seems to me that that: <br/> <code> reference_atmosphere_2 </code> and thus <code> pref3 </code> is used because of my INT2LM setting <code> irefatm = 2 </code> </p> <p> I think the formula from the excel sheet and from the documentation are for the case <code> irefatm = 1 </code> </p> <p> From the documentation I get the same as from the source code: <br/> <pre> 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. </pre> <br/> From the source code <code> vgrid_refatm_utils.f90 </code> / <code> reference_atmosphere_2 </code> : <br/> <pre> 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. </pre> <br/> which I interprete to be the equation <code> pref3 </code> with <code> (hhl[,,1:60]+hhl[,,2:61])/2 </code> instead of <code> vcoord </code> <br/> 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: </p> <p> <strong> My opionion: If <code> irefatm = 2 </code> then <code> p_reference(z) = p0sl * exp( -g*h_scal/ R/t00 * log( (exp(z/h_scal)*t00 + delta_t)/(t00 + delta_t)) ) </code> </strong> <br/> with the values from my earlier posts </p>

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