Re: DSS Example SkewT

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu Jul 12 2012 - 19:52:00 MDT

The skewT code can be examined via:

%> less $NCARG_ROOT/lib/ncarg/nclscripts/csm/skewt_func.ncl

Line number 716 is

  716 "tiMainFont" : tiMainFont

The error message

> /fatal:And: Dimension size, for dimension number 0,
> of operands does not match, can't continue

does not make sense.

========================================================
Variable: p
Dimensions and sizes: [nobs | 66]

---
Variable: tc
Dimensions and sizes:	[66]
---
Variable: tdc
Dimensions and sizes:	[61]   <==========
---
Variable: z
Dimensions and sizes:	[nobs | 66]
---
Variable: q
Dimensions and sizes:   [61]  <============ tdc=f(q)
The dimension sizes for p,tc,z and q (=tdc) are assumed to be the same.
They are not ... hence the error.
Whenever you get any type of 'Dimension size' error, use print or
printVarsummary.
==============================================================
I added a fix. This checks the sizes of the station_prs_tmp
and station_prs_dpt arrays. If not the same the dpt is
interpolated to the pressure levels of tmp.
---
   station_hgt_tmp = obs_station(where_tmp, 3)  ; geopotential height
   station_prs_tmp = obs_station(where_tmp, 2)  ; tmp(prs_tmp))
   station_prs_dpt = obs_station(where_dpt, 2)  ; dpt(prs_dpt)
   station_prs_u   = obs_station(where_u, 2)
   station_prs_v   = obs_station(where_v, 2)
                                                ; ?different # of levels?
   if (dimsizes(station_prs_dpt).ne.dimsizes(station_prs_tmp)) then
      ;print(station_prs_tmp)
      ;print(station_prs_dpt)
                                                ; interpolate to prs_tmp
       STATION_PRS_DPT = 
int2p(station_prs_dpt,station_dpt,station_prs_tmp,0)
       delete(station_dpt)
       station_dpt = STATION_PRS_DPT
   end if
Good luck
On 7/12/12 5:24 AM, ahmed lasheen wrote:
> Hello all
> I am trying to use the script about the DSS Example SkewT ,I downloaded
> the data /netcdf.gdas.2012071100.nc <http://netcdf.gdas.2012071100.nc>/
> and run the script  using the same command illustrated in the script
>
> /ncl 'ncfile="netcdf.gdas.2012071100.nc
> <http://netcdf.gdas.2012071100.nc>"' 'station_icao="KDNR"'
> 'station_synop="72469"' skewt_station.ncl/
>
> and I got the following error
>
> /fatal:And: Dimension size, for dimension number 0, of operands does not
> match, can't continue
> fatal:["Execute.c":7556]:Execute: Error occurred at or near line 716 in
> file $NCARG_ROOT/lib/ncarg/nclscripts/csm/skewt_func.ncl
> fatal:["Execute.c":7556]:Execute: Error occurred at or near line 2168 in
> file $NCARG_ROOT/lib/ncarg/nclscripts/csm/skewt_func.ncl
> fatal:["Execute.c":7556]:Execute: Error occurred at or near line 135 in
> file skewt_station.ncl/
>
> The error is in the function /skewt_data = skewT_PlotData(wks,
> skewt_bkgd, p,tc,tdc,z, wspd,wdir, dataOpts)/
> I cannot find exactly what is wrong with the function.
> I have attached the script.
> I am using NCL 6.1.0-beta
>
> thanks in advance .
>
>
> --
> ===============
> Ahmed Lasheen
> Junior researcher at Cairo Numerical Weather Prediction Center (CNWPC)
> Egyptian Meteorological Authority(EMA)
> Cairo,Egypt
> ===============
>
>
>
> _______________________________________________
> 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 Thu Jul 12 19:52:07 2012

This archive was generated by hypermail 2.1.8 : Wed Jul 18 2012 - 14:33:00 MDT