corrected environmental swd scripts - rowmeans/rowsums error and static/dynamic converstion error