Horizontal Advection
Added by David Nielsen almost 5 years ago
Hello,
Is there a CDO command to calculate horizontal advection? Or the gradient of a scalar?
Thank you,
David
Replies (3)
RE: Horizontal Advection - Added by Ralf Mueller almost 5 years ago
hi David!
Short answer is: no.
Long answer: gradients, advection, rotation, divergence - all these operations are not about grids in the first place, but about discretization on these grids. A grid is just a list of cells with shape, center locations and connectivity. But this does NOT define what to put on these locations. Where should be scalars, where the velocities? This is a matter of discretization.
Hence there is no single correct gradient/divergence on a specific grids and CDO simply cannot provide them. This stuff is done in models
cheers
ralf
RE: Horizontal Advection - Added by David Nielsen almost 5 years ago
Hi Ralf,
Thanks for your reply (both short and long versions).
Maybe I am missing something very basic here, but since CDO can convert wind components to divergence and vorticity (uv2dv), I guessed that the operations needed for advection were already taken care of.
Where should be scalars, where the velocities? This is a matter of discretization.
I got it, that the gradient or divergence depends on the discretization. But if u and v data are provided as input, would it be enough to assume all grid characteristcs from the input files? Good old GrADS did something like this (http://cola.gmu.edu/grads/gadoc/gradfunchcurl.html).
Cheers,
David
RE: Horizontal Advection - Added by Ralf Mueller almost 5 years ago
David Nielsen wrote:
Hi Ralf,
Thanks for your reply (both short and long versions).
Maybe I am missing something very basic here, but since CDO can convert wind components to divergence and vorticity (uv2dv), I guessed that the operations needed for advection were already taken care of.
the implementation of uv2dv
is very specific:
Divergence and vorticity are spherical harmonic coefficients in spectral space and U and V are on a global regular Gaussian grid. The Gaussian latitudes need to be ordered from north to south.The problem is that you cannot now the discretization used for computing things on a grid by the grid itself. 'u' and 'v' can be given (in a file) anywhere on the grid: cell center, middle of the edges, corners of the cells. But this fact does not describe, how they got there. Is this the natural position from the model? Is this an interpolated location (and hence their value) for comparison with scalar values from the cell center? CDO simply cannot know these things. Finite Elements and Finite Differences methods might put prognostic variables on different places of the grid, but this strongly depends on the implementation within the model
Where should be scalars, where the velocities? This is a matter of discretization.
I got it, that the gradient or divergence depends on the discretization. But if u and v data are provided as input, would it be enough to assume all grid characteristcs from the input files? Good old GrADS did something like this (http://cola.gmu.edu/grads/gadoc/gradfunchcurl.html).
yes, but I bet only for regular lonlat grids with the standard C-grid discretization.
sorry, there is no easy solution for this I think
cheers
ralf