sfvp is a program that can calculate the Stream function and numerous other fields from basic U and V wind components (AVAILABLE ONLY FOR UNIVERSITY OF READING Researchers). To get access to the sfvp executable run
setup umtools
running sfvp without arguments will print this help information:
These are the instructions for sfvp
Usage:sfvp fn1 vn1 fn2 vn2 opfn
Description:
Calculates streamfunction and velocity potential
on the sphere, given inputs of the two velocity
components on the UM velocity grid
STOP
sfvp outputs:
u
v
du/dx
du/dy
dv/dx
dv/dy
vorticity
divergence
stream function
velocity potential
tvor (?)
tdiv (?)
Notes
- Input data files need to be in netCDF format.
- sfvp only really likes 4d files. To convert a 3d file to a 4d file (by inserting a dummy axis) use ~dan/idl/conv3d4d.pro
- I’ve semi-automated the process of calculating seasonal_means and ensemble_mean_seasonal_means from the output of sfvp. The script that does this lives at /home/dan/data/UM_DATA/SFcalc
- If you get this error: POISSON ERROR - WRONG LATITUDE FROM NCNS2G; ABORT Then it is probably because your lattitude axis is the wrong way around. sfvp seems to prefer positive to negative, rather than vice versa. You can fix this by transforming the axis using xconv. Using xconv to do this may interpolate the data and change the latitude coordinate values, a better way is to use the nco tool ncpdq this will invert the latitude axis without interpolation or changing the coordinate values. An example of ncpdq usage is, ncpdq -a -latvar file.nc file_latswap.nc, where latvar is the name of the netCDF latitude dimension.