Skip to content

Commit e6ba001

Browse files
committed
pass csf.T_sfc for atmos update temp
1 parent 9839b78 commit e6ba001

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

experiments/ClimaEarth/components/atmosphere/climaatmos.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,11 @@ Interfacer.get_field(sim::ClimaAtmosSimulation, ::Val{:thermo_state_int}) =
185185
CC.Spaces.level(sim.integrator.p.precomputed.ᶜts, 1)
186186
Interfacer.get_field(atmos_sim::ClimaAtmosSimulation, ::Val{:water}) =
187187
ρq_tot(atmos_sim.integrator.p.atmos.moisture_model, atmos_sim.integrator)
188-
function Interfacer.update_field!(sim::ClimaAtmosSimulation, ::Val{:surface_temperature}, csf)
188+
function Interfacer.update_field!(sim::ClimaAtmosSimulation, ::Val{:surface_temperature}, field)
189189
# note that this field is also being updated internally by the surface thermo state in ClimaAtmos
190190
# if turbulent fluxes are calculated, to ensure consistency. In case the turbulent fluxes are not
191191
# calculated, we update the field here.
192-
sim.integrator.p.radiation.rrtmgp_model.surface_temperature .= CC.Fields.field2array(csf.T_sfc)
192+
sim.integrator.p.radiation.rrtmgp_model.surface_temperature .= CC.Fields.field2array(field)
193193
end
194194
# extensions required by FluxCalculator (partitioned fluxes)
195195
Interfacer.get_field(sim::ClimaAtmosSimulation, ::Val{:height_int}) =
@@ -269,7 +269,7 @@ function FieldExchanger.update_sim!(atmos_sim::ClimaAtmosSimulation, csf, turbul
269269
!(p.atmos.insolation isa CA.IdealizedInsolation) && CA.set_insolation_variables!(u, p, t, p.atmos.insolation)
270270
Interfacer.update_field!(atmos_sim, Val(:surface_direct_albedo), csf.surface_direct_albedo)
271271
Interfacer.update_field!(atmos_sim, Val(:surface_diffuse_albedo), csf.surface_diffuse_albedo)
272-
Interfacer.update_field!(atmos_sim, Val(:surface_temperature), csf)
272+
Interfacer.update_field!(atmos_sim, Val(:surface_temperature), csf.T_sfc)
273273
end
274274

275275
if turbulent_fluxes isa FluxCalculator.PartitionedStateFluxes

0 commit comments

Comments
 (0)