[ncl-talk] Plotting vertical temperature from WRF
ali mughal
mughalali655 at gmail.com
Tue Mar 30 03:11:08 MDT 2021
Dear NCL community
I present outputs of height variable "z" from WRF out file at two
different locations.
a=addfile("../wrfout_d05_2016-04-01_00:00:00","r")
z = wrf_user_getvar(a, "z",-1)
printVarSummary(z)
Variable: z
Type: float
Total Size: 3776346000 bytes
944086500 values
Number of Dimensions: 4
*Dimensions and sizes: [Time | 697] x [bottom_top | 50] x [south_north |
129] x [west_east | 210]*
*Coordinates:*
Number Of Attributes: 6
FieldType : 104
MemoryOrder : XYZ
description : Height
units : m
stagger :
coordinates : XLONG XLAT
*height_level = z(0,0,1,1)*
print(height_level)
*(0) 5.383059*
*height_level2 = z(0,0,68,160)*
*(0) 18.77475*
My question is *"Is terrain height included in these two outputs" or
otherwise what is causing the difference between the two locations*. Kindly
note that the elevation above the mean sea level of the 2nd location is 15m
while the height above ground level is 2.3 m.
Kindly also see all the 50 outputs at these two locations below. Please
note that the difference between the two remains 13-14 until the 49th
level.
z(0,0,1,1) z(0,0,68,160)
0 5.383059 18.77475
1 16.15251 29.5406
2 26.92861 40.31371
3 37.71136 51.09355
4 48.49981 61.88059
5 59.83451 73.21494
6 72.31205 85.69195
7 86.04787 99.42865
8 101.1718 114.5554
9 117.8272 131.2154
10 136.1715 149.5663
11 156.38 169.7829
12 178.6464 192.0589
13 203.1851 216.6093
14 230.2344 243.6732
15 260.0597 273.5164
16 292.9561 306.4336
17 329.2521 342.7521
18 369.3103 382.8342
19 413.5336 427.0847
20 462.3755 475.9562
21 516.344 529.9549
22 576.0111 589.6461
23 642.0167 655.6616
24 715.0786 728.7151
25 796.0046 809.6158
26 885.7007 899.2866
27 985.1931 998.7753
28 1095.642 1109.26
29 1218.379 1232.083
30 1354.956 1368.808
31 1507.179 1521.247
32 1677.258 1691.569
33 1867.794 1882.306
34 2081.752 2096.376
35 2322.533 2337.195
36 2594.164 2608.816
37 2901.554 2916.091
38 3250.662 3264.939
39 3648.824 3662.816
40 4105.379 4119.386
41 4632.63 4647.065
42 5247.132 5261.918
43 5971.715 5986.403
44 6838.775 6853.297
45 7897.29 7911.953
46 9227.28 9241.734
47 10959.62 10972.7
48 13384.32 13395.36
49 17682.94 17688.51
On Sat, Mar 6, 2021 at 11:38 PM Dennis Shea <shea at ucar.edu> wrote:
> I would ask the WRF forum.
>
> Good Luck
>
> On Sat, Mar 6, 2021 at 1:19 AM ali mughal <mughalali655 at gmail.com> wrote:
>
>> Is there someone knowledgeable about WRF data in this forum or should I
>> forward this query to the WRF user forum ?
>> Thank you for your support
>>
>> On Saturday, March 6, 2021, Dennis Shea <shea at ucar.edu> wrote:
>>
>>> Sorry , I do not know. You will have to ask someone knowledgeable about
>>> WRF data.
>>>
>>> Sent from my iPhone
>>>
>>> On Mar 5, 2021, at 8:40 AM, ali mughal <mughalali655 at gmail.com> wrote:
>>>
>>> Thank you for sharing this.
>>>
>>> Is terrain height included in z and do I need to subtract the terrain
>>> height ?
>>>
>>> On Friday, March 5, 2021, Dennis Shea <shea at ucar.edu> wrote:
>>>
>>>> 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/20210330/9d72c6af/attachment.html>
More information about the ncl-talk
mailing list