Dear Alan,
Thanks a lot for your email! Do you have any suggestion abo=
ut how to match the dimensions based on my earlier ncl script?
Thanks =
a lot!
Mark
On Monday, June 16, 2014 4:49 PM, "Brammer, Alan P=
" <abrammer@albany.edu> wrote:
Mark,
fatal:["Execut=
e.c":7432]:performASSIGN_VAR_VAR_OP: Number of subscripts on rhs do not mat=
ch
> =
numbe=
r of dimensions of variable, (4) Subscripts used, (5) ▒
>
>fata=
l:["Execute.c":8128]:Execute: Error occurred at or near line 22 in file my3=
_CAPE.ncl
Line 22: cape = cape_3d(0,:,:,:) =
So in this line you’re telling NCL that cape_3d =
has 4 dimensions "(4) Subscripts used”. NCL is telling you t=
hat there are actually 5 dimensions.
Put a printVarSummary=
(cape_3d) in Line 21 and edit your subscripts accordingly.
The 5 d=
imensions are I imagine, (time, cape/cin, level, lat, lon ) maybe not in th=
at order.
You probably then want to also check that the output f=
ile CAPE3D matches the output dimensions of cape.
Alan.=
##############################
Alan Brammer,
PhD Stu=
dent,
Department of Atmospheric and Environmental Sciences,
Uni=
versity at Albany, State University of New York, Albany, NY,=
12222
abrammer@albany.edu
##############################
On Jun =
15, 2014, at 16:16, Mark Chan <cym263@yahoo.com> wrote:
Dear NCL users=
,
>
>
>In the below is an ncl script, which is for calculating CAPE a=
nd put the result into a file "CAPE_3D.nc". But I got the error message as:=
2013 - All Rights Reserved
> University Corporation for Atmospheric =
Research
> NCAR Command Language Version 6.1.2
> The use of t=
his software is governed by a License Agreement.
> See http://www.nc=
l.ucar.edu/ for more details.
>fatal:["Execute.c":7432]:performASSIGN_VAR=
_VAR_OP: Number of subscripts on rhs do not match
> =
=
number of dimensions of variable=
, (4) Subscripts used, (5) ▒
>
>fatal:["Execute.c":8128]:Execut=
e: Error occurred at or near line 22 in file my3_CAPE.ncl
>--------------=
-----------------------
>
>
>I would appreciate if you could give mor=
e suggestion about the "CAPE" based on my script here.
>
>
>Thanks so=
much!
>Mark
>
>
>
>===NCL script======
>
>=
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>load "$NCARG_RO=
OT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
>
>begin
>;
>; The WRF =
ARW input file.
>
> a = addfile("wrfout_d02_1994-01-11_00=
:00:00.nc","r")
>
> system("/bin/rm -f " + "CAPE_3D.nc")
=
>
> b = addfile("CAPE_3D.nc","c")
>
> dim_n=
ames = getvardims(a)
> dim_sizes = getfiledimsizes(a)
>=
dimUnlim = (/True, False, False, False, False, False, False,=
False, False/)
> filedimdef(b, dim_names, dim_sizes, dimUnli=
m)
> time = -1
>
> cape_3d = =
wrf_user_getvar(a,"cape_3d",time)
>
> cape = =
cape_3d(0,:,:,:)
>
> lat = a->XLAT
> lon =
= a->XLONG
> times = a->Times
> fileattdef(=
b,a)
>
> b->Times = times
> b->XLAT = lat=
>end
>
>
>
>
_______________________________________________
>n=
cl-talk mailing list
>List instructions, subscriber options, unsubscribe:=
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jun 16 08:46:55 2014
This archive was generated by hypermail 2.1.8 : Wed Jul 23 2014 - 15:33:46 MDT