The given problem involves the calculation of the length of the weir using the formula for discharge over a rectangular weir:
\( Q = L \cdot H^{1.5} \cdot C_d \)
where \( Q \) is the discharge, \( L \) is the length of the weir, \( H \) is the head, and \( C_d \) is the coefficient of discharge. Substituting the values \( Q = 5 \, \text{m}^3/\text{s} \), \( H = 1 \, \text{m} \), and \( C_d = 1.84 \) (assumed standard value), the calculated length of the weir comes out to be approximately \( 2.49 \, \text{meters} \).