Re: How to use rip_cape_2d with radiosonde dataset?

From: louis Vonder <appopson_at_nyahnyahspammersnyahnyah>
Date: Fri, 31 Oct 2008 15:28:18 +0000 (GMT)

Sorry Denis,In a previous message I send the script.
Here the script I am talking aboutThanks; ***********************************************
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
  PP = new ( (/nrow, 1, 1/), typeof(pres), getFillValue(pres))

  z = asciiread("z_04_05_07", (/nrow, ncol/), "float") ; geopotential heights
  ZZ = new ( (/nrow, 1, 1/), typeof(z), getFillValue(z))

  t = asciiread("t_04_05_07", (/nrow, ncol/), "float") ; temperature values
  TT = new ( (/nrow, 1, 1/), typeof(t), getFillValue(t))

  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
  PS = new ( (/1, 1/), typeof(psfc), getFillValue(psfc))

  zsfc = asciiread("zsfc_04_05_07", (/1/), "float") ; geopotential at surface
  ZS = new ( (/1, 1/), typeof(zsfc), getFillValue(zsfc))

  q = mixhum_ptd (pres, td, 2) ; specific humidities
  QQ = new ( (/nrow, 1, 1/), typeof(q), getFillValue(q))

  cinfo = rip_cape_2d(PP, TT, QQ, ZZ, ZS, PS, True)

  cape = cinfo(0)
  cin = cinfo(1)
  lcl = cinfo(2)
  lfc = cinfo(3)

print(cape)

end

--- En date de : Ven 31.10.08, Dennis Shea <shea_at_ucar.edu> a écrit :
De: Dennis Shea <shea_at_ucar.edu>
Objet: Re: [ncl-talk] How to use rip_cape_2d with radiosonde dataset?
À: appopson_at_yahoo.fr
Date: Vendredi 31 Octobre 2008, 14h02

Louis

You did not send the script.

Most of us are not paid by the NCL project.
We want to help people but we must do our own jobs also.

Please try print statements. That is what we would do.
Then, sfter you have tried different thing, send us a *clean*
script. Often, people send us scripts
with mnay commented lines and the code is poor.

Our time is valuable too.

Regards
D

louis Vonder wrote:
>
> Hi every body,
>
> Someone found what is wrong with my script?
>
> Thanks
>
> --- En date de : *Mer 29.10.08, Mary Haley /<haley_at_ucar.edu>/* a
écrit :
>
> De: Mary Haley <haley_at_ucar.edu>
> Objet: Re: [ncl-talk] How to use rip_cape_2d with radiosonde dataset?
> À: "Dennis Shea" <shea_at_ucar.edu>
> Cc: appopson_at_yahoo.fr
> Date: Mercredi 29 Octobre 2008, 19h31
>
> Minor correction, conform_dims is in V5.0.1, not 5.0.0. We hope to
> release 5.0.1 in late November.
>
> --Mary
>
>
> On Wed, 29 Oct 2008, Dennis Shea wrote:
>
> > TT = new ( (/1,nlevel,1,1/), typeof(T), getFillValue(T))
> > > or, with the yet to be released, 5.0.0
> > > TT = conform_dims( (/1,nlevel,1,1/), T, 1)
> > > Good luck
> > > louis Vonder wrote:
> >> >> Many Thanks Dennis,
> >> >> Data I am using is already ordered top to bottom
as indicated in the
> document.
> >> >> But, how to create nominal multi-dimensional
arrays ?
> >> >> Thanks
> >> >> --- En date de : *Mer 29.10.08, Dennis Shea
/<shea_at_ucar.edu>/* a
> écrit :
> >> >> De: Dennis Shea <shea_at_ucar.edu>
> >> Objet: Re: [ncl-talk] How to use rip_cape_2d with
radiosonde
> dataset?
> >> À: appopson_at_yahoo.fr
> >> Cc: ncl-talk_at_ucar.edu
> >> Date: Mercredi 29 Octobre 2008, 15h21
> >> >> 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

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Oct 31 2008 - 09:28:18 MDT

This archive was generated by hypermail 2.2.0 : Tue Nov 04 2008 - 10:41:27 MST