[Thread Prev][Thread Next][Index]
Re: [ferret_users] format number and text with LIST/FORMAT
Hi Patrick,
Unlike fortran, I don't think the /FORMAT option in Ferret works
correctly for the A field specifier (for character strings). But
there is a convoluted work-around using the REPEAT function:
use monthly_navy_winds.cdf
let VAR1 = UWND[I=23,J=73]
let v1end = `var1, return=LEND`
set list/file=test.txt ; sp rm test.txt
repeat/range=1:`v1end`:1/name=s ( ; \
def sym alpha TAX_DATESTRING(T[GT=VAR1,l=`s`],VAR1, "month") ; \
list/nohead/file/append/format=("`($alpha)`", F10.3) VAR1 )
The previous proposed solution does not work because you want to work
with a character array.
Cheers,
Jim
On Mon, 19 Jul 2010, Paulo B. Oliveira wrote:
Hi Patrick,
I guess you can use:
list/nohead/format=("`TAX_DATESTRING(T[GT=VAR],VAR1,
"month")` ", F10.3) VAR1
Paulo
--------------------------
On Mon, 2010-07-19 at 12:21 +0200, Brockmann Patrick wrote:
Hi all,
Is there a way to format numbers and text together
when the list command and the format FORTRAN qualifier are used ?
Here is an example and the error
yes? use monthly_navy_winds.cdf
yes? let VAR1 = UWND[I=23,J=73]
yes? list/nohead/format=(A30,' ',F10.3) TAX_DATESTRING(T[GT=VAR],VAR1,
"month"), VAR1
**ERROR: invalid command: format disallowed for multiple variables w/
strings
Patrick
--
LSCE/IPSL, Laboratoire des Sciences du Climat et de l'Environnement
CEA-CNRS-UVSQ
LSCE/IPSL, CEA Saclay http://www.ipsl.jussieu.fr/~jomce
Bat. 712 - Orme mailto: James.Orr@xxxxxxxxxxxx
Point courrier 132
F-91191 Gif-sur-Yvette Cedex Phone: (33) (0)1 69 08 39 73
FRANCE Fax: (33) (0)1 69 08 30 73
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Privacy Policy | Disclaimer | Accessibility Statement