<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">The third example in the <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/prcwater_dp.shtml" class="">documentation</a> for the function "prcwater_dp" does not work as written (copied below):<div class=""><br class=""></div><div class=""><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-size: 13.3333px; line-height: 12pt; font-family: courier; border-style: solid; border-width: 0px 0px 15px; border-color: transparent; font-variant-ligatures: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255);" class=""> q = f->Q ; specific humidity [kg/kg]
hyai = f->hyai ; read from a file the interface hybrid coefficients (size = nlev)
hybi = f->hybi ; read from a file
ps = f->PS ; surface pressure [Pa]
p0 = 100000. ; since ps is in Pa
dp = <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/dpres_hybrid_ccm.shtml" style="margin: 0px; padding: 0px; text-decoration: none; color: rgb(133, 45, 133); font-family: verdana, sans-serif;" class=""><strong style="margin: 0px; padding: 0px;" class="">dpres_hybrid_ccm</strong></a>(ps,p0,hyai,hybi)
; dp(ntime,nlev-1,nlat,nlon)
dp!0 = "time"
dp!1 = "lev"
dp!2 = "lat"
dp!3 = "lon"
pw = <strong style="margin: 0px; padding: 0px;" class="">prcwater_dp</strong>(q(time|:,lat|:,lon|:,lev|:),dp(time|:,lat|:,lon|:,lev|:))
; pw [kg/m2]
pw@long_name = "total column precipitable water"
pw@units = "kg/m2"</pre><div class=""><br class=""></div></div><div class="">This is because the level dimension that "dpres_hybrid_ccm" outputs has size nlev-1 (which is noted in the example code), and the "prcwater_dp" function requires that the level dimensions be the same length. </div><div class=""><br class=""></div><div class="">I can work around this by subsetting the specific humidity, q, to leave out the highest level (so that its level dimension now has size nlev-1), but I just wanted to make a note that the example is not sufficient. </div><div class=""><br class=""></div><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><span style="background-color: rgb(255, 255, 255);" class="">---</span></div><div class=""><span style="background-color: rgb(255, 255, 255);" class="">Andrea Jenney</span><br class=""><span style="background-color: rgb(255, 255, 255);" class="">PhD Student | Randall & Barnes Groups</span></div><div class=""><span style="background-color: rgb(255, 255, 255);" class="">Colorado State University | Dept. of Atmospheric Science </span></div><div class=""><br class=""></div></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br class=""></body></html>