FUNCTION vabs(v) REAL(SP), DIMENSION(:), INTENT(IN) :: v REAL(SP) :: vabs vabs=SQRT(dot_product(v,v)) END FUNCTION vabs