About linint2_Wrap function

From: waqar younas <vickyqau_at_nyahnyahspammersnyahnyah>
Date: Fri Oct 05 2012 - 13:38:54 MDT

---------- Forwarded message ----------
From: waqar younas <vickyqau@gmail.com>
Date: Fri, Oct 5, 2012 at 12:09 AM
Subject: About linint2_Wrap function
To: ncl-talk@ucar.edu

Hi to all,
I am using linint2_Wrap to regrid NCEP precipitation data which is
originally have 94 lats and 192 lon. I want to regrid to 2.5 by 2.5 means,
to 73 lats and 144 lons.
But the regridded data is having fill values added, instead of real values
and i do not know the reason. Here is the code
begin

aa = addfile("precep_NCEP_1969_2002.nc", "r")

mm = short2flt(aa->prate(0,:,:)) ;;;; taking one time just to make sure
that code is working or not

m_1a = mm*86400

copy_VarCoords(mm,m_1a)

lon1 = aa->lon
lat1 = aa->lat

f = addfile ("uwnd.1969.nc", "r") ;;;; This is file having lats 73
and lon 144.

ff = f->uwnd(0,0,:,:)
lon2 = f->lon
lat2 = f->lat

;newlon = fspan(0,357.5,144)
;newlat = fspan(-90,90,73)

;newlat@units = "degrees_north"
;newlon@units = "degress_east"

;prep = linint2_Wrap(mm&lon,mm&lat,mm,True,newlon,newlat,0)

prep = linint2_Wrap(lon1,lat1,m_1a,True,lon2,lat2,0)

I tried both methods i.e. one using another file which is having the lats
and lon, i want to have in new file. I took lat and lon of those file and
applied the function to regrid. The other method is usual way which above i
commented. Both methods are giving same result i.e adding fill values to
regrided data instead of real values. Another thing i note that lon
dimension should be cyclic to put argument True in the linint2_Wrap. I do
not know which lons are cyclic and if they are not cyclic, how to make them?
Any help would be highly appreciable.
Thanks.

-- 
Best Regards
Waqar Younas
PhD Candidate
Natural Resources and Environmental Studies (NRES)
University of Northern British Columbia (UNBC)
Canada
-- 
Best Regards
Waqar Younas
PhD Candidate
Natural Resources and Environmental Studies (NRES)
University of Northern British Columbia (UNBC)
Canada

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Oct 5 13:39:00 2012

This archive was generated by hypermail 2.1.8 : Mon Oct 08 2012 - 15:54:16 MDT