-
|
I have some global data and for consistency with an old paper I need to calculate a temperature gradient in units of Kelvin per 100km. However, I'm not quite sure what the units are for the quantities coming out of the gradient() operator. I assume it's Kelvin per degree lat/lon... but that would carry the usual issues around the poles, so it must be something else... right? I looked through the documentation and github issues and couldn't find anyone discussing this. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi @whannah1, The gradient() operator in uxarray performs calculations on a unit sphere, so the output units are Kelvin per Radian (since your data is in Kelvin). To convert this to Kelvin per 100km, I think you need to apply the scaling factor for the Earth's radius manually; something like: Convert from K/rad to K/km by dividing by the Earth's radius (~6371 km). |
Beta Was this translation helpful? Give feedback.
Hi @whannah1, The gradient() operator in uxarray performs calculations on a unit sphere, so the output units are Kelvin per Radian (since your data is in Kelvin).
To convert this to Kelvin per 100km, I think you need to apply the scaling factor for the Earth's radius manually; something like:
Convert from K/rad to K/km by dividing by the Earth's radius (~6371 km).
Multiply by 100 to get K/100km.
So, gradient_k_per_100km = gradient_k_per_rad * (100 / 6371)."