Skip to content

Commit

Permalink
Test struct
Browse files Browse the repository at this point in the history
  • Loading branch information
Sbozzolo committed Oct 18, 2023
1 parent 3209d1a commit c92f859
Showing 1 changed file with 70 additions and 2 deletions.
72 changes: 70 additions & 2 deletions src/cache/precomputed_quantities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,75 @@
import Thermodynamics as TD
import ClimaCore: Spaces, Fields

Base.@kwdef struct PrecomputedEDMFX{
T0,
T1,
T2,
T3,
T4,
T5,
T6,
T7,
T8,
T9,
T10,
T11,
T12,
T13,
T14,
T15,
T16,
T17,
T18,
T19,
T20,
T21,
T22,
T23,
T24,
T25,
T26,
T27,
T28,
T29,
T30,
T31
}
ᶜspecific::T0
ᶜu::T1
ᶠu³::T2
ᶜK::T3
ᶜts::T4
ᶜp::T5
ᶜh_tot::T31
sfc_conditions::T6
env_thermo_quad::T7
ᶜspecific⁰::T8
ᶜρa⁰::T9
ᶠu₃⁰::T10
ᶜu⁰::T11
ᶠu³⁰::T12
ᶜK⁰::T13
ᶜts⁰::T14
ᶜρ⁰::T15
ᶜlinear_buoygrad::T16
ᶜstrain_rate_norm::T17
ᶜmixing_length::T18
ᶜK_u::T19
ᶜK_h::T20
ᶜspecificʲs::T21
ᶜuʲs::T22
ᶠu³ʲs::T23
ᶜKʲs::T24
ᶜtsʲs::T25
ᶜρʲs::T26
ᶜentrʲs::T27
ᶜdetrʲs::T28
ᶜh_totʲs::T29
ᶜh_tot⁰::T30
end


function precomputed_gs(Y, atmos)
FT = eltype(Y)
TST = thermo_state_type(atmos.moisture_model, FT)
Expand Down Expand Up @@ -63,8 +132,7 @@ function precomputed_quantities(Y, atmos, turbconv_model::EDMFX)
) : (;)
)...,
)

return (; gs_quantities..., sgs_quantities...)
return PrecomputedEDMFX(; gs_quantities..., sgs_quantities...)
end

function precomputed_quantities(Y, atmos, turbconv_model::DiagnosticEDMFX)
Expand Down

0 comments on commit c92f859

Please sign in to comment.