[ncl-talk] Fw: Re: Re: Abnormal data points

Gus Correa gus at ldeo.columbia.edu
Thu Apr 15 14:58:49 MDT 2021


Hi Chathurika

ESMF_regrid accepts a mask:
https://www.ncl.ucar.edu/Document/Functions/ESMF/ESMF_regrid.shtml
See the SrcGridMask/DstGridMask option.

You may be able to craft a mask that covers exactly the abnormal data
points.
In normal conditions the "where" function is a great tool to create masks,
using data values in different ranges.
However, since the data and abnormal values are in the same range in your
case,
you may need to inspect the lat and lon (or lat2d and lon2d) coordinates
of your abnormal values to locate the points that are in/out of the mask.
Some artwork for sure.

In any case, double check your original data file to make sure these
abnormal values are
really in the valid range, because if they are out of the valid range you
can easily use "where"
to create a mask, so that they don't enter the regrid calculation.

Gus

On Thu, Apr 15, 2021 at 3:45 PM Chathurika <chatu at scsio.ac.cn> wrote:

> Dear Gus,
>
>
> Thank you very much for the reply. The problem is that the data, along the
> line, is in the same range as other values. if I use "where", all other
> important values also will be removed, not only from the line. That is why
> I am also confused here.
>
>
> Many thanks and best regards,
>
> Chathu
>
>
> -----Original Messages-----
> *From:*"Gus Correa via ncl-talk" <ncl-talk at mailman.ucar.edu>
> *Sent Time:*2021-04-16 03:17:48 (Friday)
> *To:* "NCL Talk" <ncl-talk at ucar.edu>
> *Cc:*
> *Subject:* Re: [ncl-talk] Fw: Re: Re: Abnormal data points
>
> Hi Chathurika
>
> Maybe to use the NCL "where" function, before you use the ESMF regrid
> function?
> https://www.ncl.ucar.edu/Document/Functions/Built-in/where.shtml
> Something like this:
>
> myFillvalue=myvar at _FillValue
> myvar = where(myvar .ge. abnormal_threshold, myvar=myFillValue, myvar)
> ...
> [now do the ESMF regrid]
> ...
>
> I hope this helps,
> Gus Correa
>
> On Thu, Apr 15, 2021 at 2:57 PM Chathurika via ncl-talk <
> ncl-talk at mailman.ucar.edu> wrote:
>
>>
>>
>>
>> -----Original Messages-----
>> *From:*Chathurika <chatu at scsio.ac.cn>
>> *Sent Time:*2021-04-16 02:55:41 (Friday)
>> *To:* "Dennis Shea" <shea at ucar.edu>
>> *Cc:*
>> *Subject:* Re: Re: [ncl-talk] Abnormal data points
>>
>> Dear Dennis,
>>
>>
>> Thank you so much for the reply. Even before, I use the regridding (ESMF_regrid),
>> I plotted the data just to check. Still there is this line with abnormal
>> data values (in the original file). I want to know whether there is any
>> method which I can use to avoid this abnormal data points. How can I remove
>> them? Because they are in the same range as normal data.
>>
>>
>> Thank you once again
>>
>>
>> and best regards,
>>
>> Chathu
>>
>> -----Original Messages-----
>> *From:*"Dennis Shea" <shea at ucar.edu>
>> *Sent Time:*2021-04-16 02:37:21 (Friday)
>> *To:* Chathurika <chatu at scsio.ac.cn>
>> *Cc:* "Soma Roy" <somaroy892 at gmail.com>, ncl-talk <ncl-talk at ucar.edu>
>> *Subject:* Re: [ncl-talk] Abnormal data points
>>
>> If you have used the ESMF regrid functions for other variables and there
>> is "no problem", I do not understand why there would be an issue with this
>> variable. Something MUST be different.  It is up to you to determine just
>> what the difference might be.
>> ---------------
>> The 'line' looks like a single satellite trajectory.
>> ---------------
>> Are the grid points missing? or, are they 'bad' values?
>>
>>
>>
>>
>>
>>
>>
>>
>> On Thu, Apr 15, 2021 at 11:18 AM Chathurika via ncl-talk <
>> ncl-talk at mailman.ucar.edu> wrote:
>>
>>> Dear Soma,
>>>
>>>
>>> it is NetCDF4, curvilinear data two dimensional coordinates (lat(i,j)
>>> lon(i,j) ). I regrided using ESMF regridding. (Note: I used ESMF regridding
>>> for all other variables also. I had no problem).
>>>
>>>
>>> Thank you so much.
>>>
>>>
>>> Best
>>>
>>> Chathu
>>>
>>>
>>> -----Original Messages-----
>>> *From:*"Soma Roy" <somaroy892 at gmail.com>
>>> *Sent Time:*2021-04-16 00:51:10 (Friday)
>>> *To:* Chathurika <chatu at scsio.ac.cn>
>>> *Cc:*
>>> *Subject:* Re: [ncl-talk] Abnormal data points
>>>
>>> What is the data file format?
>>>
>>> Soma
>>>
>>> On Thu, Apr 15, 2021, 22:10 Chathurika via ncl-talk <
>>> ncl-talk at mailman.ucar.edu> wrote:
>>>
>>>> Dear All,
>>>>
>>>>
>>>> Does anyone know which method I can use to remove (or interpolate) the
>>>> data assigned with this abnormal line (which is in the black box of below
>>>> figure)?
>>>>
>>>>
>>>> If anyone can help me, this will be a big help. I can send the data
>>>> file if you want to look at it.
>>>>
>>>>
>>>> Thank you in advance and best regards,
>>>>
>>>> Chathu
>>>>
>>>> ------------------------------
>>>>
>>>>
>>>>
>>>> Wickramage Chathurika Hemamali
>>>> Msc in Physical Oceanography
>>>> State Key Laboratory of Tropical Oceanography
>>>> South China Sea Institute of Oceanology
>>>> University of Chinese Academy of Science
>>>> China
>>>>
>>>> *Specialized in Oceanography and Marine Geology (Bachelor)*
>>>> *University of Ruhuna*
>>>> *Matara*
>>>> *Sri Lanka*
>>>>
>>>> Email : wickramagechathurika at rocketmail.com
>>>> chatu at scsio.ac.cn
>>>>
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> ncl-talk at mailman.ucar.edu
>>>> List instructions, subscriber options, unsubscribe:
>>>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>>
>>>
>>> ------------------------------
>>>
>>>
>>>
>>> Wickramage Chathurika Hemamali
>>> Msc in Physical Oceanography
>>> State Key Laboratory of Tropical Oceanography
>>> South China Sea Institute of Oceanology
>>> University of Chinese Academy of Science
>>> China
>>>
>>> *Specialized in Oceanography and Marine Geology (Bachelor)*
>>> *University of Ruhuna*
>>> *Matara*
>>> *Sri Lanka*
>>>
>>> Email : wickramagechathurika at rocketmail.com
>>> chatu at scsio.ac.cn
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at mailman.ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>>
>>
>> ------------------------------
>>
>>
>>
>> Wickramage Chathurika Hemamali
>> Msc in Physical Oceanography
>> State Key Laboratory of Tropical Oceanography
>> South China Sea Institute of Oceanology
>> University of Chinese Academy of Science
>> China
>>
>> *Specialized in Oceanography and Marine Geology (Bachelor)*
>> *University of Ruhuna*
>> *Matara*
>> *Sri Lanka*
>>
>> Email : wickramagechathurika at rocketmail.com
>> chatu at scsio.ac.cn
>>
>>
>>
>>
>> ------------------------------
>>
>>
>>
>> Wickramage Chathurika Hemamali
>> Msc in Physical Oceanography
>> State Key Laboratory of Tropical Oceanography
>> South China Sea Institute of Oceanology
>> University of Chinese Academy of Science
>> China
>>
>> *Specialized in Oceanography and Marine Geology (Bachelor)*
>> *University of Ruhuna*
>> *Matara*
>> *Sri Lanka*
>>
>> Email : wickramagechathurika at rocketmail.com
>> chatu at scsio.ac.cn
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at mailman.ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
>
> ------------------------------
>
>
>
> Wickramage Chathurika Hemamali
> Msc in Physical Oceanography
> State Key Laboratory of Tropical Oceanography
> South China Sea Institute of Oceanology
> University of Chinese Academy of Science
> China
>
> *Specialized in Oceanography and Marine Geology (Bachelor)*
> *University of Ruhuna*
> *Matara*
> *Sri Lanka*
>
> Email : wickramagechathurika at rocketmail.com
> chatu at scsio.ac.cn
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210415/4e75b35b/attachment.html>


More information about the ncl-talk mailing list