fix paths in scripts
add snippet to calculate mag from mass flux