Re: str_get_field

From: Kyle Griffin <ksgriffin2_at_nyahnyahspammersnyahnyah>
Date: Fri Aug 17 2012 - 15:50:36 MDT

Hi Wen,

The colons give options for how to subscript each dimension of your
variable. The colons allow you to subset the data such that:

var(min:max:stride)

and leaving any one of the places between the colons blank results in the
default choice for that setting (which is to be from the beginning to end
of the data by 1's, or every point)

You can read more on subscripting at:
http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclVariables.shtml#Subscripts

Kyle
----------------------------------------
Kyle S. Griffin
Department of Atmospheric and Oceanic Sciences
University of Wisconsin - Madison
1225 W Dayton St, Madison, WI 53715
Room 1421 Email: ksgriffin2@wisc.edu

On Fri, Aug 17, 2012 at 4:35 PM, Wen.J.Qu <wen.j.qu@gmail.com> wrote:

> **
> Hi, All
>
> Could anyone pleas tell me what is the difference between the below two
> lines?
>
> lat = *stringtofloat*<http://www.ncl.ucar.edu/Document/Functions/Built-in/stringtofloat.shtml>
> (*str_get_field*<http://www.ncl.ucar.edu/Document/Functions/Built-in/str_get_field.shtml>(data(1::),
> 2," "))
>
> lat = *stringtofloat*<http://www.ncl.ucar.edu/Document/Functions/Built-in/stringtofloat.shtml>
> (*str_get_field*<http://www.ncl.ucar.edu/Document/Functions/Built-in/str_get_field.shtml>(data(1:),
> 2," "))
>
> I find they get the same result. What is the use for the colon or two
> colons used here?
>
> Thank you very much!
>
> Shawn
>
> ------------------------------
> Wen.J.Qu
> 2012-08-17
>
> _______________________________________________
> 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 Fri Aug 17 15:51:07 2012

This archive was generated by hypermail 2.1.8 : Thu Aug 23 2012 - 16:16:15 MDT