Create text file named conv2nc.tcl and into it copy the code from here: http://www.met.rdg.ac.uk/~jeff/xconv/example2.html. Omit the first line #!/home/jeff/bin/convsh. You may have noticed that this script will convert multiple .pp files into a single NetCDF file. Feel free to adapt my batch file below to do the same, and upload it to the Wiki.

Windows users: you can also process multiple .pp files using a batch file. I haven't been able to find an elegant solution in the time I have available, but here's an inelegant one which works (as long as you don't have any spaces in the path to your folder):

For extra credit, write a batch file to put the NetCDF files back in the original folder structure and upload it to the Wiki. I couldn't make this work in the time I had available!

Linux users: in principle, you should be able to create a nice shell script to do the same operations as step (4). I haven't, because my files are in Windows. If you produce one, please put it on the Wiki!

With MATLAB

The FVCOM toolbox includes a function pp2nc.m which calls convsh to do the conversion of a number of files. It therefore still requires the convsh installation, but it can be included in an existing FVCOM workflow more easily. The function relies on using a convsh script included with the FVCOM toolbox (which is originally taken from here). A simple use case is shown below.