Re: error compiling bpf

From: Wilhelm Haygen <w.haygen_at_nyahnyahspammersnyahnyah>
Date: Tue Aug 14 2012 - 14:26:16 MDT

HI,
I think the problem is not in the plotting code.
Here are some min/max of bpass values at the first, 10th, 100th,
200th time step.

ncl 24> printMinMax(bpass(0,:,:),0)
(0) Band Pass: Daily OLR: *min=9.96921e+36 max=9.96921e+36*
ncl 25> printMinMax(bpass(10,:,:),0)
(0) Band Pass: Daily OLR: *min=9.96921e+36 max=9.96921e+36*
ncl 26> printMinMax(bpass(100,:,:),0)
(0) Band Pass: Daily OLR: *min=-84.083 max=46.403*
ncl 27> printMinMax(bpass(200,:,:),0)
(0) Band Pass: Daily OLR: *min=-68.0747 max=39.9504*

Is it a normal behavior of bpf results?, i guess not.

Thanks,
WH.
*
*
*
*

On Tue, Aug 14, 2012 at 9:44 PM, Mary Haley <haley@ucar.edu> wrote:

> It's not clear whether the issue is with the actual bpass values, or with
> the plotting code itself.
>
> How are you trying to plot the data? It would help if we could see your
> script. Did you by any chance set res@mpCenterLon to 180 just in case?
>
> You should add some print statements to see what the min/max of your data
> looks like.
>
> For example, if you are trying to plot the first timestep:
>
> printMinMax(bpass(0,:,:),0)
>
> will give you the min/max of bpass at the first time step.
>
> --Mary
>
> On Aug 14, 2012, at 12:36 PM, Wilhelm Haygen wrote:
>
> 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 14:26:25 2012

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