[ncl-talk] problem with prcwater_dp example 3 (use with dpres_hybrid_ccm)

Dennis Shea shea at ucar.edu
Tue Oct 23 11:59:09 MDT 2018


Hi Andrea,

The function documentation has been changed.

The 'Description' section mentions the historical reason why 'dimension
reordering' was used.

More comments are included in the examples. This includes some units
information.

Example 4 illustrates a more elaborate step-by-step example of calculating
column precipitable water. It uses a different function [dim_sum_n_Wrap]
which
was not available at the time that 'prcwater_dp' was created.

*https://www.ncl.ucar.edu/Document/Functions/Built-in/prcwater_dp.shtml*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/prcwater_dp.shtml>


D
On Tue, Oct 16, 2018 at 1:56 PM Andrea Jenney <andrea at atmos.colostate.edu>
wrote:

> The third example in the documentation
> <https://www.ncl.ucar.edu/Document/Functions/Built-in/prcwater_dp.shtml> for
> the function "prcwater_dp" does not work as written (copied below):
>
>   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   = *dpres_hybrid_ccm* <https://www.ncl.ucar.edu/Document/Functions/Built-in/dpres_hybrid_ccm.shtml>(ps,p0,hyai,hybi)
> ; dp(ntime,nlev-1,nlat,nlon)
>   dp!0 = "time"
>   dp!1 = "lev"
>   dp!2 = "lat"
>   dp!3 = "lon"
>
>   pw = *prcwater_dp*(q(time|:,lat|:,lon|:,lev|:),dp(time|:,lat|:,lon|:,lev|:))
> ; pw [kg/m2]
>   pw at long_name = "total column precipitable water"
>   pw at units     = "kg/m2"
>
>
> 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.
>
> 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.
>
> ---
> Andrea Jenney
> PhD Student | Randall & Barnes Groups
> Colorado State University | Dept. of Atmospheric Science
>
>
>
>
>
>
>
> _______________________________________________
> 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/20181023/970c7bd5/attachment.html>


More information about the ncl-talk mailing list