computing pressure from PP – in #9: CCLM

in #9: CCLM

<p> Hi Rolf, </p> <p> I send you an excel table for the case of 40 levels, which was prepared by H-J and myself in order to analyse the inconsistencies between the grid definitions in <span class="caps"> COSMO </span> . It shows all related quantities of the reference atmosphere and the same values as in <span class="caps"> YUSPECIF </span> . <br/> You may adapt it for 60 levels and compare the formula with yours. This should give the correct values. </p> <p> I’m sorry, but I do not have the time at the moment to check it on my own. </p> <p> Regards, Andreas </p> <p> Rolf Zentek wrote: <br/> &gt; Hi, <br/> &gt; <br/> &gt; I have my 3d (+time = 4d) variable PP (deviation from reference pressure). <br/> &gt; Now I simple want to compute my pressure on the full levels. <br/> &gt; <br/> &gt; from YUSPECIF: <br/> &gt; <br/> &gt; Vertical coordinate: type 2 (Gal-Chen hybrid) <br/> &gt; k Z(k) P0(k) <br/> &gt; 1 25000.0000 28.1726 <br/> &gt; 2 23800.0000 33.9524 <br/> &gt; […..] <br/> &gt; 60 10.0000 998.8149 <br/> &gt; 61 0.0000 1000.0000 <br/> &gt; Boundary for change from z to terrain-following: vcflat = 11430.0000 <br/> &gt; Half-level index where levels become flat: k = 15 <br/> &gt; Exponential profile with asymptotic isothermal stratosphere <br/> &gt; Values of the Reference Atmosphere: <br/> &gt; Pressure at Sea-Level: 1000.0000 <br/> &gt; Temperature at Sea-Level: 15.0000 <br/> &gt; Temp. diff. sea-level-stratosph.: 75.0000 <br/> &gt; Scale height for temp. decrease: 10000.0000 <br/> &gt; <br/> &gt; from Output constant file (lffd2015123118c.nc) <br/> &gt; <br/> &gt; vcoord:long_name = “Height-based hybrid Gal-Chen coordinate” ; <br/> &gt; vcoord:units = “Pa” ; <br/> &gt; vcoord:ivctype = 2 ; <br/> &gt; vcoord:irefatm = 2 ; <br/> &gt; vcoord:p0sl = 100000. ; <br/> &gt; vcoord:t0sl = 288.149993896484 ; <br/> &gt; vcoord:dt0lp = 42. ; <br/> &gt; vcoord:vcflat = 11430. ; <br/> &gt; vcoord:delta_t = 75. ; <br/> &gt; vcoord:h_scal = 10000. ; <br/> &gt; <br/> &gt; As I understand it, I need to compute the reference pressure for every grid point and then just add PP? <br/> &gt; I must compute the reference pressure on full levels right? <br/> &gt; <br/> &gt; Step 1: H = ( HLL[:,:,1:60] + HLL[:,:,2:61] ) * 0.5 <br/> &gt; Step 2: P_ref = specialFunction(H) = “pressure in Height H“ <br/> &gt; Step 3: P = P_ref + PP <br/> &gt; <br/> &gt; Is this so far correct? <br/> &gt; In that case what is this “specialFunction”? (I know it is basically barometric height formula… but which version?) <br/> &gt; I tried the formula from the COSMO Documentation (Part I: Dynamics and Numerics) page 28/29, equation (3.85) <br/> &gt; p_0(z) = … for both cases beta = 0 and beta = 42 <br/> &gt; but if I test it with the values from YUSPECIF I get lower or higher values than there. <br/> &gt; <br/> &gt; nc = nc_open(file) <br/> &gt; vcoord = ncvar_get(nc,“vcoord”) <br/> &gt; p0sl = ncatt_get(nc,“vcoord”,“p0sl”)$value <br/> &gt; t0sl = ncatt_get(nc,“vcoord”,“t0sl”)$value <br/> &gt; dt0lp = ncatt_get(nc,“vcoord”,“dt0lp”)$value <br/> &gt; pref1 = p0sl * exp( -t0sl/dt0lp * (1-sqrt(1 – 2 * dt0lp * 9.81 * vcoord / 287.058 / t0sl^2) ) <br/> &gt; pref2 = p0sl * exp( -9.81 * vcoord / 287.058 / t0sl ) <br/> &gt; <br/> &gt; for 25000m <br/> &gt; pref1 gives 13 hPa <br/> &gt; pref2 gives 51 hPa <br/> &gt; while YUSPECIF says 28 hPa <br/> &gt; <br/> &gt; Any suggestions? <br/> &gt; Rolf <br/> &gt; <br/> &gt; P.S.: the attribute:units of the variable “vcoord” says “Pa” but its obviously(?) meter <br/> &gt; <br/> &gt; edit: I attached the files </p>

  @andreaswill in #c06172b

<p> Hi Rolf, </p> <p> I send you an excel table for the case of 40 levels, which was prepared by H-J and myself in order to analyse the inconsistencies between the grid definitions in <span class="caps"> COSMO </span> . It shows all related quantities of the reference atmosphere and the same values as in <span class="caps"> YUSPECIF </span> . <br/> You may adapt it for 60 levels and compare the formula with yours. This should give the correct values. </p> <p> I’m sorry, but I do not have the time at the moment to check it on my own. </p> <p> Regards, Andreas </p> <p> Rolf Zentek wrote: <br/> &gt; Hi, <br/> &gt; <br/> &gt; I have my 3d (+time = 4d) variable PP (deviation from reference pressure). <br/> &gt; Now I simple want to compute my pressure on the full levels. <br/> &gt; <br/> &gt; from YUSPECIF: <br/> &gt; <br/> &gt; Vertical coordinate: type 2 (Gal-Chen hybrid) <br/> &gt; k Z(k) P0(k) <br/> &gt; 1 25000.0000 28.1726 <br/> &gt; 2 23800.0000 33.9524 <br/> &gt; […..] <br/> &gt; 60 10.0000 998.8149 <br/> &gt; 61 0.0000 1000.0000 <br/> &gt; Boundary for change from z to terrain-following: vcflat = 11430.0000 <br/> &gt; Half-level index where levels become flat: k = 15 <br/> &gt; Exponential profile with asymptotic isothermal stratosphere <br/> &gt; Values of the Reference Atmosphere: <br/> &gt; Pressure at Sea-Level: 1000.0000 <br/> &gt; Temperature at Sea-Level: 15.0000 <br/> &gt; Temp. diff. sea-level-stratosph.: 75.0000 <br/> &gt; Scale height for temp. decrease: 10000.0000 <br/> &gt; <br/> &gt; from Output constant file (lffd2015123118c.nc) <br/> &gt; <br/> &gt; vcoord:long_name = “Height-based hybrid Gal-Chen coordinate” ; <br/> &gt; vcoord:units = “Pa” ; <br/> &gt; vcoord:ivctype = 2 ; <br/> &gt; vcoord:irefatm = 2 ; <br/> &gt; vcoord:p0sl = 100000. ; <br/> &gt; vcoord:t0sl = 288.149993896484 ; <br/> &gt; vcoord:dt0lp = 42. ; <br/> &gt; vcoord:vcflat = 11430. ; <br/> &gt; vcoord:delta_t = 75. ; <br/> &gt; vcoord:h_scal = 10000. ; <br/> &gt; <br/> &gt; As I understand it, I need to compute the reference pressure for every grid point and then just add PP? <br/> &gt; I must compute the reference pressure on full levels right? <br/> &gt; <br/> &gt; Step 1: H = ( HLL[:,:,1:60] + HLL[:,:,2:61] ) * 0.5 <br/> &gt; Step 2: P_ref = specialFunction(H) = “pressure in Height H“ <br/> &gt; Step 3: P = P_ref + PP <br/> &gt; <br/> &gt; Is this so far correct? <br/> &gt; In that case what is this “specialFunction”? (I know it is basically barometric height formula… but which version?) <br/> &gt; I tried the formula from the COSMO Documentation (Part I: Dynamics and Numerics) page 28/29, equation (3.85) <br/> &gt; p_0(z) = … for both cases beta = 0 and beta = 42 <br/> &gt; but if I test it with the values from YUSPECIF I get lower or higher values than there. <br/> &gt; <br/> &gt; nc = nc_open(file) <br/> &gt; vcoord = ncvar_get(nc,“vcoord”) <br/> &gt; p0sl = ncatt_get(nc,“vcoord”,“p0sl”)$value <br/> &gt; t0sl = ncatt_get(nc,“vcoord”,“t0sl”)$value <br/> &gt; dt0lp = ncatt_get(nc,“vcoord”,“dt0lp”)$value <br/> &gt; pref1 = p0sl * exp( -t0sl/dt0lp * (1-sqrt(1 – 2 * dt0lp * 9.81 * vcoord / 287.058 / t0sl^2) ) <br/> &gt; pref2 = p0sl * exp( -9.81 * vcoord / 287.058 / t0sl ) <br/> &gt; <br/> &gt; for 25000m <br/> &gt; pref1 gives 13 hPa <br/> &gt; pref2 gives 51 hPa <br/> &gt; while YUSPECIF says 28 hPa <br/> &gt; <br/> &gt; Any suggestions? <br/> &gt; Rolf <br/> &gt; <br/> &gt; P.S.: the attribute:units of the variable “vcoord” says “Pa” but its obviously(?) meter <br/> &gt; <br/> &gt; edit: I attached the files </p>

Hi Rolf,

I send you an excel table for the case of 40 levels, which was prepared by H-J and myself in order to analyse the inconsistencies between the grid definitions in COSMO . It shows all related quantities of the reference atmosphere and the same values as in YUSPECIF .
You may adapt it for 60 levels and compare the formula with yours. This should give the correct values.

I’m sorry, but I do not have the time at the moment to check it on my own.

Regards, Andreas

Rolf Zentek wrote:
> Hi,
>
> I have my 3d (+time = 4d) variable PP (deviation from reference pressure).
> Now I simple want to compute my pressure on the full levels.
>
> from YUSPECIF:
>
> Vertical coordinate: type 2 (Gal-Chen hybrid)
> k Z(k) P0(k)
> 1 25000.0000 28.1726
> 2 23800.0000 33.9524
> […..]
> 60 10.0000 998.8149
> 61 0.0000 1000.0000
> Boundary for change from z to terrain-following: vcflat = 11430.0000
> Half-level index where levels become flat: k = 15
> Exponential profile with asymptotic isothermal stratosphere
> Values of the Reference Atmosphere:
> Pressure at Sea-Level: 1000.0000
> Temperature at Sea-Level: 15.0000
> Temp. diff. sea-level-stratosph.: 75.0000
> Scale height for temp. decrease: 10000.0000
>
> from Output constant file (lffd2015123118c.nc)
>
> vcoord:long_name = “Height-based hybrid Gal-Chen coordinate” ;
> vcoord:units = “Pa” ;
> vcoord:ivctype = 2 ;
> vcoord:irefatm = 2 ;
> vcoord:p0sl = 100000. ;
> vcoord:t0sl = 288.149993896484 ;
> vcoord:dt0lp = 42. ;
> vcoord:vcflat = 11430. ;
> vcoord:delta_t = 75. ;
> vcoord:h_scal = 10000. ;
>
> As I understand it, I need to compute the reference pressure for every grid point and then just add PP?
> I must compute the reference pressure on full levels right?
>
> Step 1: H = ( HLL[:,:,1:60] + HLL[:,:,2:61] ) * 0.5
> Step 2: P_ref = specialFunction(H) = “pressure in Height H“
> Step 3: P = P_ref + PP
>
> Is this so far correct?
> In that case what is this “specialFunction”? (I know it is basically barometric height formula… but which version?)
> I tried the formula from the COSMO Documentation (Part I: Dynamics and Numerics) page 28/29, equation (3.85)
> p_0(z) = … for both cases beta = 0 and beta = 42
> but if I test it with the values from YUSPECIF I get lower or higher values than there.
>
> nc = nc_open(file)
> vcoord = ncvar_get(nc,“vcoord”)
> p0sl = ncatt_get(nc,“vcoord”,“p0sl”)$value
> t0sl = ncatt_get(nc,“vcoord”,“t0sl”)$value
> dt0lp = ncatt_get(nc,“vcoord”,“dt0lp”)$value
> pref1 = p0sl * exp( -t0sl/dt0lp * (1-sqrt(1 – 2 * dt0lp * 9.81 * vcoord / 287.058 / t0sl^2) )
> pref2 = p0sl * exp( -9.81 * vcoord / 287.058 / t0sl )
>
> for 25000m
> pref1 gives 13 hPa
> pref2 gives 51 hPa
> while YUSPECIF says 28 hPa
>
> Any suggestions?
> Rolf
>
> P.S.: the attribute:units of the variable “vcoord” says “Pa” but its obviously(?) meter
>
> edit: I attached the files