Dear seniors,
This is to a query regarding how to write the filtered data,
which was extracted using one of NCL filters, to a netcdf file without
loosing the time axis and lat and lon information. In the following example
ncl file, i want to write the *xBPF* variable without loosing time axis
etc., to a netcdf file. Thanks in advance for the solution.
******************************************************************************************
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"
begin
diri = "/Users/shea/Data/AMWG/"
vName = "U_anom" ; name of variable on the file
fili = "uwnd.day.850.anomalies.1980-2005.nc"
f = addfile(diri+fili, "r")
x = f->$vName$(:,{0},{120})
; ***********************************************
; create the filter weights and apply
; ***********************************************
ihp = 2 ; band pass
sigma = 1.0 ; Lanczos sigma
nWgt = 201 ; loose 100 each end
fca = 1./100. ; start freq
fcb = 1./20. ; last freq
wgt = filwgts_lanczos (nWgt, ihp, fca, fcb, sigma )
*xBPF * = wgt_runave ( x, wgt, 0 ) ; 20-100 day
*************************************************************************************************
regards,
Paul.
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Feb 19 04:23:52 2014
This archive was generated by hypermail 2.1.8 : Wed Feb 19 2014 - 15:58:35 MST