Velocity Potential (VPOT) and Stream Function (STRM) The velocity potential and stream function were calculated by converting the UGRD and VGRD on the Gaussian grid to spectral space and doing the spectral calculation for VPOT and STRM. The divergence and relative vorticity could have been calculated at the same time but these quanties are rarely used. The program that does the calculation is core_uv2sv (UGRD/VGRD to STRM/VPOT). This program uses splib (spectral) and wgrib2lib (grib).