Skip to content

Commit 488607c

Browse files
committed
rm area_fraction from update_sim functions
1 parent e86fd76 commit 488607c

File tree

5 files changed

+9
-14
lines changed

5 files changed

+9
-14
lines changed

experiments/ClimaEarth/components/land/climaland_integrated.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ end
420420
Interfacer.close_output_writers(sim::ClimaLandSimulation) =
421421
isnothing(sim.output_writer) || close(sim.output_writer)
422422

423-
function FieldExchanger.update_sim!(sim::ClimaLandSimulation, csf, area_fraction)
423+
function FieldExchanger.update_sim!(sim::ClimaLandSimulation, csf)
424424
# update fields for radiative transfer
425425
Interfacer.update_field!(sim, Val(:diffuse_fraction), csf.diffuse_fraction)
426426
Interfacer.update_field!(sim, Val(:sw_d), csf.SW_d)

experiments/ClimaEarth/components/ocean/oceananigans.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ function Interfacer.update_field!(sim::OceananigansSimulation, ::Val{:area_fract
445445
end
446446

447447
"""
448-
FieldExchanger.update_sim!(sim::OceananigansSimulation, csf, area_fraction)
448+
FieldExchanger.update_sim!(sim::OceananigansSimulation, csf)
449449
450450
Update the ocean simulation with the provided fields, which have been filled in
451451
by the coupler.
@@ -460,7 +460,7 @@ ClimaAtmos provides precipitation as a negative flux at the surface, and
460460
Oceananigans represents precipitation as a positive salinity flux,
461461
so a sign change is needed when we convert from precipitation to salinity flux.
462462
"""
463-
function FieldExchanger.update_sim!(sim::OceananigansSimulation, csf, area_fraction)
463+
function FieldExchanger.update_sim!(sim::OceananigansSimulation, csf)
464464
(; ocean_reference_density, ocean_heat_capacity, ocean_fresh_water_density) =
465465
sim.ocean_properties
466466

experiments/ClimaEarth/components/ocean/prescr_ocean.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,12 @@ function Checkpointer.restore_cache!(sim::PrescribedOceanSimulation, new_cache)
187187
end
188188

189189
"""
190-
FieldExchanger.update_sim!(::PrescribedOceanSimulation, csf, area_fraction)
190+
FieldExchanger.update_sim!(::PrescribedOceanSimulation, csf)
191191
192192
Update the wind velocity (needed for the turbulent flux calculation) and the
193193
direct and diffuse albedos of the ocean.
194194
"""
195-
function FieldExchanger.update_sim!(sim::PrescribedOceanSimulation, csf, area_fraction)
195+
function FieldExchanger.update_sim!(sim::PrescribedOceanSimulation, csf)
196196
Interfacer.update_field!(sim, Val(:u_int), csf.u_int)
197197
Interfacer.update_field!(sim, Val(:v_int), csf.v_int)
198198

src/FieldExchanger.jl

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -199,15 +199,15 @@ function update_sim!(atmos_sim::Interfacer.AtmosModelSimulation, csf)
199199
end
200200

201201
"""
202-
update_sim!(sim::SurfaceModelSimulation, csf, area_fraction)
202+
update_sim!(sim::SurfaceModelSimulation, csf)
203203
204204
Updates the surface component model cache with the current coupler fields besides turbulent fluxes.
205205
206206
# Arguments
207207
- `sim`: [Interfacer.SurfaceModelSimulation] containing a surface model simulation object.
208208
- `csf`: [NamedTuple] containing coupler fields.
209209
"""
210-
function update_sim!(sim::Interfacer.SurfaceModelSimulation, csf, area_fraction)
210+
function update_sim!(sim::Interfacer.SurfaceModelSimulation, csf)
211211
# radiative fluxes
212212
Interfacer.update_field!(sim, Val(:radiative_energy_flux_sfc), csf.F_radiative)
213213

@@ -227,13 +227,8 @@ Iterates `update_sim!` over all component model simulations saved in `cs.model_s
227227
- `csf`: [NamedTuple] containing coupler fields.
228228
"""
229229
function update_model_sims!(model_sims, csf)
230-
boundary_space = axes(csf)
231230
for sim in model_sims
232-
if sim isa Interfacer.SurfaceModelSimulation
233-
update_sim!(sim, csf, Interfacer.get_field(sim, Val(:area_fraction)))
234-
else
235-
update_sim!(sim, csf)
236-
end
231+
update_sim!(sim, csf)
237232
end
238233
end
239234

test/flux_calculator_tests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Interfacer.get_field(sim::TestAtmos, ::Val{:liquid_precipitation}) =
4040
CC.Fields.zeros(axes(sim.integrator.T))
4141
Interfacer.get_field(sim::TestAtmos, ::Val{:snow_precipitation}) =
4242
CC.Fields.zeros(axes(sim.integrator.T))
43-
FieldExchanger.update_sim!(sim::TestAtmos, fields, _) = nothing
43+
FieldExchanger.update_sim!(sim::TestAtmos, fields) = nothing
4444

4545
function FluxCalculator.update_turbulent_fluxes!(sim::TestAtmos, fields)
4646
(; F_turb_ρτxz, F_lh, F_sh, F_turb_moisture) = fields

0 commit comments

Comments
 (0)