[ncl-talk] Problem in calculating CAPE

vivek at ncmrwf.gov.in vivek at ncmrwf.gov.in
Wed Mar 14 05:20:07 MDT 2018


Hello Sir,
I have a model data(nc format). I am trying to calculate CAPE as below.

;CAPE and CIN in ncl:
     f = addfile("./cape.nc" , "r")
     p = (/ 10.000000, 20.000000, 30.000000, 50.000000, 70.000000,
100.000000  \
           , 150.000000, 200.000000, 250.000000, 300.000000, 400.000000,
500.000000  \
           , 600.000000, 700.000000, 850.000000, 925.000000, 950.000000,
1000.000000 /)
     t = f->temp
     q = f->q
     z = f->ht_1
;    p = conform_dims (dimsizes(q),p,0)
     zsfc = f->ht ; (lat,lon)
     psfc = f->p_1         ; (lat,lon) or (time,lat,lon)
     cinfo = wrf_cape_3d(p, t, q, z, zsfc, psfc, False) ; cinfo(2,...)
;    cape3d = wrf_user_getvar(f,"cape_3d",-1)

I am getting following error.

fatal:conform_dims: the dimensions sizes of the second argument do not
match those indicated by the third argument
fatal:["Execute.c":8575]:Execute: Error occurred at or near line 9 in file
cape.ncl

fatal:wrf_cape_3d: The p, t, q, and z arrays must all have the same number
of dimensions
fatal:["Execute.c":8575]:Execute: Error occurred at or near line 12 in
file cape.ncl



What I could understand from the error is  the dimension of 'p' is not
matching with dimension of q(or t; lat, lon, lev, time).

Kindly suggest that How to match the dimension of p with that of q/t

Thnking You,

Vivek






-- 
Yours Sincerely
----------------
Vivek Singh
(Scientist-'C')
NCMRWF,A-50, Sector-62,
Ministry of Earth Sciences
NOIDA.U.P. 201309
Mobile:09821123574,07042321724
Institute Website: www.ncmrwf.gov.in
Alternate email: vivek.sgh1 at gmail.com



More information about the ncl-talk mailing list