Skip to content

Commit

Permalink
Add missing blocks to the dycore Jacobian
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisYatunin committed Dec 21, 2023
1 parent c621bcb commit 92b2a1c
Show file tree
Hide file tree
Showing 7 changed files with 290 additions and 77 deletions.
4 changes: 2 additions & 2 deletions perf/flame.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ allocs_limit["flame_perf_target"] = 148_256
allocs_limit["flame_perf_target_tracers"] = 180_512
allocs_limit["flame_perf_target_edmfx"] = 7_005_552
allocs_limit["flame_perf_diagnostics"] = 25_356_928
allocs_limit["flame_perf_target_diagnostic_edmfx"] = 1_311_040
allocs_limit["flame_perf_target_diagnostic_edmfx"] = 1_315_072
allocs_limit["flame_sphere_baroclinic_wave_rhoe_equilmoist_expvdiff"] =
4_018_252_656
allocs_limit["flame_perf_target_threaded"] = 1_276_864
allocs_limit["flame_perf_target_callbacks"] = 37_277_112
allocs_limit["flame_perf_gw"] = 3_226_429_472
allocs_limit["flame_perf_gw"] = 3_226_429_728
allocs_limit["flame_perf_target_prognostic_edmfx_aquaplanet"] = 1_258_848

# Ideally, we would like to track all the allocations, but this becomes too
Expand Down
2 changes: 1 addition & 1 deletion regression_tests/ref_counter.jl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
141
142
3 changes: 3 additions & 0 deletions src/cache/cache.jl
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ end
# This is a constant Coriolis frequency that is only used if space is flat
function build_cache(Y, atmos, params, surface_setup, dt, t_end, start_date)
FT = eltype(params)
CTh = CTh_vector_type(Y.c)

ᶜcoord = Fields.local_geometry_field(Y.c).coordinates
grav = FT(CAP.grav(params))
Expand Down Expand Up @@ -155,6 +156,8 @@ function build_cache(Y, atmos, params, surface_setup, dt, t_end, start_date)
ᶜp_ref,
ᶜT = similar(Y.c, FT),
ᶜf,
ᶜkappa_m = similar(Y.c, FT),
∂ᶜK_∂ᶜuₕ = similar(Y.c, DiagonalMatrixRow{Adjoint{FT, CTh{FT}}}),
∂ᶜK_∂ᶠu₃ = similar(Y.c, BidiagonalMatrixRow{Adjoint{FT, CT3{FT}}}),
# Used by diagnostics such as hfres, evspblw
surface_ct3_unit = CT3.(
Expand Down
2 changes: 1 addition & 1 deletion src/parameters/Parameters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ for var in fieldnames(TD.Parameters.ThermodynamicsParameters)
@eval $var(ps::ACAP) = TD.Parameters.$var(thermodynamics_params(ps))
end
# Thermodynamics derived parameters
for var in [:molmass_ratio, :R_d, :R_v, :cp_d, :cv_v, :cv_l, :cv_d]
for var in [:molmass_ratio, :R_d, :R_v, :e_int_v0, :cp_d, :cv_v, :cv_l, :cv_d]
@eval $var(ps::ACAP) = TD.Parameters.$var(thermodynamics_params(ps))
end

Expand Down
Loading

0 comments on commit 92b2a1c

Please sign in to comment.