Project

General

Profile

derivative operators?

Added by Paolo Davini over 7 years ago

First of all, I want to say that it is been a few years now I am using CDO and I find it an extremely powerful tool.
So thank you for developing it.

I am here today because I realized that an operator that is missing is something that computes horizontal and vertical derivatives of a given field.
However, since vorticity and divergence are usually computed by CDO from U,V fields, I guess that these operators (at least horizontal derivatives) are there, perhaps hidden.

So here it is my point: are there any undocumented operators to compute derivatives?
You CDO developers please take this as a small suggestion, if in the future you will find some time to add something like that, it will be fantastic.

Best regards,
Paolo


Replies (4)

RE: derivative operators? - Added by Ralf Mueller over 7 years ago

Hi Paolo!

Unfortunately there is no such operator available. Divergence and vorticity from u and v are computed for regular-like grids like gaussian grids or spectral grids. but in general you need a dual version of the input grid, which is not easy to find - it depends on the discretization.

cheers
ralf

RE: derivative operators? - Added by Paolo Davini over 7 years ago

Hi Ralf,

thanks for the reply! I will keep dreaming for the operator, perhaps one day it will be part of CDO ;-)
Cheers,
Paolo

RE: derivative operators? - Added by Miles Sowden almost 4 years ago

Is this not partly addressed if there were a deltax and deltax similarly to deltat (time differences).
Could then use dx/dt = deltax / deltat?

Shiftx could be used if you have a regular lat/long grid (cdo in.nc sub shiftx,1 in.nc out.nc)

RE: derivative operators? - Added by Ralf Mueller almost 4 years ago

hi Miles!

Compared to x and y the time axis is extremely simple: just some discrete points in a fixed order, often equally spaced. But what about a grid like this

Depending on the discretezation the cell center of a triangle can have multiple definition: inner circle center, outer circle center, balance point. X and Y directions have now meaning here. Even if you compute differences in a classical way you will end up at new grid locations. But it is not possible to know is where the real position of the gradient in the model that created the data was. Maybe it is at the point of the classical gradient, maybe it is at the corners of the triangle - the input doesn't tell you.

dx/dt = deltax / deltat?

eh, no -

you can compute d/dt of a field T by applying the deltaT operator on it.

hth
ralf

    (1-4/4)