# Re: get the "date" rather than an INDEX

From: Rick Brownrigg <brownrig_at_nyahnyahspammersnyahnyah>
Date: Wed Aug 28 2013 - 10:20:02 MDT

Hi,

For your second question, at line 51 of your script, you capture the index of the minimum value within each sequence as:

minx(nmx) = minind(x(ibeg:iend))

I think the index of that value within the original sequence would then be:

minx(nmx) = minind(x(ibeg:iend)) + ibeg

I'm not sure what you mean in your first question -- what date should correspond to a minimum-value index?

HTH
Rick

On Aug 27, 2013, at 2:31 PM, Verena Lili <verena.prick@gmail.com> wrote:

> HI NCL Community,
>
> I need a bit help.
> I currently worked on my own code to get the list of index of min value within the sequence data. As an Illustration, x(daily):
>
> Variable: x
> Type: integer
> Total Size: 104 bytes
> 26 values
> Number of Dimensions: 1
> Dimensions and sizes: [time | 26]
> Coordinates:
> time: [19520401..19520426]
> Number Of Attributes: 1
> _FillValue : -999
> (0) -999
> (1) -999
> (2) -999
> (3) 3
> (4) 3
> (5) 2
> (6) -999
> (7) -999
> (8) -999
> (9) 2
> (10) 2
> (11) 4
> (12) 2
> (13) -999
> (14) -999
> (15) -999
> (16) -999
> (17) -999
> (18) -999
> (19) -999
> (20) -999
> (21) 5
> (22) 4
> (23) 8
> (24) 2
> (25) 3
>
>
> In my case, I want to retain the index of min value for each sequence, and my code works well for that. The results are as follow:
>
> Variable: min_index
> Type: integer
> Total Size: 12 bytes
> 3 values
> Number of Dimensions: 1
> Dimensions and sizes: [3]
> Coordinates:
> Number Of Attributes: 1
> _FillValue : -2147483647
> (0) 2
> (1) 0
> (2) 3
>
>
> However, I still need your helps:
>
> 1. How can I transform the output to be the list of date instead of index?
> 2. Is it possible to list the index accordig to the order of the first index in the original dataset? in this case the output should be
>
> (0) 5
> (1) 9
> (2) 24
>
> My clean code, I attached in this email. I really appreciate for your kind help.
> Thank you
>
>
>
>
> --
> Regards,
> Dr. Verena.
> School of Marine and Atmospheric Sciences
> Stony Brook University
> homepage: http://metsci.tk
> <verena_index.ncl>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Aug 28 10:20:54 2013

This archive was generated by hypermail 2.1.8 : Fri Aug 30 2013 - 14:04:57 MDT