Dear all,
I would like to find the occurences of "*" in a string. I thought an
elegant way of doing this is...
a="TOT_PREC_HYBY_acc*"
i=ind(stringtochar(a) .eq. "*")
Now, it seems that NCL coerces the stringtochar(a) back to a string, as
it supposes that "*" is a string an not a character. The way it would
work is...
a="TOT_PREC_*_HYBY_acc*"
b=stringtochar("*")
i=ind(stringtochar(a) .eq. b(0))
I was just wondering, if there is a way of telling NCL that a explicitly
specified variable such as "*" should be a character, and not a string.
Thanks,
Oli
________________________________________
Oliver Fuhrer
Numerical Models
Federal Departement of Home Affairs FDHA
Federal Office of Meteorology and Climatology MeteoSwiss
Kraehbuehlstrasse 58, P.O. Box 514, CH-8044 Zurich, Switzerland
Tel. +41 44 256 93 59
Fax +41 44 256 92 78
oliver.fuhrer_at_meteoswiss.ch
www.meteoswiss.ch - First-hand information
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Nov 10 2008 - 07:46:34 MST
This archive was generated by hypermail 2.2.0 : Mon Nov 10 2008 - 10:18:09 MST