Hi There are some options on the EXIT command that let you skip a step in the repeat loop EXIT/CYCLE to skip to the end of the loop, and EXIT/LOOP to get out of the loop entirely. Try this command: yes? repeat/range=1:5/name=yy (if `yy eq 2` then exit/cycle; say `yy`)so you could use that, either just giving a loop number as I've done, or by making some other test, say on the grid of the file. Your error about the file type is because in some commands you still have the file extension .txt and in others you used .nc. You could make your output filenames symbols instead of putting the name in multiple commands, so before the loop, define symbol file1 = sp1mday10_ma.txt ! or .nc! and if using netcdf, set list/format=cdfand then just write to those files, in the repeat loop, list/append/file=($file1)/...As Akshay said, you also need to sort out the /CLOBBER and/APPEND qualifiers. I'd have commands in the script before the loop to delete the files, and then just use /append throughout. If list/append is used and the file doesn't exist, that's fine. Ferret will create it. Ansley On 9/27/2013 8:00 AM, Gopal Mondal
wrote:
|