Re: regridding problem

From: cheryl Ma <xiaoyancloud_at_nyahnyahspammersnyahnyah>
Date: Wed Feb 20 2013 - 12:42:32 MST

Dennis and David,

Thanks both of you for the explanations, which is very helpful to ncl users.

Xiaoyan

On Wed, Feb 20, 2013 at 1:20 PM, David Brown <dbrown@ucar.edu> wrote:

> Sorry I had not seen Dennis' message when I wrote this. He is correct that
> it is an issue with the regridding as well and not strictly a plotting
> issue, although I think the plotting is probably also involved for the
> reasons stated below.
> -dave
>
> On Feb 20, 2013, at 11:09 AM, David Brown wrote:
>
> I think this is strictly a plotting issue. The algorithm for the default
> "AreaFill" plotting does not plot the grid points directly adjacent to
> areas containing missing values, whereas the "RasterFill" method (in
> non-smoothed mode) does plot these points (cells really). With a finer
> resolution this is not so evident because there are more adjacent cells
> containing actual data.
> -dave
>
>
> On Feb 20, 2013, at 9: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> 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) in 1x1 to a new data nc file (
>>> 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 and regrid_data.nc to the ftp site
>>> under
>>> incoming.
>>> Thanks,
>>> Xiaoyan
>>>
>>> ==============================**============
>>> begin
>>> f = addfile ("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",**"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
>
>
> _______________________________________________
> 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 Wed Feb 20 12:42:42 2013

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