To find the initial value of the number of gallons \( g \) in the swimming pool, we need to evaluate the equation \( g = 50x + 1,000 \) when \( x = 0 \), which represents the situation at sunrise (the initial time).
Substituting \( x = 0 \) into the equation:
\[ g = 50(0) + 1,000 \] \[ g = 0 + 1,000 \] \[ g = 1,000 \]
So the initial value of the number of gallons in the swimming pool is 1,000 gallons.