Project

General

Profile

How to extract values from a vertical layer

Added by Yonas Mersha Yigezu over 3 years ago

Hello,
I am having difficulties extracting the maximum value for each grid cell along with the levels and also the level index value for each maximum value.
I am able to use 'vertmax' CDO code to extract the maximum values at each grid cell along with the vertical levels using the following code:

cdo -vertmax PCT_PFT.nc output.nc

My file have the following dimensions: lat, lon and lsmpft(level),
lat = 55 ;
lon = 52 ;
lsmpft = 17 ;
the 'lsmpft' has 17 levels as given bellow
lsmpft = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
and the variables 'PCT_PFT ' is represented as PCT_PFT(lsmpft,lat,lon)

I need to extract the level index values where the maximum values found at each grid cell. Any help?