Appendix B
FILE CONVERSION USING THE UTILITY V6V7inp
The utility executable program V6V7inp is supplied with WAMIT Version 7, to facilitate the conversion of old input files from Version 6 to Version 7. These changes are summarized in Section 4.1.
This program is intended for use on Windows PC’s. Reference will be made here to ‘directories’ (folders) and ‘sub-directories’ which are adjacent to the directories. The program is intended to process one or more sets of input files, identified by corresponding FNAMES.WAM files as described in Section 4.8. These are referred to here as the ‘fnames’ files, which should all have the extension ‘.wam’ but may have different filenames corresponding to different sets of input files, as with the standard test runs described in Appendix A.
The program requires the same Intel/Microsoft DLL files as are required by WAMIT Version 7, listed in Section 2.1. These must be in the same directory as the program at runtime. The program can either be run locally from each directory where input files are processed, or alternatively (and more conveniently) in one directory of the PC which is identified in the system PATH.
Before executing the program two preparations must be made: (1) a sub-directory V7inp should be made, to save the new input files, and (2) the input file directory_wam.txt should be made with a listing of all fnames files to be processed. This can either be done manually by the user, or automatically using the batch file V6V7.bat which also runs the program. If the batch file is saved with V6V7inp.exe in a directory identified by the system PATH it can be executed from each directory containing old input files, simply by typing the command V6V7. This automatically performs the steps (1) and (2) above and then runs the program. Alternatively, these three steps can be performed manually by the user. (The simplest way to make the input file directory_wam.txt manually is to execute the DOS command dir *.wam > directory_wam.txt which produces a DOS directory list of all fnames files. The program ignores extraneous columns in this directory and only uses the character string containing ‘.wam’ if this is found.)
When the program is run, a list of the fnames files is output to the monitor, with a list of modified input files appended. The same list is saved in the file v6v7inp.log. Input files which are modified are saved in the sub-directory V7inp. If the user wishes to update the input files for each run, simply execute the DOS command copy v7inp\*.* to overwrite the original files in the directory with the new files. Before overwriting with the new files it may be advisable to save the old input files, for example by copying them to a sub-directory V6inp.
Special situations which should be noted are as follows
- If the old configuration file uses the default name config.wam a new configuration file fnamewam.cfg is generated, where fnamewam is the filename of the fnames file. In this case a new fnames file is generated, including the name of the new .cfg file.
- In cases where IALTPOT=1 is used for the old files and the .gdf file name is included in the .wam file, this filename is removed in the new .wam file.
- Configuration parameters which are no longer used are removed from the new cfg file.
- If the same input file is used with more than one fnames file in the directory, the new input file with the same name may not be correct except for the last run processed. The following example illustrates how this problem may occur: if two runs with fnames files RUNA.WAM and RUNB.WAM use the same POT file RUNAB.POT with IALTPOT=1 format in V6.4, and with different GDF files RUNA.GDF and RUNB.GDF assigned in RUNA.WAM and RUNB.WAM, if V6V7inp processes RUNA first and RUNB second there is only one new file RUNAB.POT with the gdf file specified as RUNB.GDF in this file.
The program V6V7inp is intended to work for all input files which were valid in Version 6, but it is impossible to test the program with all possible combinations of inputs. Users are advised to check the changes in the new input files, especially if error messages are generated in the WAMIT runs using these files, and to report problems by email to info@wamit.com.