Skip to content

Commit

Permalink
pass t to amip_diags_setup
Browse files Browse the repository at this point in the history
  • Loading branch information
juliasloan25 committed Oct 16, 2024
1 parent 0a511b6 commit b322309
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion experiments/ClimaEarth/run_amip.jl
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ Use ClimaDiagnostics for default AMIP diagnostics, which currently include turbu
=#
if mode_name == "amip" && use_coupler_diagnostics
include("user_io/amip_diagnostics.jl")
amip_diags_handler = amip_diagnostics_setup(coupler_fields, dir_paths.output, dates.date0[1], calendar_dt)
amip_diags_handler = amip_diagnostics_setup(coupler_fields, dir_paths.output, dates.date0[1], tspan[1], calendar_dt)
else
amip_diags_handler = nothing
end
Expand Down
6 changes: 3 additions & 3 deletions experiments/ClimaEarth/user_io/amip_diagnostics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import ClimaCoupler: Interfacer
import Dates

"""
amip_diagnostics_setup(fields, output_dir, start_date, calendar_dt)
amip_diagnostics_setup(fields, output_dir, start_date, t_start, calendar_dt)
Set up the default diagnostics for an AMIP simulation, using ClimaDiagnostics.
The diagnostics are saved to NetCDF files. Currently, this just includes a
diagnostic for turbulent energy fluxes.
Return a DiagnosticsHandler object to coordinate the diagnostics.
"""
function amip_diagnostics_setup(fields, output_dir, start_date, calendar_dt)
function amip_diagnostics_setup(fields, output_dir, start_date, t_start, calendar_dt)
# Create schedules and writer
schedule_everystep = CD.Schedules.EveryStepSchedule()
schedule_calendar_dt = CD.Schedules.EveryCalendarDtSchedule(calendar_dt, start_date = start_date)
Expand Down Expand Up @@ -48,6 +48,6 @@ function amip_diagnostics_setup(fields, output_dir, start_date, calendar_dt)

# Create the diagnostics handler containing the scheduled diagnostics
scheduled_diags = [F_turb_energy_diag_sched]
amip_diags_handler = CD.DiagnosticsHandler(scheduled_diags, fields, nothing, t)
amip_diags_handler = CD.DiagnosticsHandler(scheduled_diags, fields, nothing, t_start)
return amip_diags_handler
end

0 comments on commit b322309

Please sign in to comment.