Re: error compiling bpf

From: Wilhelm Haygen <w.haygen_at_nyahnyahspammersnyahnyah>
Date: Tue Aug 14 2012 - 12:36:48 MDT

Hello NCL,
Thanks for the response, It worked. But i found a strange behavior in my
results. The data is empty.I save the bpass in netcdf file as follow. When
i tried to plot the result in Lat Lon map (2D) for time=0, i couldn't see
anything. No Valid data.

  latS = -20.
  latN = 20.
  lonL = 0.
  lonR = 360.

  srate = 1
  bpf = (/20,100,201/)
  opt = False
  bpass = band_pass_latlon_time (x(:,{latS:latN},{lonL:lonR}),srate, bpf,
opt)

diro ="./"
filo = "filterolr.nc"
NCFILE = diro+filo
system ("/bin/rm -f " + NCFILE)
ncdf = addfile(NCFILE,"c")
ncdf->olr_filt =bpass ; write data (lat,lon,time)
end

*Variable: bpass*
Type: float
Total Size: 3574080 bytes
            893520 values
Number of Dimensions: 3
Dimensions and sizes: [time | 365] x [lat | 17] x [lon | 144]
Coordinates:
            time: [17496624..17505360]
            lat: [-20..20]
            lon: [ 0..357.5]
Number Of Attributes: 18
  band_pass_Nwgts : 201
  band_pass_last : 100
  band_pass_start : 20
  process : wgt_runave
  wgt_runave_op_ncl : wgt_runave
  missing_value : 32766
  valid_range : ( 0, 500 )
  _FillValue : 32766
  parent_stat : Individual Obs
  statistic : Mean
  level_desc : Other
  dataset : NOAA Interpolated OLR
  precision : 2
  var_desc : Outgoing Longwave Radiation
  units : W/m^2
  actual_range : ( 83.5, 338.19 )
  unpacked_valid_range : ( 0, 500 )
  long_name : Band Pass: Daily OLR

Thanks for your help.
WH
-

On Sat, Aug 11, 2012 at 2:33 AM, David Brown <dbrown@ucar.edu> wrote:

> You don't have a closing parenthesis for the subscript of the x variable.
> -dave
>
> On Aug 10, 2012, at 6:04 PM, Wilhelm Haygen wrote:
>
> Hi NCL users,
> Anybody know why i couldnt run this simple script?
>
> fatal:syntax error: line 22 before or near \n
> bpass = band_pass_latlon_time (x(:,{latS:latN},{lonL:lonR},srate, bpf,
> wgty({latS:latN}), opt)
>
> ------------------------------------------------------------------------------------------------^
>
> fatal:Syntax Error in block, block not executed
>
>
> Thanks
>
> 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/diagnostics_cam.ncl"
>
> begin
>
> f = addfile("./golden_mjo.nc", "r")
> x = short2flt(f->olr) ; (time,lat,lon) , ntim=1461
> printVarSummary( x )
>
> ; select region
> latS = -20.
> latN = 20.
> lonL = 0.
> lonR = 360.
>
> srate = 1
> bpf = (/20,100,201/)
> wgty = latRegWgt(x&lat, "float", 0)
> opt = False
>
> bpass = band_pass_latlon_time (x(:,{latS:latN},{lonL:lonR},srate, bpf,
> wgty({latS:latN}), opt)
>
> diro ="./"
> filo = "filterolr.nc"
> a = addfile(diro+filo, "c")
> a->olr_filt =bpass
> end
>
>
> Variable: x
> Type: float
> Total Size: 15347520 bytes
> 3836880 values
> Number of Dimensions: 3
> Dimensions and sizes: [time | 365] x [lat | 73] x [lon | 144]
> Coordinates:
> time: [17496624..17505360]
> lat: [90..-90]
> lon: [ 0..357.5]
> Number Of Attributes: 13
> long_name : Daily OLR
> unpacked_valid_range : ( 0, 500 )
> actual_range : ( 83.5, 338.19 )
> units : W/m^2
> var_desc : Outgoing Longwave Radiation
> precision : 2
> dataset : NOAA Interpolated OLR
> level_desc : Other
> statistic : Mean
> parent_stat : Individual Obs
> _FillValue : 32766
> valid_range : ( 0, 500 )
> missing_value : 32766
> _______________________________________________
> 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 Tue Aug 14 12:36:58 2012

This archive was generated by hypermail 2.1.8 : Wed Aug 15 2012 - 08:12:08 MDT