[ncl-talk] dpres_plevel_Wrap changed behavior in 6.4.0
Dennis Shea
shea at ucar.edu
Tue Apr 4 16:33:03 MDT 2017
I'll look. dpres_plevel was changed to handle a 'pathological' case over
the Himalayas.
That said ... I should have changed the documentation to:
*ptop*
A scalar specifying the top of the column. Must be: (a) .le. min(plev) and
(b) have the same units as *plev*.
---
'ptop' was always meant to be ptop .le. min(plevel)
It was never meant to be an arbitrary *tweener* level. Hence the name ...
ptop
plev = (/200., 800 /)
pbot = 800.
ptop = min(plev) ; should be <= min(plev)
dp = dpres_plevel(plev, pbot, ptop, 0)
print("plev="+plev+" dp="+dp)
---
(0) plev=200 dp=300
(1) plev=800 dp=300
--
ptop = 50
dp = dpres_plevel(plev, pbot, ptop, 0)
print("plev="+plev+" dp="+dp)
(0) plev=200 dp=450
(1) plev=800 dp=300
On Mon, Apr 3, 2017 at 5:23 PM, David Ahijevych <ahijevyc at ucar.edu> wrote:
> Hi,
>
> I enjoy using the dpres_plevel_Wrap function to calculate
> weighted-averages, but the function changed from 6.3.0 to 6.4.0.
>
> Here is a simple script :
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> plev = (/200., 800 /)
> pbot = 800.
> ptop = 250.
> dp = dpres_plevel_Wrap(plev, pbot, ptop, 0)
> print("plev="+plev+" dp="+dp)
>
>
> In 6.3.0, the result is
>
> (0) plev=200 dp=250
>
> (1) plev=800 dp=300
> In 6.4.0 the result is
>
> (0) plev=200 dp=9.96921e+36
>
> (1) plev=800 dp=9.96921e+36
>
> I think the 6.3.0 way is correct.
>
> Dave
>
>
> _______________________________________________
> 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/20170404/f2b29b03/attachment.html
More information about the ncl-talk
mailing list