spins2netcdf - convert binary SPINS outputs into netCDF files.
spins2netcdf [-hkmstv] [-fFIELD] [-iINDEX] [-n THREADS] [-o FILE]
spins2netcdf converts the chosen fields and indices of SPINS binary data into netCDF files. If no optional arguments are given all binary files are converted. If the files are large, or there are many this might take a while and be unnecessary. With no arguments, spins2netcdf will create a netCDF file for each index of binary data in the current directory.
By default, spins2netcdf reorients the binary data from y-z-x format into z-y-x format which is preferred by ParaView and VisIt. This can be turned off with the -k flag, which also considerably speeds up the conversion process. However, ParaView and VisIt will incorrectly label the axes.
-f, --input-fields arg
SPINS field names to convert. The name must be immediately after f (no space allowed), and must repeat the format for multiple field names (ie. -frho -fu -fv ...)
Print to screen the options available.
-i, --input-indices arg
SPINS indices of binary data to convert. Integer must be immediately after i (no space allowed), and must repeat the format for multiple indices (ie. -i5 -i10 -i15 ...)
Keep the orientation of the SPINS binary data (y-z-x). Without this flag, spins2netcdf will convert the orientation to z-y-x format which is preferred by ParaView and VisIt.
Use memory mapped file.
Number of threads to use. The conversion doesn't parallelize very well, so don't go any larger than n=8.
NetCDF output file name. Default is output_#.nc where # is the SPINS index. All files will end in _#.nc.
Do not print progress messages to screen.
Keep temporary files (*.tmp) for debugging.
Print the version information to screen.
Convert all binary files for all fields and all indices:
Convert only the rho fields:
Convert only the 10th and 20th index:
spins2netcdf -i10 -i20
Use 4 threads:
spins2netcdf -n 4