<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Times New Roman;color: #000000;font-size: 12pt;">
<div>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma">
<div style="font-family:Tahoma">
<div style="font-family:Tahoma">
<div>
<div></div>
<div style="font-size:13px">
<div></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>Hello,</div>
<div><br>
</div>
<div>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. </div>
<div><br>
</div>
<div>My code is enclosed below and my data file is attached.</div>
<div><br>
</div>
<div>Could anybody help me to find why missing function doesn't work? </div>
<div><br>
</div>
<div>Thanks for your time!</div>
<div><br>
</div>
<div>Lifen</div>
<div><br>
</div>
<div>
<div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</div>
<div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"</div>
<div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" </div>
<div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl" </div>
<div><br>
</div>
<div>begin</div>
<div>fili = "2000_MPI-ESM-MR.nc"</div>
<div>a = addfile (fili, "r")</div>
<div>t=a->y</div>
<div><br>
</div>
<div>t@_FillValue = -999.0</div>
<div>t@missing_value = t@_FillValue</div>
<div><br>
</div>
<div>t = lonFlip(t)</div>
<div>printVarSummary(t)</div>
<div><br>
</div>
<div>newlat=fspan(-89.50,89.50,180) ;create a sequence for the new values of lat </div>
<div>newlon=fspan(-179.5,179.5,360) ;create a sequence for the new values of lon</div>
<div><br>
</div>
<div>newlat@units = "degrees_north"</div>
<div>newlon@units = "degrees_east"</div>
<div><br>
</div>
<div>regrid= area_conserve_remap_Wrap(t&lon,t&lat,t,newlon,newlat,False)</div>
<div>printVarSummary(regrid)</div>
<div>print("regrid: min="+min(regrid)+" max="+max(regrid))</div>
<div><br>
</div>
<div>filo = "Regrid."+fili</div>
<div>system("/bin/rm -f "+filo)</div>
<div>fout=addfile(filo,"c")</div>
<div>fout@creation_date = systemfunc("date")</div>
<div>fout@title="Regrid_1*1 of "+fili</div>
<div>fout->regrid=regrid</div>
<div>end</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
</body>
</html>