Oliver,
Have you tried this function?
indStrSubset
-Jamie
On Apr 2, 2009, at 9:01 AM, ncl-talk-request_at_ucar.edu wrote:
> Dear all,
>
> I was just wondering if there are any plans to include regular
> expression string matching into NCL one day. We are relying a lot on
> the NCL grib reading functionality. The names given to variables and
> dimensions are typically of the type...
>
> TOT_PREC_GDS10_SFC_acc1h
> g10_x_1
>
> ...where the first is a variable name and the second is a dimension
> name. In trying to write a library which can access variables in
> files, one of the tough bits is parsing the variable and dimension
> names. For example, typically, an increasing index is attached to
> the names if duplicates are encountered. Also, grid types and
> accumulation times are included in the name. A typical job of a user-
> friendly library would be to match the list resulting from
> getfilevarnames(f) against "TOT_PREC_GDS*_*_acc*". In making such
> matches a simple string comparison routine which also takes care of
> "*" and "?" would be great. This could be easily achieved by linking
> against GNU regex library and building an NCL wrapper. Are there
> already any plans for this functionality?
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Apr 02 2009 - 09:16:27 MDT
This archive was generated by hypermail 2.2.0 : Tue Apr 07 2009 - 10:01:36 MDT