Phosphorus management for land application of biosolids and animal wastes