[ncl-talk] updated-how to replace missing value

Bassill, Nicholas nbassill at albany.edu
Wed Apr 18 09:10:16 MDT 2018


Hi Ning,

   I think as long as you have the missing value defined, you should be able to use "where": https://www.ncl.ucar.edu/Document/Functions/Built-in/where.shtml

There are some examples there that seem to do what you want. Basically, something like:


T2 = where(ismissing(T2),T5,T2) ; assuming the arrays are the same size


Nick Bassill, PhD

Modeler & Meteorologist, Center Of Excellence (Prior: NYS Mesonet)

LC SB-28, 1400 Washington Ave.,

SUNY, University at Albany, NY 12222

(518) 442-6375
NYSM Products: http://operations.nysmesonet.org/~nbassill/


________________________________
From: ncl-talk <ncl-talk-bounces at ucar.edu> on behalf of ma.n2007 <ma.n2007 at aliyun.com>
Sent: Wednesday, April 18, 2018 9:45 AM
To: ncl-talk
Subject: [ncl-talk] updated-how to replace missing value

Hi Sir,
Let me show my question in a more clear manner. If I have two data: T2 (time, lat, lon) is 2 m temperature, and T5(time, lat, lon) is 5 m temperature.

T2 is what I want to use, but in some cases T2 has missing values. I want to use T5 data (if this grid is not missing value) to fill T2's missing value. Could you please tell me how can I do? Thanks so much!


Ning


________________________________

From: ma.n2007<mailto:ma.n2007 at aliyun.com>
Date: 2018-04-18 21:38
To: ncl-talk<mailto:ncl-talk at ucar.edu>
Subject: [ncl-talk] how to replace missing value
Hi Sir,
Imagin that I have two data X and Y, both are with (tim, lat, lon).
If some grids of Y has missing values, while X does not. How can I replace the missing values in Y with the X grid value? This could fill the Y.
Could you please help me?

Thanks
Ning

________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180418/62b74551/attachment.html>


More information about the ncl-talk mailing list