Dear ncl users,I want to use the NCL "rip_cape_2d" to calculate CAPE and CIN.For this purpose I am using a radio sonde data.But I found the following errorsfatal:rip_cape_2d: The p, t, q, and z arrays must be 3 or 4-dimensional
fatal:Execute: Error occurred at or near line 27 in file cape_crash.ncl
This function cannot be used for 1D dataset?
Here my script; ***********************************************
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
;************************************************
begin
nrow = numAsciiRow("pres_04_05_07")
ncol = numAsciiCol("pres_04_05_07")
pres = asciiread("pres_04_05_07", (/nrow, ncol/), "float") ; pressure values
z = asciiread("z_04_05_07", (/nrow, ncol/), "float") ; geopotential heights
t = asciiread("t_04_05_07", (/nrow, ncol/), "float") ; temperature values
rhum = asciiread("rhum_04_05_07", (/nrow, ncol/), "float") ; relative humidity
td = asciiread("td_04_05_07", (/nrow, ncol/), "float") ; dew point temperature
psfc = asciiread("psfc_04_05_07", (/1/), "float") ; pressure at surface
zsfc = asciiread("zsfc_04_05_07", (/1/), "float") ; geopotential at surface
q = mixhum_ptd (pres, td, 2) ; specific humidities
cinfo = rip_cape_2d(pres, t, q, z, zsfc, psfc, True)
cape = cinfo(0)
cin = cinfo(1)
lcl = cinfo(2)
lfc = cinfo(3)
end
Thanks
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Oct 29 2008 - 03:49:17 MDT
This archive was generated by hypermail 2.2.0 : Wed Oct 29 2008 - 09:22:41 MDT