Skip to content

Commit a8f8f66

Browse files
authored
update PrescribedAtmosphere state to load correct time indices into memory (#651)
1 parent 0c34979 commit a8f8f66

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

src/OceanSeaIceModels/PrescribedAtmospheres.jl

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -409,18 +409,21 @@ function PrescribedAtmosphere(grid, times=[zero(grid)];
409409
thermodynamics_parameters = AtmosphereThermodynamicsParameters(FT)
410410
end
411411

412-
return PrescribedAtmosphere(grid,
413-
clock,
414-
velocities,
415-
pressure,
416-
tracers,
417-
freshwater_flux,
418-
auxiliary_freshwater_flux,
419-
downwelling_radiation,
420-
thermodynamics_parameters,
421-
times,
422-
convert(FT, surface_layer_height),
423-
convert(FT, boundary_layer_height))
412+
atmosphere = PrescribedAtmosphere(grid,
413+
clock,
414+
velocities,
415+
pressure,
416+
tracers,
417+
freshwater_flux,
418+
auxiliary_freshwater_flux,
419+
downwelling_radiation,
420+
thermodynamics_parameters,
421+
times,
422+
convert(FT, surface_layer_height),
423+
convert(FT, boundary_layer_height))
424+
update_state!(atmosphere)
425+
426+
return atmosphere
424427
end
425428

426429
struct TwoBandDownwellingRadiation{SW, LW}

0 commit comments

Comments
 (0)