Re: How to use rip_cape_2d with radiosonde dataset?

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed, 29 Oct 2008 08:21:05 -0600

As noted in the documentation, there is very limited support
for this routine.

[1]
You could create nominal multi-dimensional arrays.

T[nlevel] ==> TT(nlevel,1,1) or TT(1,nlevel,1,1)
etc

[2]

As noted in the documentation, the data must be top to bottom [sfc]

if not, usee the ::-1 syntax to reverse the order.

    TT(:,0,0) = T(::-1)

Good luck

louis Vonder wrote:
> 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 errors
>
> fatal: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
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Oct 29 2008 - 08:21:05 MDT

This archive was generated by hypermail 2.2.0 : Wed Oct 29 2008 - 09:22:41 MDT