Project

General

Profile

genlevelbounds ztop and zbot switched?

Added by Anne Moree over 1 year ago

Hello,

I am using genlevelbounds.
My ocean data top level is 5 meters depth, then 15 meters, 25 meters, etc.
I thus want the first set of bound to go from 0-10 meters.
Therefore, I did genlevelbounds,ztop=0 as just doing genlevelbounds sets the first interval from 5-10 meters.
When checking the results of genlevelbounds,ztop=0 however zbot is set to 0 instead of ztop.
Only when I do genlevelbounds,zbot=0 I get the right level bounds. Are zbot and ztop switched?

Using CDO 2.0.5

Attached the file I am working on.

Am I doing something wrong, can you reproduce this error or explain?

Thank you in advance,
Anne


Replies (3)

RE: genlevelbounds ztop and zbot switched? - Added by Karin Meier-Fleischer over 1 year ago

Hi Anne,

the lev attribute 'positive' set to 'down' causes the switching.

     lev:positive = "down" 

From CF-convention:

The direction of positive (i.e., the direction in which the coordinate values are increasing) is up or down.

RE: genlevelbounds ztop and zbot switched? - Added by Anne Moree over 1 year ago

Hi Karin,

Thank you so much, very clear! Maybe then the parameter name and description could clarify that this regards not the actual bottom or top of the column but the up or down direction of the levels.

Cheers,

Anne

RE: genlevelbounds ztop and zbot switched? - Added by Uwe Schulzweida over 1 year ago

Hi Anne,

I think if positive=down, then ztop and zbot should work as you expected. We will correct this in the next CDO version 2.1.2.

Cheers,
Uwe

    (1-3/3)