You can 'trick' the "vinth2p" into working.
Consider data(time,lev) and ps(time):
dimd = dimsizes(data)
ntim = dimd(0)
klev = dimd(1)
DATA = new( (/ntim,klev,1,1/), typeof(data))
DATA(:,:,0,0) = data
PSFC = new( (/ntim,1,1/), typeof(ps))
PSFC(:,0,0) = ps ;
Pa
; +++ from example 4
lev_p = (/ 10, 20, 30, 50, 70,100,150,200,250 \
, 300,400,500,600,700,850,925,1000
/)
lev_p!0 = "lev_p" ; variable/dim name
lev_p&lev_p = lev_p ; create coordinate variable
lev_p@long_name = "pressure" ; attach some attributes
lev_p@units = "hPa"
lev_p@positive = "down"
; CAM outputs bottom-to-top
hybm = sigma ; hybm is the 'sigma' coordinate
hyam = hybm ; create a bogus hyam 1D array
hyam = 0.0 ; set all values to zero
P0mb = 1000.0
DATAP = vinth2p(DATA, hyam, hybm, lev_p, PSFC, intyp, P0mb, 1,
False )
printVarSummary(DATAP) ; (ntim, dimsizes(lev_p), 1,1)
datap = DATAP(:,:,0,0)
printVarSummary(datap)
On Fri, Jun 27, 2014 at 1:30 PM, Rashed Mahmood <rashidcomsis@gmail.com>
wrote:
> Hi,
>
> I have two dimensional data as (time,lev) which is on hybrid sigma level.
> I want convert from sigma to pressure levels.
> For 3D or higher Dimensions it can easily be done using "vinth2p" function
> but I am not sure how to do this with 2D (time,lev) or simply 1D (lev) data
> sets.
>
> Is there any workaround for this?
>
> Thanks
> Rashed
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
Received on Mon Jun 30 02:59:24 2014
This archive was generated by hypermail 2.1.8 : Wed Jul 23 2014 - 15:33:46 MDT