Re: Character strings

From: Jonathan Vigh <vigh_at_nyahnyahspammersnyahnyah>
Date: Thu, 09 Jul 2009 16:58:53 +0000

In the function I just sent, you'll need to set replace
character_FillValue with inttochar(0) or whatever you like to use for
the _FillValue of character types. Then it should work.

Jonathan

Correia, James wrote:
> Is there a function which can trim white space out of a character string?
>
> For example I am reading in a file with model abbreviations and ensemble
> numbers like this:
> aom_1
> cgcm31t47_1
>
> Then using the names to construct a file name.
>
> However I am using asciiread to read the data string back into ncl and then
> use the array to open a new file. The above model names are read in using 10
> ascii elements to accommodate the whole list.
>
> So the file name ends up looking like:
> aom_1 _y8.dat
> Rather than
> aom_1_y8.dat
>
> So can the character string be trimmed down to non white space characters?
>
> I am using ncl v5.1.0
>
> jimmyc
>
>
> James Correia Jr., PhD
> Climate Physics Group
> Post. Doc.
> Pacific Northwest National Lab
>
> "Wisdom. Strength. Courage. Generosity. Each of us are born with one of
> these. It is up to us to find the other three inside of us."
> -Into the West
>
>
> _______________________________________________
> 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 Thu Jul 09 2009 - 10:58:53 MDT

This archive was generated by hypermail 2.2.0 : Mon Jul 13 2009 - 20:56:19 MDT