[ncl-talk] confirm the first day greater than 0 degree

Dennis Shea shea at ucar.edu
Sun Dec 15 08:22:52 MST 2019


The initial ncl-talk question was to determine the first occurrence at or
above 0C.
Then, offline, you indicated that you wanted to the first and last values
above 0C. You modified the 'first_occurence_ind.ncl' to return the first
and *last *occurrence above 0C. You then state:

"But when I test the last day greater than 0 degree. I found the outcome
confusing.
I found some "last day" is smaller than "first day".
===
My initial ncl-talk response included first_occurence_ind.ncl'. It was
tested on a daily climatology. The URL in the test code indicates the
download link.

The attached "first_last_occurrence_ind.ncl" calculates the first and last
indices. Again, it is tested on the daily climatology [365,73,144]. It
works correctly.
---
I am not sure what you mean  by "last day." I

However, if you are using this on multiple years of daily data, then it is
quite possible the the "last day" would be smaller than the "first day" if
you are referring month-day

   first occurrence > 0C   :  20000425   [25 April 2000]  last day 201003
15 [15 March 2010].










On Sat, Dec 7, 2019 at 10:34 AM Dennis Shea <shea at ucar.edu> wrote:

> There is no existing NCL function for what you want. Still, *dim_minind*
> <http://www.ncl.ucar.edu/Document/Functions/Contributed/dim_minind.shtml>
> can be used if the
> data array is pretreated [tricked].
>
> See attached.
>
> %> ncl tst.1st_occurence.ncl
>
> On Thu, Dec 5, 2019 at 10:15 PM WIND via ncl-talk <ncl-talk at ucar.edu>
> wrote:
>
>> Dear all,
>>
>> Thanks for reading, I'm dealing with the three-dimensional grid
>> temperature data (ordered by time, lat, lon). I want to confirm the first
>> day (position in the time dimension) in each lat/lon that the temperature
>> is greater than 0. It's hard for me to think about how to write the "if"
>> statement. Are there some relevant statistics function in NCL? It will be
>> so nice that anyone would provide some advice.
>> Any help would be appreciated!
>>
>> Sincerely,
>> Wind
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> 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/20191215/d5d1bd2a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: first_last_occurence_ind.ncl
Type: application/octet-stream
Size: 3418 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191215/d5d1bd2a/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tst.FirstLast_occurence.ncl
Type: application/octet-stream
Size: 3082 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191215/d5d1bd2a/attachment-0001.obj>


More information about the ncl-talk mailing list