[ncl-talk] how to do vertical interpolation from hybrid to sigma levels

Dennis Shea shea at ucar.edu
Mon Jan 25 07:58:30 MST 2021


There is no explicit function to do this. You must do multiple steps.

See: *Model Vertical Coordinate*
<https://www.cesm.ucar.edu/models/atm-cam/docs/usersguide/node25.html>
==> p(k) = a(k)*p0 + b(k)*ps

You can see the values of the CAM hybrid coefficients [top-to-bottom]  via

%> *ncdump* -v hyam,hybm CAM.nc

The *hybm *are the 'sigma' level portion of the hybrid (pressure-sigma)
coefficients.
The hybm are not the classic standalone:  sigma_classic=p/psfc   or
p/p0

[1] calculate pressures at CAM5 levels:  *pres_hybrid_ccm*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/pres_hybrid_ccm.shtml>
: p_cam = *pres_hybrid_ccm*(....)  ; (time,klvl,nlat,mlon)
[2] read a variable you wish to interpolate from hybrid to sigma:   eg
t_cam = fcam->T             ; (time,klvl,nlat,mlon)
[3] sigma_cam = p_cam/p_sfc    or   p_cam/p0
[4] Use *int2p*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/int2p.shtml> or
*int2p_Wrap*
<https://www.ncl.ucar.edu/Document/Functions/Contributed/int2p_Wrap.shtml>
to interpolate to user desired sigma levels ( SIGMA(KSIGMA) ).
The documentation and function were originally developed using pressure.
Hence, the use of pressure in the documentation. However, as I recall,
*int2p* actually is generic.

     SIGMA = (/....../)     ; (KSIGMA)    <== user specified SIGMA levels
     SIGMA!0 = "SIGMA"
     SIGMA at long_name = "sigma level: sigma=p/psfc"    ; "sigma level:
sigma=p/p0"
     SIGMA at units = ""
;  unitless

     t_SIGMA = *int2p_Wrap*
<https://www.ncl.ucar.edu/Document/Functions/Contributed/int2p_Wrap.shtml>
(sigma_cam ,t_cam, SIGMA,  *1* )     ; (ntim,KSIGMA,nlat,mlon)
     *printVarSummary*(t_SIGMA)


On Sun, Jan 24, 2021 at 6:25 PM Hui Ding via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Dear Sir or Madam,
> I am trying to interpolate monthly CAM5 diabatic data from hybrid level to
> sigma level? Do you know how to do it? Thank you!
> Best regards,
> Hui Ding
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210125/8220f625/attachment.html>


More information about the ncl-talk mailing list