WesternWRF
New member
I'm plotting storm relative helicity values using the wrf_helicity function in wrf.
Documentation https://www.ncl.ucar.edu/Document/Functions/Built-in/wrf_helicity.shtml 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.
Documentation https://www.ncl.ucar.edu/Document/Functions/Built-in/wrf_helicity.shtml 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.