Replies: 3 comments 4 replies
-
Hi @tik619, it would be helpful if you can share a subset of data and wrap your code posted above with ``` so that we can more easily look into the issue. Thanks! |
Beta Was this translation helpful? Give feedback.
2 replies
-
Actually i want the potential vorticity at 320k isentropic level. Can you
help me with that by correcting the code.
…On Fri, 11 Aug, 2023, 18:41 Richard Zhuang, ***@***.***> wrote:
Interesting. Based on your code, I think you are interpolating the
pressure-level data to the 320K isentropic level, but
potential_vorticity_baroclinic only provides functionality to calculate
potential vorticity at each pressure level, e.g.,
$$PV = -g \left(\frac{\partial u}{\partial p}\frac{\partial
\theta}{\partial y} - \frac{\partial v}{\partial p}\frac{\partial
\theta}{\partial x} + \frac{\partial \theta}{\partial p}(\zeta + f)
\right)$$
Note that the ${\partial p}$ indicates that the input should have an
additional pressure dimension, whereas currently you are supplying a 2-D
array to the potential_vorticity_baroclinic function. If you need
potential vorticity at the isentropic coordinates, my suggestion is to
compute them using pressure coordinates before interpolating them to the
isentropic coordinates. If you want something different, there are many
preliminary functions such as first_derivative and second_derivative in
MetPy that might suit your needs. I hope this helps!
—
Reply to this email directly, view it on GitHub
<#3143 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASYYLPN3IS5AXQT6X5CMXG3XUYVQVANCNFSM6AAAAAA3HI3MRA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Can you say how to do that, like by modifying my code?
…On Fri, 11 Aug, 2023, 19:11 Richard Zhuang, ***@***.***> wrote:
Well, you are not far away from what you want. And I should correct my
earlier comment: you can use potential_vorticity_baroclinic in isentropic
coordinate. What you need to do is to just interpolate the data to more
isentropic levels, say 318, 320, 322K instead of 320K so that the function
can compute a derivative in the vertical direction.
—
Reply to this email directly, view it on GitHub
<#3143 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASYYLPML2E3SIQJM2XKFYJLXUYZBTANCNFSM6AAAAAA3HI3MRA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to calculate isentropic vorticity using the metpy function "mpcalc.potential_vorticity_baroclinic", but I am encountering an error, which says:
Can anyone help me how to sove this issue. For your convenience I am also giving the code which I have prepared:
Beta Was this translation helpful? Give feedback.
All reactions