# [ncl-talk] Question regarding the hybrid base pressure in NCL functions

Dennis Shea shea at ucar.edu
Tue Jun 27 08:25:37 MDT 2017

```Forgot to explicitly add:

You should use the 'pres_hybrid_ecmwf' and 'dpres_hybrid_ecmwf' function in
the 'hybrid_lib.ncl' library.

On Mon, Jun 26, 2017 at 11:03 PM, Dennis Shea <shea at ucar.edu> wrote:

> I only skimmed your complicated script.
> This is a longish response dealing with hybrid levels..
>
> There are several different forms of 'hybrid' coordinates.
>
> [1]
> The initial hybrid coefficients I encountered were from the Climate
> Atmosphere Model (CAM) within the Community Climate Model (CCM). FYI: The
> CCM is the predecessor of the CESM.
>
> The CCM [CAM] formula is:     hybrid_plevel(p) = hya(p)*p0 + hyb(p)*ps
>
> The hy{a/b} coefficients are associated with  (1) 'mid-levels' and are
> often denoted as  'hyam'  and 'hybm' or (2) 'interface levels' often
> denoted as  'hyai'  and 'hybi'. The dimension sizes for the interface are
> one larger than the hy{a/b}m coefficients.
>
> The 'pres_hybrid_ccm'    uses the mid-level coefficients: 'hyam'  and
> 'hybm'.
> The 'dpres_hybrid_ccm'  uses the interface-level coefficients: 'hyai'  and
> 'hybi'.
>
> The _ccm suffix indicates that the CCM formulation is used.
>
>      pres  =  pres_hybrid_ccm(ps, p0, hyam, hybm)
>     dpres = dpres_hybrid_ccm(ps, p0, hyai, hybi)
>
>  p0 should be 100000 (Pa) or 1000 (hPa). The units of p0 should match the
> units of 'ps'
>
> The hy{a/b} order is top-to-bottom.
>
> [2]
> Subsequently, it was called to my attention that ECMWF used a slight
> variant of the _ccm formulation:
>        hybrid_plevel(p) = HYA(p) + hyb(p)*ps     ;   HYA(p)=hya(p)*p0
> Rather than create a new function (also new documentation and testing), I
> noted this variation  in the _ccm function documentation. The
> '{d}pres_hybrid_ccm' functions can be used with a simple change.
>
> Let HYA{M/I}(p)=hya{m/i}(p)*p0, then
>
>       hyam = HYAM/p0
>       pres =    pres_hybrid_ccm(ps, p0, hyam, hybm)
>       hyai  = HYAI/p0
>      dpres = dpres_hybrid_ccm(ps, p0, hyai, hybi
>
> [3]
> Within the last year or two, NCAR's Data Support Section asked me to look
> at the Japanese Meteorological Agency hybrid level formulation. This was
> quite different. The formulation is based on Simmons & Burridge (1981):
>
>
> *http://journals.ametsoc.org/doi/pdf/10.1175/1520-0493%281981%29109%3C0758%3AAEAAMC%3E2.0.CO%3B2
> <http://journals.ametsoc.org/doi/pdf/10.1175/1520-0493%281981%29109%3C0758%3AAEAAMC%3E2.0.CO%3B2>*
>     see equations 3.17 and 3.18
>
> The JMA has a document that has additional information (see page 17):
>        https://rda.ucar.edu/datasets/ds628.0/docs/JRA-55.handbook_T
> L319_en.pdf
>
> Punch line: the pressure levels for the 'mid-levels' are determined via a
> much more complicated expression. This is done for conservation reasons.
> The difference between the 'conservative' pressure levels and those
> obtained using [2] are small but important.
>
> The JAM data were from the 55-year Japanese ReAnalysis  project. Hence the
> name:
>    http://www.ncl.ucar.edu/Document/Functions/Built-in/pres_
> hybrid_jra55.shtml
>
> Note:this function requires bottom-to-top ordering because that is the way
> the JRA55 files were ordered.
>
> [4]
> You sent me a file: ERA-Interim_coordvars.nc
>
> It is always important to look at your data.
>
> (a) Your hybrid coefficients are of the ECMWF type [2].
> (b) Your data are ordered top-to-bottom.
>
> I have attached my own hybrid-function library (hybrid_lib.ncl). These are
> not supported or documented. There is some internal documentation. I have
> also modified a test script of mine to use your data file(s).
>
> %> ncl test.ncl  | less
>
> Carefully look at the script and the output.
>
> You will have to provide the correct arguments.
>
> Good Luck
>
>
>
>
>
>
>
>
>
>
>
> On Thu, Jun 22, 2017 at 4:41 PM, Ghyslaine Boschat <
> ghyslaine.boschat at unimelb.edu.au> wrote:
>
>> Dear NCL users,
>>
>>
>>
>> I am using NCL version 6.4.0 to calculate vertically integrated
>> meridional energy transports in the atmosphere using ERA-Interim. I am
>> specifically using the NCL functions *cz2ccm* to calculate the
>> geopotential height in hybrid coordinates and then *dpres_hybrid_ccm* to
>> perform vertical integration of my data on model levels.
>>
>>
>>
>> Both these NCL functions require as input the hybrid base pressure *p0 *and
>> hybrid coefficients a and b. p0 is usually equal to 100000Pa but is not
>> available for ERA-Interim and I am not sure what to use…
>>
>>
>>
>> To my understanding, NCL assumes the coefficients are of the form:
>>
>>                                      p = a(k)*p0 + b(k)*ps
>>
>> whereas the equivalent ERA-Interim pressure equation is
>>
>>                                      p = A(k) + B(k)*ps
>>
>>
>>
>> Therefore, for ERA-Interim data do I need to just use *p0=1* or else
>> keep *p0 = 100000* with the provided hybrid coefficients becoming hyam=
>> hyam/p0 and hyai= hyai/p0 (i.e. A(k)=a(k)/p0)?
>>
>>
>>
>> My results are slightly different depending on these 2 options.
>>
>>
>>
>> Thank you for your help with this.
>>
>>
>>
>> Regards,
>>
>>
>> Ghyslaine
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170627/28875c73/attachment.html
```