calculate_flux.f90 edit Aug 21