<div dir="ltr"><div>There is no explicit function to do this. You must do multiple steps.<br></div><div><br></div><div>See: <a href="https://www.cesm.ucar.edu/models/atm-cam/docs/usersguide/node25.html" target="_blank"><b>Model Vertical Coordinate</b></a> ==> p(k) = a(k)*p0 + b(k)*ps</div><div><br></div><div><div>You can see the values of the CAM hybrid coefficients [top-to-bottom] via</div><div><br></div><div>%> <b>ncdump</b> -v hyam,hybm CAM.nc</div><div><br></div></div><div>The <b>hybm </b>are the 'sigma' level portion of the hybrid (pressure-sigma) coefficients. <br></div><div>The hybm are not the classic standalone: sigma_classic=p/psfc or p/p0 <br></div><div><br></div><div><div></div></div><div>[1] calculate pressures at CAM5 levels: <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/pres_hybrid_ccm.shtml" target="_blank"><b>pres_hybrid_ccm</b></a><b> </b>: p_cam = <b>pres_hybrid_ccm</b>(....) ; (time,klvl,nlat,mlon)</div><div>[2] read a variable you wish to interpolate from hybrid to sigma: eg t_cam = fcam->T ; (time,klvl,nlat,mlon)<br></div><div>[3] sigma_cam = p_cam/p_sfc or p_cam/p0</div><div>[4] Use <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/int2p.shtml" target="_blank"><b>int2p</b></a> or <a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/int2p_Wrap.shtml" target="_blank"><b>int2p_Wrap</b></a> to interpolate to user desired sigma levels ( SIGMA(KSIGMA) ). <br></div><div>The documentation and function were originally developed using pressure. Hence, the use of pressure in the documentation. However, as I recall, <b>int2p</b> actually is generic.<br></div><div><br></div><div> SIGMA = (/....../) ; (KSIGMA) <== user specified SIGMA levels</div><div> SIGMA!0 = "SIGMA"</div><div> SIGMA@long_name = "sigma level: sigma=p/psfc" ; "sigma level: sigma=p/p0" <br></div><div> SIGMA@units = "" ; unitless<br></div><div><br></div><div> t_SIGMA = <a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/int2p_Wrap.shtml" target="_blank"><b>int2p_Wrap</b></a> (sigma_cam ,t_cam, SIGMA, <b>1</b> ) ; (ntim,KSIGMA,nlat,mlon)</div><div> <b>printVarSummary</b>(t_SIGMA)<br></div><div><br></div><div><b></b></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jan 24, 2021 at 6:25 PM Hui Ding via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear Sir or Madam, <div>I am trying to interpolate monthly CAM5 diabatic data from hybrid level to sigma level? Do you know how to do it? Thank you!</div><div>Best regards, </div><div>Hui Ding </div><div><br></div><div><br></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>