[ncl-talk] interpolation warning

Mary Haley haley at ucar.edu
Thu Oct 16 09:36:35 MDT 2014


Sun,

Without your data, I'm not sure what's going on.  I believe this is a case
of "look at your data", because it seems that you are trying to use -9999
as a missing value, but in general, you shouldn't need to set missing
values when reading data off a NetCDF file. Of course, we've seen poorly
written NetCDF files that didn't have _FillValue set correct, but in
general, this is not the case.

For example, you have:

  data = f->$varname$
  data1 = data(:,:,:)
  data1 at _FillValue= -9999

First, I'm not sure why you have both "data" and "data1".  Why can't you
just do:

  data1 = f->$varname$

Also, I'm not sure why you have:

  data1 at _FillValue= -9999

Right after you read in the data, and before you set the _FillValue
attribute, did you look at your data by doing a "printVarSummary" on it?

  fili    = "CAL_LID_L3_APro_Combined-Beta-V1-00.2009-12D.nc"
  f       = addfile (diri+fili+".nc", "r")
  varname ="Extinction_532_Mean"

  data = f->$varname$
  printVarSummary(data)

Also, you have:

  Extinction_532_MeanN = fallN[:]->Extinction_532_Mean
  Extinction_532_MeanN at _FillValue= -9999

Again, are you sure the explicit setting of _FillValue is needed?  Did you
do a printVarSummary on the variable *before* setting the _FillValue?

  Extinction_532_MeanN = fallN[:]->Extinction_532_Mean
  printVarSummary(Extinction_532_MeanN)
  Extinction_532_MeanN at _FillValue= -9999

The problem with int2p_Wrap probably has something to do with either the
data you are passing it, or a mismatch in your level values. Please read
the "int2p_Wrap" documentation carefully and make sure you have the correct
units and options set:

http://www.ncl.ucar.edu/Document/Functions/Contributed/int2p_Wrap.shtml

Also, look at the data you are passing in to this function by calling
"printMinMax" on the various input parameters and using "printVarSummary"
to make sure the units and dimensions all look good.

--Mary


On Wed, Oct 15, 2014 at 11:12 AM, Sunmin Park <mireiyue at gmail.com> wrote:

> Dear NCL Users.
>
> I try to interpolate 201 pressure to 17 pressure levels and use
> “int2p_Wrap”.
> It does interpolation but I get warning
> "*warning:int2p: 1025 input array(s) contained all missing data. No
> interpolation performed on these arrays*”
> with
>
> *Variable: levNew*
> *Type: float*
> *Total Size: 416160 bytes*
> *            104040 values*
> *Number of Dimensions: 3*
> *Dimensions and sizes: [lat | 85] x [lon | 72] x [ALT | 17]*
> *Coordinates:*
> *            lat: [-85..85]*
> *            lon: [-180..180]*
> *            ALT: [1000..10]*
> *Number Of Attributes: 2*
> *  _FillValue : -9999*
> *  average_op_ncl : dim_avg over dimension(s): year*
> *(0) interpolated_01:  min=-9999     max=-9999*
>
> I calculated the average of Extinction coefficient from CALIPSO for each
> month over the 7 years data (has 201 levels). And this averaged values
> should be interpolated by 17 levels. It seems that the interpolation worked
> but the Min. and Max values show wrong. How I can fix this? I appreciate
> any comments and suggestions.
>
> Thanks in advance,
> Sun-
>
>
>
> _______________________________________________
> 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/20141016/8310a60e/attachment.html 


More information about the ncl-talk mailing list