[ncl-talk] dpres_plevel_Wrap changed behavior in 6.4.0

David Ahijevych ahijevyc at ucar.edu
Tue Apr 4 17:00:52 MDT 2017


Hi Dennis,
ok .  it was the "tweener" capability that I found most useful in 6.3.0.  I
used it to calculate the 600-400 mb average temperature. This was useful
for identifying "warm core" cyclones.  Also to calculate environmental
steering flow.  The environmental steering flow would be calculated with
different upper boundaries to accommodate shallow and deep tropical storms.
The top pressure level of the averaging layer would almost always be .gt.
min(plev) (i.e. below the upper-most pressure level).

I'm not sure what the solution would be for pathological cases, but the old
version always worked for me.






On Tue, Apr 4, 2017 at 4:33 PM, Dennis Shea <shea at ucar.edu> wrote:

> 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/6041c873/attachment.html 


More information about the ncl-talk mailing list