[Thread Prev][Thread Next][Index]

Re: [ferret_users] formatting ascii output

Hi Marc,
You can put strings into a Fortran format statement.  For some reason setting the format in a separate SET LIST/format isn't working when I try it, but it does work in the LIST/FORMAT line.
list/clobber/nohead/norowhead/file=myfile.dat/format=(1x,71(F14.12,','),f14.12) var

From: Marc Pace Marcella <marcpace@xxxxxxx>
To: ferret_users@xxxxxxxx
Sent: Tue, March 30, 2010 12:43:27 PM
Subject: [ferret_users] formatting ascii output

Hi all,

Im using the following commands to output netcdf data in 2-D (X-Z or Y-
Z, 72x18 dimensions) text files without any header or rowhead:

set list/format=(1x,72F14.12)
list/clobber/nohead/file="dust_bound_east_tr1_aug.txt" TR1[l=2,i=86,d=2]

Sample output looks like such:


However, Id like to be able to read these text files into Matlab and
therefore I need a space or some tab in between the values. Is there
anyway to specify this in the format=(1x,72F14.12)? Ive tried the
"format=comma" option and leaving just nohead/norowhead but that wipes
out the formatting I need and also sometimes will write out "skipping
every 7 points" etc or the lat/lon values.  Tried the archives but
doesnt seem like much is out there.  Any ideas anyone has would be
greatly appreciated.



[Thread Prev][Thread Next][Index]

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

Privacy Policy | Disclaimer | Accessibility Statement