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 54a1255
Show file tree
Hide file tree
Showing 5 changed files with 285 additions and 69 deletions.
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 54a1255

Please sign in to comment.