Ncdiff allows you to two subtract one netCDF file from another and create a new file with the resulting deltas.
Create a difference file from two yearly FOAM files.
ncdiff ha.F1.PBC_TPBOX.00511.nc ha.F1.PBC_TPBOX.00510.nc ha.F1.PBC_TPBOX.00511-00510.nc
In the example, we are subtracting the file ha.F1.PBC_TPBOX.00510.nc from the file ha.F1.PBC_TPBOX.00511.nc and creating a new file that will contain the differences, ha.F1.PBC_TPBOX.00511-00510.nc.
Download the three files to examine the output: