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


This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.


New member
I'm plotting storm relative helicity values using the wrf_helicity function in wrf.
Documentation states variables need to be ordered bottom_to_top but the example listed on the ncl page flips the vertical coordinate to a top_to_bottom. Following the example, my code runs fine, but produces negative SRH values, indicated a backing profile, which is opposite to what I have present in the data. Makes sense if the shear is being calculated in reverse order (i.e. top_to_bottom, as opposed to bottom_to_top). Assuming the flipped fields was the issue, I confirmed the arrays I was passing in following the example were set as top_to_bottom. I reversed them to reflect bottom_to_top and the function returns NaN numbers.

Trying to find the wrf_helicty function to check what's under the hood and to my surprise this is not included in the WRFUserARW.ncl file like all the other wrf functions. There is a single reference to a wrf_helicity_lat

Does anyone know where I can find this function to see which ordering is correct and why the bottom_to_top ordering results in NaN values being returned?

For context, here is the example on NCL
ua = wrf_user_getvar(a,"ua",4)
va = wrf_user_getvar(a,"va",4)
geopt = wrf_user_getvar(a,"z",4)
ter = wrf_user_getvar(a,"ter",4)

ua1 = ua:):-1,:,:)
va1 = va:):-1,:,:)
geopt1 = geopt:):-1,:,:)

sreh = wrf_helicity(ua1, va1, geopt1, ter, 3000.)

Again, I've confirmed this produces a top_to_bottom ordering, contrary to the documentation prototype.

I have attached the fortran program here for the helicity function.


  • wrf_relhl.f
    4 KB · Views: 54