[ncl-talk] Missing values are regridded?

Karin Meier-Fleischer meier-fleischer at dkrz.de
Tue Feb 17 15:03:42 MST 2015


Hi Lifen,

you should try to rearrange the following lines like

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

Bye,
Karin

Am 17.02.2015 um 22:59 schrieb Jiang, Lifen <lfjiang at ou.edu>:

> 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
> 
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk




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


More information about the ncl-talk mailing list