[Thread Prev][Thread Next][Index]

[ferret_users] placing the attribute name (a string) into a file's name



Hi,

I am having trouble with how to use strings;....and how to word my question, so I will provide an annotated example:

My data contains an attribute for station_name

Yes?   let station = ..station_name
Yes?   list/nohead station
              "Acapulco"

I would like to use this string, "Acapulco" in two ways:
1\  I want to insert the string into the name of a file, such that when I am using a repeat loop
     the program will do something like:

Yes? list/format=(2f8.4)/file = `station`.dat  SSH
      !-> list/format=(2f8.4)/file =Acapulco.dat SSH


2\  I also want the string to become a variable so that when I save my data file, one of the columns says Acapulco and next to it will be the SSH value.... so something like:

Yes? list/format=(2f8.4)/file = `station`.dat  `station`,SSH
      !-> list/format=(2f8.4)/file = Acapulco.dat  Acapulco,SSH

Thanks in advance,
Paul



[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement