[ncl-talk] Missing values are regridded?

Jiang, Lifen lfjiang at ou.edu
Tue Feb 17 10:50:40 MST 2015


Hello,

I am regridding "y" (lat, lon) to 1 degree grids. My codes always re-map the missing values as well (-999) as the printed min is -994.176, which should be a positive number.

My code is enclosed below and my data file is attached.

Could anybody help me to find why missing function doesn't work?

Thanks for your time!

Lifen

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 at _FillValue  = -999.0
t at missing_value = t at _FillValue

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"

regrid= area_conserve_remap_Wrap(t&lon,t&lat,t,newlon,newlat,False)
printVarSummary(regrid)
print("regrid:  min="+min(regrid)+"  max="+max(regrid))

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=regrid
end




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150217/219e5203/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2000_MPI-ESM-MR.nc
Type: application/octet-stream
Size: 77208 bytes
Desc: 2000_MPI-ESM-MR.nc
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150217/219e5203/attachment.obj 


More information about the ncl-talk mailing list