<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Dear NCL,<div class=""><br class=""></div><div class="">I would like to learn if there has been any progress on this reported bug when one uses certain pressure levels (e.g., 700hPa to 300hPa).</div><div class=""><br class=""></div><div class="">Regards,</div><div class=""><br class=""></div><div class="">Deniz</div><div class=""><br class=""></div><div class=""><div class=""><span class="" style="color: rgb(132, 132, 132); font-size: 11px; border-collapse: separate;"><div class="" style="word-wrap: break-word;"><span class="" style="border-collapse: separate;"><div class="" style="word-wrap: break-word;"><span class="" style="border-collapse: separate;"><div class="" style="word-wrap: break-word;"><span class="" style="border-collapse: separate;"><div class="" style="word-wrap: break-word;"><div class="" style="word-wrap: break-word;"><span class="" style="border-collapse: collapse; font-family: Arial;">--</span><div class="" style="border-collapse: separate;"><font face="Arial" class=""><div class="" style="word-wrap: break-word;"><div class="" style="border-collapse: separate; word-wrap: break-word;"><span class="" style="border-collapse: separate;"><div class="" style="word-wrap: break-word;"><div class="" style="word-wrap: break-word;"><div class="" style="word-wrap: break-word;"><div class="" style="border-collapse: separate;"><span class="" style="border-collapse: collapse;">Deniz Bozkurt, PhD<br class=""></span></div><div class="" style="border-collapse: separate;"><span class="" style="border-collapse: collapse;">Post-doctoral Fellow</span></div></div></div></div></span></div></div><span class="" style="border-collapse: collapse;">Center for Climate and Resilience Research</span></font></div></div><span class="" style="border-collapse: collapse; font-family: Arial;">Department of Geophysics</span>, University of Chile<span class="" style="border-collapse: collapse; font-family: Arial;"></span><div class=""><span class="" style="border-collapse: collapse; font-family: Arial;"></span><div class="" style="word-wrap: break-word;"><div class="" style="border-collapse: separate;"><span class="" style="border-collapse: collapse;"><font face="Arial" class="">Blanco Encalada 2002, Santiago, Chile</font></span></div><div class="" style="border-collapse: separate;"><font face="Arial" class=""><span class="" style="border-collapse: collapse;">E-mail: <a href="mailto:dbozkurt@dgf.uchile.cl" target="_blank" class="">dbozkurt@dgf.uchile.cl</a>, <a href="mailto:deniboz@gmail.com" target="_blank" class="">deniboz@gmail.com</a></span></font></div></div></div></div></span></div></span></div></span></div></span><span style="color: rgb(132, 132, 132); font-size: 11px;" class="">Web: </span><a href="http://dgf.uchile.cl/%7Edbozkurt/" target="_blank" class="" style="font-size: 11px;">http://dgf.uchile.cl/~dbozkurt/</a></div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div class=""><div class=""><div><blockquote type="cite" class=""><div class="">On Oct 19, 2015, at 8:11 PM, Dennis Shea <<a href="mailto:shea@ucar.edu" class="">shea@ucar.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">Thank you for sending the file. There is a bug.<br class=""><br class="">If you use ptop=0 or ptop=min(levels)=200, there is no bug. The [<br class="">psfc-ptop ] differences match the sum of the layer thickness.<br class=""><br class="">However, if you use a ptop > min(levels) [for example, ptop=500] a<br class="">small subset [0.7%] of the grid points do not sum correctly.<br class=""><br class="">I am out tomorrow. I will look on Wednesday.<br class=""><br class="">Regards<br class="">Dennis Shea<br class=""><br class=""><br class=""><br class=""><br class="">On Tue, Oct 13, 2015 at 11:56 PM, Bilbo Qiu <<a href="mailto:biloisbrave@gmail.com" class="">biloisbrave@gmail.com</a>> wrote:<br class=""><blockquote type="cite" class="">Dear everyone,<br class=""><br class="">It's my first time to send the email. I am trying to describe the problem<br class="">briefly as possible.<br class=""><br class="">Version: NCL 6.3.0<br class=""><br class="">System: Ubuntu<br class=""><br class="">No errors.<br class=""><br class="">Warning: dpres_plevel: At one or more grid points the sum of the layer<br class="">thicknesses is not equal to (psfc-ptop). Are units of plev, psfc and ptop<br class="">matching?<br class=""><br class="">Problems: I tried to calculate the pressure layer thickness "dp", using the<br class="">function "dpres_plevel". The input file is "ps_qv.nc", which includes two<br class="">variables, ps (surface pressure) and qv(specific humidity). I exported the<br class="">result to a file named "dp.nc". A warning displayed as the above. I checked<br class="">all of the units. It is "Pa". I visualized "dp.nc", using ncview and found<br class="">dp is about 3000 Pa on Tibet Plateau on the level of 1000 hPa where the<br class="">surface pressure is about 550 hPa. There should be no value on Tibet Plateau<br class="">where the surface pressure is much below 1000 hPa. In addition, there exists<br class="">extreme value about 30000 pa on the top level of 700 hPa on the boundary of<br class="">Tibet Plateau. The value is too big for dp. Below is my script:<br class="">--------------------------------<br class="">begin<br class=""> diri = "./"<br class=""> fili = "ps_qv.nc"<br class=""> fi = addfile(diri+fili, "r")<br class=""><br class=""> q = fi->qv(0,0:12,:,:) ; (levels, latitude, longitude), it will provide<br class="">coordinate information for dp<br class=""><br class=""> psfc = fi->ps(0,:,:) ; (lat,lon), the unit of the variable "ps" in the<br class="">input file is Pa<br class=""> psfc@units = "Pa"<br class=""> printVarSummary(psfc)<br class=""> printMinMax(psfc, 0)<br class=""><br class=""> ;isobaric levels<br class=""> plev = fi->levels(0:12) ;from 1000 to 700 hPa<br class=""> plev = plev*100. ;the unit of plev is hPa, convert it to Pa by *100<br class=""> plev@units = "Pa"<br class=""> printVarSummary(plev)<br class=""> printMinMax(plev, 0)<br class=""><br class=""> ptop= 70000<br class=""> ptop@units = "Pa"<br class=""><br class=""> dp = dpres_plevel(plev, psfc, ptop, 0) ; the key function<br class=""> copy_VarCoords(q, dp)<br class=""> printVarSummary(dp)<br class=""> printMinMax(dp, 0)<br class="">;output dp to a netCDF file<br class="">system("/bin/rm -f dp.nc") ; remove any pre-existing file<br class="">ncdf = addfile("dp.nc" ,"c") ; open output netCDF file<br class="">fAtt = True ; assign file attributes<br class="">fAtt@title = "NCL Simple Approach to netCDF Creation"<br class="">fAtt@source_file = "original-file.nc"<br class="">fAtt@Conventions = "None"<br class="">fAtt@creation_date = systemfunc ("date")<br class="">fileattdef( ncdf, fAtt ) ; copy file attributes<br class="">filedimdef(ncdf,"time",-1,True)<br class="">ncdf->dp = dp<br class="">end<br class="">-----------------------------------<br class=""><br class="">I couldn't find the source code of the function "dpres_pleve" and had no<br class="">idea where the errors are.<br class=""><br class="">I am looking forwards to your help.<br class=""><br class="">Additions: I set the surface pressure to a constant, 101800 Pa. The result<br class="">makes sense. I am wondering if the function is wrong when the surface<br class="">pressure is a 2-D or 3-D array.<br class=""><br class="">Bilbo Qiu<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class="">_______________________________________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk<br class=""><br class=""></blockquote>_______________________________________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk<br class=""></div></blockquote></div><br class=""></div></div></div></body></html>