Re: Band Pass filter to dataset with topographic masking

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon Jan 28 2013 - 15:47:07 MST

The function was set up for our Community Atmosphere Model (CAM).
Hence the library name: diagnostics_cam.ncl
Th CAM uses hybrid vertical coordinate system and has no
missing values.

You can look at the code for any of the libraries. For example:

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

You would see
====================================================
[SNIP]

undef ("band_pass_area_time")
function band_pass_area_time \
                  (x[*][*][*]:numeric, spd[1]:numeric \
                  ,bpf[3]:numeric \
                  ,wy[*]:numeric, opt:logical)

local nMsg, dimx, dimwy, ntim, bpfStrt, bpfLast, bpfNwgt \
     , dumy, save_FillValue, fca, fcb, ihp, sigma, xts
begin
                                       ; error check
   nMsg = num( ismissing(x) )
   if (nMsg.gt.0) then
       print("band_pass_area_time: currently, missing data not allowed:
nMsg="+nMsg)
       exit
   end if

[SNIP]
; ====================================================

There are a couple of approaches ot changing the default behavior.
Here is one.

   %> cp $NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl
my.diagnostics_cam.n

Then, in 'my.diagnostics_cam.ncl' file, delete or comment the above
'if block'

=====================
Then comment or delete the call to the default diagnostics_cam.ncl
and load the my.diagnostics_cam.ncl script.

;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl"
load "./my.diagnostics_cam.ncl"

Good luck

On 01/27/2013 11:09 PM, Abhik Santra wrote:
>
> Dear Dennis,
>
> For my case, the data contains the missing value at some grid-points where the masking is applied.
> But the time-series at other grid-points don't contain any missing value.
> So, according to your reply, "band_pass_latlon_time" should do the filtering at those grid-points.
> But, it shows only the warning:
> (0) band_pass_latlon_time: currently, missing data not allowed: nMsg=2042644.
>
> There is no output from the script.
>
> I am using NCL ver:5.2.2 and the part of my script is as follows:
>
> spd = 1
> bpf = (/20,100,201/)
>
> optLatLon = False
> filt_latlon = band_pass_latlon_time (x, spd, bpf, optLatLon)
> printVarSummary(filt_latlon)
>
> Kindly, suggest me whether I have done any mistake or not.
> I hope to hear you soon.
>
> With regards,
> Abhik.
>
>
> ----- Original Message -----
> From: "Dennis Shea" <shea@ucar.edu>
> To: "Abhik Santra" <abhiksantra@tropmet.res.in>
> Sent: Saturday, January 26, 2013 3:34:11 AM
> Subject: Fwd: Re: [ncl-talk] Band Pass filter to dataset with topographic masking
>
> You were not included in the original reply to ncl-talk
>
>
> -------- Original Message --------
> Subject: Re: Band Pass filter to dataset with topographic masking
> Date: Fri, 25 Jan 2013 15:02:11 -0700
> From: Dennis Shea <shea@ucar.edu>
> To: ncl-talk@ucar.edu
>
>
> I answered this before (Jan 12, 2013).
> I am not sure what more I can say.
>
> For each grid point, the time series is operated upon
> by (say) a FFT or, optionally, a weighted running average.
>
> If the time series of values contains one or more missing values,
> a band pass filter can not be performed.
>
> As noted before, if you want values at grid points where u850
> is _FillValue, you must provide them.
>
> If you are applying "band_pass_latlon_time" I think it provide a warning
> message that grid points have time series with missing values.
> I thing it still does the computations at al grid points where
> there are valid time series.
>
> Good luck
>
> On 01/25/2013 06:24 AM, Abhik Santra wrote:
>>
>> Hello,
>>
>> I want to use 20-100-day band-pass filter to the anomalous u850 data from MERRA Reanalysis.
>> But the region in high mountains (e.g. the Himalaya/ Tibetan plateau) is masked with missing values in the dataset.
>> So, the "band_pass_latlon_time" function is not allowing me to filtering the dataset.
>> What is the alternate way to use the filter?
>>
>> With regards,
>> Abhik
>> ___________________________________________
>>
>> Abhik Santra
>> CSIR Research Fellow,
>> Indian Institute of Tropical Meteorology,
>> Pune - 411008.
>> India
>> ___________________________________________
>> _______________________________________________
>> 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 Mon Jan 28 15:47:15 2013

This archive was generated by hypermail 2.1.8 : Tue Jan 29 2013 - 22:44:26 MST