[ncl-talk] Question on the "ESMF_regrid" when the longitude of source and destination grids is in different order?

林祥 xianglin72 at icloud.com
Mon Jan 23 16:57:59 MST 2017


Mary,

    Thank you for the reply! I’ve tried uncommenting the Opt at SrcGridMask before  with the following 2 lines

     Opt at SrcGridMask      = where(.not.ismissing(y(0,:,:)),1,0)
     Opt at DstGridMask      = where(.not.ismissing(hsic(0,:,:)),1,0)

  and the output is as the attached plot file.   You can see that the land grid have been masked, but the ocean grids after regridding

 are still  inconsistent with the original source grids ( the grids outside 90W-90E are different with the source grids) . 

   Besides, I found same problem occurred when I use the “bilinear” and “patch” method. But the combination of using “neareststod”

method and uncommenting the above 2 lines seem produce the correct results ( see anther attached files). But I still feel puzzled.


Thanks


Lin









> 在 2017年1月24日,02:09,Mary Haley <haley at ucar.edu> 写道:
> 
> Lin,
> 
> I think you need to set your SrcGridMask option. I noticed you had it commented out:
> 
>     ;Opt at SrcGridMask      = where(.not.ismissing(y(0,:,:)),1,0)                                                         
> 
> If y contains missing values, then you need to set SrcGridMask. If y contains missing values in the same location for every leftmost element of y (assuming it's 3D), then what you have above should work, but you need to uncomment it.
> 
> --Mary
> 
> 
> 
> 
> On Mon, Jan 23, 2017 at 12:49 AM, 林祥 <xianglin72 at icloud.com <mailto:xianglin72 at icloud.com>> wrote:
> Hi,all
> 
> 
>          I am regriding some NSIDC sic data (http://nsidc.org/data/g02202.html <http://nsidc.org/data/g02202.html>, downloaded from ftp://sidads.colorado.edu/pub/DATASETS/NOAA/G02202_v2 <ftp://sidads.colorado.edu/pub/DATASETS/NOAA/G02202_v2>).
> 
> The source data is curvilinear grids with 2-d longitude coordinate array ranging  between -180E~180E, and the destination grids is HadISST 2.2 (http://www.metoffice.gov.uk/hadobs/hadisst2/ <http://www.metoffice.gov.uk/hadobs/hadisst2/>)
> 
> which is rectilinear grids ranging from 0E to 360E.  
> 
>          I try to use the original longitude of source grids with the following :
> 
>    fi     = addfile(data_path + data_filename,"r")
>    lon    = fi->longitude
>    lat    = fi->latitude  
>  
>    y at lat2d  = lat
>    y at lon2d  = lon                     
> 
>     or reset the longitudes  to 0~360E using the following lines:
>   
>   lon      = where(lon.lt.0,lon+360,lon)     ; -180 ~ 180 longitude order
>   lon at units= "degrees_east"
>   
> But I got the same result and the regridded data contain missing values outside the range of -90W~90E.Please see the attached plot file
> 
> I don’t know where the problem come from.  And I also found no instruction on the NCL webpages explaining the similar case when the curvilinear
> 
> grids share different longitude ranges with the destinate grids.  So anyone can show me a hand?
> 
> 
> The script file, source data file , contour plot files with original data and regridded data have been attached.
> 
> 
> Thanks!
> 
> 
> 
> Lin
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>          
> 
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170124/7a448ff7/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sic_regrid_197908_GridMask.png
Type: image/png
Size: 48707 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170124/7a448ff7/attachment.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sic_regrid_neareststod.png
Type: image/png
Size: 55577 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170124/7a448ff7/attachment-0001.png 


More information about the ncl-talk mailing list