[ncl-talk] Missing values are regridded?

Jiang, Lifen lfjiang at ou.edu
Tue Feb 17 14:59:31 MST 2015


Hi Yuqiang,

Thanks for the instructions, but the same problem occurred after changing the order.

Here are the code.

load "$NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl"
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"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"

begin
fili = "2000_MPI-ESM-MR.nc"
a = addfile (fili, "r")
t=a->y
t = lonFlip(t)
printVarSummary(t)

newlat=fspan(-89.50,89.50,180)   ;create a sequence for the new values of lat
newlon=fspan(-179.5,179.5,360)   ;create a sequence for the new values of lon

newlat at units = "degrees_north"
newlon at units = "degrees_east"

opt                = True
opt at DstGridLat     = newlat
opt at DstGridLon     = newlon
opt at ForceOverwrite = True

;opt at InterpMethod  = "bilinear"
;t_regrid_bilinear = ESMF_regrid(t,opt)

;opt at InterpMethod  = "neareststod"
;t_regrid_nearest  = ESMF_regrid(t,opt)

opt at InterpMethod  = "conserve"
t_regrid_conserve = ESMF_regrid(t,opt)

printMinMax(t,0)
;printMinMax(t_regrid_bilinear,0)
printMinMax(t_regrid_conserve,0)
;printMinMax(t_regrid_nearest,0)

filo = "Regrid."+fili
system("/bin/rm -f "+filo)
fout=addfile(filo,"c")
fout at creation_date = systemfunc("date")
fout at title="Regrid_1*1 of "+fili
fout->regrid=t_regrid_conserve

end

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150217/e12a478f/attachment.html 


More information about the ncl-talk mailing list