[ncl-talk] problem removing missing values from obs dataset

Adam Herrington adam.herrington at stonybrook.edu
Thu Feb 27 16:50:07 MST 2020


Hi All,

I have a variable that I am trying to remove the missing values from. Here
are the attributes from printVarSummary call:

Variable: VAR
Type: float
Total Size: 8220672 bytes
            2055168 values
Number of Dimensions: 3
Dimensions and sizes: [time | 223] x [lat | 32] x [lon | 288]
Coordinates:
            time: [9504..10170]
            lat: [-14.60732984293194..14.60732984293194]
            lon: [   0..358.75]
Number Of Attributes: 9
  remap : remapped via ESMF_regrid_with_weights: Bilinear
  _FillValue : -9999.9
  missing_value : -9999.9
  time_statistic : instantaneous
  units :
  long_name : precipitation
  comments : Unknown1 variable comment
  delta_t : 0000-00-00 03:00:00
  avg_period : 0000-00-00 01:00:00

So there are two missing value attributes. To set all missing values to
zero, I try:

  VAR = where(VAR.eq.VAR at _FillValue,0.,VAR)
  VAR = where(VAR.eq.VAR at missing_value,0.,VAR)

But then subsequently looking for missing values: nMsg =
num(ismissing(VAR)), it says there are still all the missing values:

(0) missing values present: not allowed: nMsg=17913

Does anyone see why this is occurring, why my where statements are not
resulting in num(ismissing(VAR))=0?

Thanks,

Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200227/2961a3e7/attachment.html>


More information about the ncl-talk mailing list