@@ -124,7 +124,16 @@ function BucketSimulation(
124124 τc = FT(float(dt))
125125 params = CL. Bucket. BucketModelParameters(toml_dict; albedo, τc)
126126
127- args = (params, CL. CoupledAtmosphere{FT}(surface_space, atmos_h), CL. CoupledRadiativeFluxes{FT}(), domain)
127+ # Interpolate atmosphere height field to surface space of land model,
128+ # since that's where we compute fluxes for this land model
129+ atmos_h = Interfacer. remap(surface_space, atmos_h)
130+
131+ args = (
132+ params,
133+ CL. CoupledAtmosphere{FT}(surface_space, atmos_h),
134+ CL. CoupledRadiativeFluxes{FT}(),
135+ domain,
136+ )
128137 model = CL. Bucket. BucketModel{FT, typeof.(args). .. }(args... )
129138
130139 # Initial conditions with no moisture
@@ -320,16 +329,14 @@ end
320329function Interfacer. update_field!(sim:: BucketSimulation , :: Val{:air_humidity} , field)
321330 Interfacer. remap!(sim. integrator. p. drivers. q, field)
322331end
323- function Interfacer. update_field!(
324- sim:: BucketSimulation ,
325- :: Val{:air_velocity} ,
326- u_int,
327- v_int,
328- )
332+ function Interfacer. update_field!(sim:: BucketSimulation , :: Val{:air_velocity} , u_int, v_int)
329333 Interfacer. remap!(sim. integrator. p. bucket. scratch1, u_int)
330334 Interfacer. remap!(sim. integrator. p. bucket. scratch2, v_int)
331335 sim. integrator. p. drivers. u .=
332- StaticArrays. SVector.(sim. integrator. p. bucket. scratch1, sim. integrator. p. bucket. scratch2)
336+ StaticArrays. SVector.(
337+ sim. integrator. p. bucket. scratch1,
338+ sim. integrator. p. bucket. scratch2,
339+ )
333340end
334341function Interfacer. update_field!(
335342 sim:: BucketSimulation ,
@@ -414,7 +421,7 @@ for this model. These are then summed using area-weighting across all surface
414421models to get the total fluxes. Fluxes where the area fraction is zero are set to zero.
415422
416423Currently, this calculation is done on the land surface space, and the computed fluxes
417- are remapped onto the coupler boundary space as the coupler fields are updated. In the future,
424+ are remapped onto the coupler boundary space as the coupler fields are updated. In the future,
418425we may compute fluxes in the bucket model's internal `step!` function.
419426
420427# Arguments
0 commit comments