[ncl-talk] Plotting vertical temperature from WRF

Dennis Shea shea at ucar.edu
Fri Mar 5 07:36:08 MST 2021


The simplest would be

    a = addfile("wrf...","r")

    tc  = wrf_user_getvar(a,"tc",-1)         ; T in C
    p   = wrf_user_getvar(a, "pressure",-1)  ; grid point pressure
    z   = wrf_user_getvar(a, "z",-1)         ; grid point height

    printVarSummary(tc)

    nt = 1
    nl = 50
    ml = 30
    TC = tc(nt,:,nl,ml)
    P  =  p(nt,:,nl,ml)

    wks   = gsn_open_wks ("png","WRF_VERT_PROF")       ; send graphics to
PNG file

    res                   = True                       ; plot mods desired
    res at tiMainString      = " Sample Profile Plot"     ; add title
    res at trYReverse        = True                       ; reverse Y-axis
    plot  = gsn_csm_xy (wks,TC,P,res) ; create plot


On Fri, Mar 5, 2021 at 3:47 AM ali mughal via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Dear all
>
> Is there any example code available to plot vertical temperature profile
> from WRF ?
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210305/1b436e3b/attachment.html>


More information about the ncl-talk mailing list