Re: checking index locations in a long number

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon Dec 27 2010 - 10:23:41 MST

It is not clear if YYYYJJJHTTNNN is a string or an integer?

You can extract (say) JJJ to a 1d array

   idx = ind(JJJ.ge.??? .and. JJJ.le.???)

Then use the index values to access the data.

http://www.ncl.ucar.edu/Document/Functions/Built-in/ind.shtml

On 12/27/10 10:15 AM, JEFFREY JOSEPH WATERS wrote:
> NCL,
> I am currently reading in serial numbers that correspond to TC events
> and locations over the last 20 years.
>
> YYYYJJJHTTNNN
>
> * YYYY is the corresponding year of the first recorded observation
> of the storm
> * JJJ is the day of year of the first recorded observation of the storm
> * H is the hemisphere of the storm: N=Northern, S=Southern
> * TT is the absolute value of the rounded latitude of the first
> recorded observation of the storm (range 0-90, if basin=SA or SH,
> then TT in reality is negative)
> * NNN is the rounded longitude of the first recorded observation of
> the storm (range 0-359)
>
> I was wondering if NCL has a way to analyze only certain locations (i.e.
> index locations 5-7, or the JJJ values) within this serial number.
> Perhaps an if-else check of some sort? I was having trouble finding any
> useful method or function on the NCL site. Any help would be much
> appreciated. Thank you.
>
> Jeff Waters
> Graduate Student
> Department of Meteorology
> Penn State University '11
>
>
>
>
> _______________________________________________
> 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 Mon Dec 27 10:23:46 2010

This archive was generated by hypermail 2.1.8 : Tue Jan 04 2011 - 09:16:52 MST