[Thread Prev][Thread Next][Index]

[ferret_users] Underscore Character in String

Hello Ferret User Group:

This may be a silly question but...

I would like to print out the following symbol as a label on the plot without the _ character(s) in teh symbol value being interpreted as subscript for the succeeding character, I tried a variety of things but could not do so. I tried to substitute the - for _ in the symbol and could not do that either.

! DATAPRODNAME1 is a symbol

DATAPRODNAME1 = "Deep_Blue_Aerosol_Optical_Depth_550_Land/MYD04_L2"

LABEL/NOUSER `my_xlen`, `my_ylen2`, 0, 0, 0.15  (($dataprodname1)

Your help is appreciated.


On Thu, Sep 24, 2009 at 1:54 PM, Ansley Manke <Ansley.B.Manke@xxxxxxxx> wrote:
Hi Ag,
The error message is because your command uses variable names that include a minus sign (or dash) - .

isn't a valid variable name in Ferret.

A couple more things I noticed:  For a delimited read command, the default delimiter is a tab or comma. At least as it came through in the attachment, the delimiter in your file is a space, so you need to specify that.
I also see that you have a variable called begindatetime.  As the file is organized, the dates and the times have a space between them so they will not be read as a single variable, but as two variables, a date and a time.  If you change the Ferret script to add the /DELIM=" ", then this shell command should work:

#!/bin/csh -f

ferret -gif -script ferret_2stations_1variables.jnl "Ferret-Data.txt" time_days_2Stn1Data_new_2.gif AMOD_mean_AOT0550dpbl-l "filename\,begindate\,begintime\,location\,AMOD_mean_AOT0550dpbl_l\,AMOD_sdev_AOT0550dpbl_l" "MYD04-L2" "Deep-Blue-Aerosol-Optical-Depth-550-Land" "GISS" "2007-01-01T00:00:00-2007-12-31T00:00:00"

ag wrote:
Dear Ferret User Group:

I am unable to figure out what the following error message means. Your help is greatly appreciated.
I have a ferret script (ferret_basic_1.csh) and an ascii datafile(Ferret-Data.txt ). The VAR= string below contains the column names of the datafile and I am choosing which column I want to plot as an argument in the ferret csh script.

Note: I use the attached .csh shell script to run ferret in batch mode with arguments. Only the relevant portion of the .jnl file is attached. I am trying to plot the Column 4 of the ASCII data file by passing its name as argument 3 ($3) of the ferret csh script.

----------------------------------Screen Output with Error Message-------------------------------------------
Unix Prompt $ csh ferret_basic_1.csh

DATAPRODNAME1 = "Deep_Blue_Aerosol_Optical_Depth_550_Land/MYD04_L2"
             VARIABLE : 447
 **TMAP ERR: syntax error in string
             illegal or duplicate variable name AMOD_MEAN_AOT0550DPBL-L
             Data set: ./Ferret-Data.txt
SET DATA/FORM=DELIM/SKIP=4/GRID=g2/VAR="filename,begindatetime,location,AMOD_mean_AOT0550dpbl-l,AMOD_sdev_AOT0550dpbl-l " "Ferret-Data.txt"
Command file, command group, or REPEAT execution aborted
STOP -script mode, ERROR RUNNING SCRIPT statement executed


[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement