def get_a_from_coord(coord_row_num,num_of_deformations,a,scale=1):
    """
    Routine to get node displacements based on coordinates.

    :param int coord_row_num: Node coordinate row number
    :param int num_of_deformations: Number of degrees of freedom per node
    :param array a: Global displacement vector [1 x total degrees of freedom]

    :return float dx: Nodal displacement in x-direction
    :return float dy: Nodal displacement in y-direction
    :return float dz: Nodal displacement in z-direction
    """
    dx = a[coord_row_num*num_of_deformations]*scale
    dy = a[coord_row_num*num_of_deformations+1]*scale
    dz = a[coord_row_num*num_of_deformations+2]*scale
    return dx, dy, dz