Re: special characters

From: Dave Allured <dave.allured_at_nyahnyahspammersnyahnyah>
Date: Fri, 08 Aug 2008 11:37:28 -0600

There are two different answers, depending on what you want to do
with the string.

1. If you want to print the string on a plot, then that is answered
in the new NCL FAQ. Essentially you must use micro positioning to
separately plot the tilde "~" in your example above the letter "n":

   http://www.ncl.ucar.edu/FAQ/#vis_007

2. If you want to display the string in a text message on your
terminal, or write it into a data file, then you can embed special
characters from your local extended ASCII character set directly
into the string. For example:

   title = "El Niņo"
   print (title+"") ; output to terminal
   out->precip_at_title = title ; output to data file as attribute

This requires that your operating system and terminal and program
editor are set up properly for an extended character set. I don't
understand locales on Unix very well. But on my computer, Mac OS
10, "setenv LC-ALL C" in my .cshrc seems to do what I need for
extended ASCII. The enabled character set appears to be ISO-8859-1.
  HTH.

Dave Allured
CU/CIRES Climate Diagnostics Center (CDC)
http://cires.colorado.edu/science/centers/cdc/
NOAA/ESRL/PSD, Climate Analysis Branch (CAB)
http://www.cdc.noaa.gov/

Kabumbwe Hansingo wrote:
> Hi,
> does anyone know how to put special characters, example the ~ symbol
> over the n in El Nino, in a string in NCL?
>
> thanks
> Hansingo
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Aug 08 2008 - 11:37:28 MDT

This archive was generated by hypermail 2.2.0 : Mon Aug 11 2008 - 10:00:53 MDT