Project

General

Profile

intlevel, intlevel3d

Added by Joana DeMedeiros over 12 years ago

Hello,
This is joana from IDL in Portugal.
In our institute we are wanting to use cdo to interpolate eta_levels to model_levels.Basicly we want to interpolate the sum of vars PH and PHB (named PHPHB) to lets say the velocity levels.
We want to do a simple vertical averaging for the grid PHPHB, like this example:

PHPB = ((PHPB + PHPB) /2
PHPB = ((PHPB + PHPB) /2
PHPB = ((PHPB + PHPB) /2

where PHPB has dimensions(time,level,xlat,xlong).
I've encountered the operator intlevel and intlevel3d, but the description lacks of practical examples, and i am not sure if this is the right path to follow.
We have some urgency in this matter, because is for some example vars for students to manipulate.

many thanks in advance
cheers

Joana de Medeiros
IDL/FCUL
Lisbo, Portugal


Replies (3)

RE: intlevel, intlevel3d - Added by Ralf Mueller over 12 years ago

intlevel is for simple 1D vertical dimensions. If your intput has vertical axis with values 1000,800,500,100,10,0 you can interpolate it to 900,600,400,200,100 with

 cdo intlevel,900,600,400,200,100 ifile ofile

intlevel3d is meant to interpolate between 2 3d-vertical coordinates, e.g. a 3d-height variable. This is the most general form of all hybrid vertical coordinate systems like eta, hybrid height or hybrid sigma pressure.

To get it practical:

  • What are your target model_levels? another eta coordinate or hybrid hight or ...?
  • Could you provide some example input?
  • What is the purpose of the complete processing? Could it be achieved in a different way?

As far as I know eta coordinates do not get any special handling by CDO.

regards
ralf

RE: intlevel, intlevel3d - Added by Paolo Davini almost 8 years ago

Hi all,

I found this old post and I have a question that can be considered related.
I tested intlevel with generic grids also and it seems working fine.

I was wondering if there is a way to supply a full vertical axis to intlevel instead of the single levels, in a similar way of what done with the horizontal remapping.
In my case I need to interpolate to a vertical axis of 256 levels (I have the vertical grid of this, coming from zaxisdes), thus it is a bit long to write them down (although feasible).

Thanks in advance for any reply, even negative!
Best,
Paolo

RE: intlevel, intlevel3d - Added by Ralf Mueller almost 8 years ago

Although there is no such option, you could avoid writing down the 256 values with the following:

  • use the output of showlevel as input list for intlevel

if you already have the vertical axis in another file, showlevel returns a space-separated list of values like this

ram@luthien:~/local/data/icon cdo -s showlevel iconM.nc
 25 100 250 500 875 1400 2100 3000 4000 5000
ram@luthien:~/local/data/icon cdo -s showlevel iconM.nc | tr ' ' ','
,25,100,250,500,875,1400,2100,3000,4000,5000

or

targetLevels=$(cdo -s showlevel iconM.nc | tr ' ' ',')
cdo intlevel$targetLevels ifile ofile
    (1-3/3)