Re: regridding problem

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed Feb 20 2013 - 10:09:03 MST

Try setting raster mode for the 1x1 also.

---
When you *contour* data, there must be multiple grid boxes
next to each other containing non-missing data.
---
When you interpolate, if the target 2.5 degree grid location
has three or fewer non-missing 1x1 grid points surrounding
it, then the linint2 code will return a missing value.
Hence, you can get fewer points.
On 02/20/2013 09:12 AM, cheryl Ma wrote:
> Yes. It works. Thanks, Dennis.
>
> why it is need to set Raster mode for 2x5 data, but no need for 1x1? is
> there any criterion?
>
>
> On Wed, Feb 20, 2013 at 10:51 AM, Dennis Shea <shea@ucar.edu
> <mailto:shea@ucar.edu>> wrote:
>
>     When you plot this grid,
>
>     res@cnFillMode       = "RasterFill"       ; Raster Mode
>
>     This may help
>
>
>     On 2/20/13 8:44 AM, cheryl Ma wrote:
>
>         Hi all,
>
>         I am regridding a nc file data (data.nc <http://data.nc>) in 1x1
>         to a new data nc file (
>         regrid_data.nc <http://regrid_data.nc>) in 2x5. It seems the ncl
>         script I used below works fine (no
>         error information etc.). But plots (attached) created by using
>         these two
>         files look different. Could anyone tell me what is wrong?
>
>         I have uploaded the files data.nc <http://data.nc> and
>         regrid_data.nc <http://regrid_data.nc> to the ftp site under
>         incoming.
>         Thanks,
>         Xiaoyan
>
>         ==============================__============
>         begin
>         f = addfile ("data.nc <http://data.nc>", "r")
>         var0=f->Deep_Blue_Aerosol___Optical_Depth_550_Land_QA_Mean
>         printVarSummary(var0)
>         printVarSummary(var0)
>         ;create a sequence for the new values of lat
>         newlat=fspan(-85.0,85.0,85)
>         ;create a sequence for the new values of lon
>         newlon=fspan(-180.0,180.0,72)
>         newlat@units = "degrees_north"
>         newlon@units = "degrees_east"
>         var=linint2(var0&lon,var0&lat,__var0,True,newlon,newlat,0)
>         var!0 = "LAT"
>         var!1 = "LON"
>         var&LAT = newlat
>         var&LON = newlon
>         printVarSummary(var)
>         fout=addfile("regrid_data.nc <http://regrid_data.nc>",__"c")
>         fout@title="Regrid_85*72"
>         fout->var=var
>         end
>
>
>
>         _________________________________________________
>         ncl-talk mailing list
>         List instructions, subscriber options, unsubscribe:
>         http://mailman.ucar.edu/__mailman/listinfo/ncl-talk
>         <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 Wed Feb 20 10:09:17 2013

This archive was generated by hypermail 2.1.8 : Thu Feb 21 2013 - 11:26:43 MST