You can strip the .nc suffix by passing through "sed". Alternatively using basename to strip suffixes works too. You can muck around with the Ferret string functions but they are awkward. Since you're using pyferret it would probably be rather simple to do this in python too.
Try something like
let filenames = SPAWN("/bin/ls -1 basinmask/*.nc | sed -e s/\.nc//")
repeat/range=1:`filenames,ret=iend`/name=ifile go process_file filenames[i=`ifile`]
where process_file takes a filename as an argument.
\can mode verify
! go process_file filename
def sym filename $1
! Could use ($filename).nc
set win 1
can data ($filename)
can sym filename
can win 1
set mode verify/last
On 02/05/17 13:06, Durack, Paul J. wrote: