Re: error compiling bpf

From: Wilhelm Haygen <w.haygen_at_nyahnyahspammersnyahnyah>
Date: Fri Aug 10 2012 - 19:14:14 MDT

Hi Thanks,

I changed the function:
bpass = band_pass_latlon_time (x(:,{latS:latN},{lonL:lonR}),srate, bpf,
wgty({latS:latN}), opt)

then i got this error:
fatal:syntax error: function band_pass_latlon_time expects 4 arguments, got
5

I aware that the argument in the function of band_pass_latlon_time is
4 arguments.

function band_pass_latlon_time (
                x [*][*][*] : numeric,
                srate [1] : numeric,
                bpf [3] : integer,
                opt [1] : logical
        )

But why in the documentation, i found there are 5 arguments used.

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 Fri Aug 10 19:14:36 2012

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