Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

How to plot vertical wind profile in NcView

prick

New member
I'm new to WRF model. I want to plot vertical wind speed profile in NcView, with v and u component along the elevation. A few questions:
1. I only found the layer command, not the actual elevation. Is there a way to turn the layer into actual elevation?
2. How to plot the combination of u and v components?
3. Even the u/v component vs layer plot I made seems really weird. I assume the layer is proportional to the elevation. The attachment shows my plot, with x being the wind speed, and y being the layer. In reality, the wind speed should always increase along the elevation, not like my plot. Not sure what is the proper way to plot.

Thank you for your help.
 

Attachments

  • Screenshot 2024-04-25 210207.png
    Screenshot 2024-04-25 210207.png
    40.6 KB · Views: 16
Last edited:
Raw wrfout files, when plotted with ncview, don't have elevation (in pressure or height) as the vertical coordinate, instead the vertical numerical level is the vertical coordinate. This coordinate is stretched.

If you want to plot u, v as a function of actual height, then you will need to extract the PH and PHB fields (geopotential perturbation and base geopotential), as well as the variables of your choice and then interpolate those variables on the z=(PH + PHB)/9.81 field. You can use CDO for extraction and some other tool for interpolation (I use wrf-python).

I don't think ncview can be used to plot two variables at the same time (although same variable at different points is possible). I guess you can open ncview twice?

Layer is not proportional to elevation, but it is monotonic. Layer roughly corresponds to pressure level (kinda), so the spacing between the levels in terms of actual height is not uniform usually, unless you rig it to be so. The picture you provided should mentally be "stretched" (but not uniformly so, values for bigger bottom_top should be stretched more).
 
Thank you so much for your inputs. They are very helpful. Just to follow up:
Sounds like I cannot use NcView to directly plot the vertical wind speed profile that I desire. I have to write a script to make the plot.

I actually meant to plot the magnitude of wind speed, i.e,. sqrt (v^2+u^2), versus elevation. Does this mean I need to write a script to calculate the magnitude then plot?

The actual wind speed profile should look like below, with y axis being elevation though. The picture I provided, even after being "stretched", looks very different. Does the velocity in NcView need to be further processed in order to show the actual values?

Thanks a lot!
 

Attachments

  • Screenshot 2024-04-26 080113.png
    Screenshot 2024-04-26 080113.png
    119.3 KB · Views: 17
Are you familiar with the structure of the .wrfout file (the wrf output file)? It has many 1, 2 3 and 4D fields. Wind speed is not one of them, instead U and V components are. You can calculate speed from them.

But you still need to interpolate them onto a height axis since fields in .wrfout files are not functions of actual height, but instead "eta coordinate", which is not the same as height above ground.

I recommend looking into tools such as CDO, wrf-python, xarray and so on. There are others but I am not familar with them.
 
Top