@@ -154,16 +154,12 @@ def williamson_5(
154154 x , y , z = SpatialCoordinate (mesh )
155155 lamda , phi , _ = lonlatr_from_xyz (x , y , z )
156156
157- # Equation: coriolis
158- parameters = ShallowWaterParameters (mesh , H = mean_depth , g = g )
159- Omega = parameters .Omega
160- fexpr = 2 * Omega * z / radius
161-
162157 # Equation: topography
163158 rsq = min_value (R0 ** 2 , (lamda - lamda_c ) ** 2 + (phi - phi_c ) ** 2 )
164159 r = sqrt (rsq )
165160 tpexpr = mountain_height * (1 - r / R0 )
166- eqns = ShallowWaterEquations (domain , parameters , fexpr = fexpr , topog_expr = tpexpr )
161+ parameters = ShallowWaterParameters (mesh , H = mean_depth , g = g , topog_expr = tpexpr )
162+ eqns = ShallowWaterEquations (domain , parameters )
167163
168164 eqns .label_terms (lambda t : not t .has_label (time_derivative ), implicit )
169165
@@ -328,7 +324,7 @@ def williamson_5(
328324 u0 = stepper .fields ('u' )
329325 D0 = stepper .fields ('D' )
330326 uexpr = as_vector ([- u_max * y / radius , u_max * x / radius , 0.0 ])
331- Dexpr = mean_depth - tpexpr - (radius * Omega * u_max + 0.5 * u_max ** 2 ) * (z / radius ) ** 2 / g
327+ Dexpr = mean_depth - tpexpr - (radius * parameters . Omega * u_max + 0.5 * u_max ** 2 ) * (z / radius ) ** 2 / g
332328
333329 u0 .project (uexpr )
334330 D0 .interpolate (Dexpr )
0 commit comments