Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove convert_forcing_prog_fp and convert_forcing_thetal #146

Merged
merged 1 commit into from
Aug 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions src/Forcing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ function initialize(self::ForcingBase, GMV::GridMeanVariables, ::ForcingBaseType
self.dqtdt = center_field(self.Gr)
self.ug = center_field(self.Gr)
self.vg = center_field(self.Gr)
self.convert_forcing_prog_fp = convert_forcing_thetal
return
end

Expand Down Expand Up @@ -43,15 +42,7 @@ function update(self::ForcingBase{ForcingStandard}, GMV::GridMeanVariables)

@inbounds for k in real_center_indicies(self.Gr)
# Apply large-scale horizontal advection tendencies
qv = GMV.QT.values[k] - GMV.QL.values[k]
GMV.H.tendencies[k] += self.convert_forcing_prog_fp(
self.Ref.p0_half[k],
GMV.QT.values[k],
qv,
GMV.T.values[k],
self.dqtdt[k],
self.dTdt[k],
)
GMV.H.tendencies[k] += self.dTdt[k] / exner_c(self.Ref.p0_half[k])
GMV.QT.tendencies[k] += self.dqtdt[k]
end
if self.apply_subsidence
Expand Down
12 changes: 1 addition & 11 deletions src/Radiation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
function initialize(self::RadiationBase, GMV::GridMeanVariables, ::RadiationBaseType)
self.dTdt = center_field(self.Gr)
self.dqtdt = center_field(self.Gr)

self.convert_forcing_prog_fp = convert_forcing_thetal
return
end

Expand Down Expand Up @@ -95,15 +93,7 @@ function update(self::RadiationBase{RadiationDYCOMS_RF01}, GMV::GridMeanVariable

@inbounds for k in real_center_indicies(self.Gr)
# Apply large-scale horizontal advection tendencies
qv = GMV.QT.values[k] - GMV.QL.values[k]
GMV.H.tendencies[k] += self.convert_forcing_prog_fp(
self.Ref.p0_half[k],
GMV.QT.values[k],
qv,
GMV.T.values[k],
self.dqtdt[k],
self.dTdt[k],
)
GMV.H.tendencies[k] += self.dTdt[k] / exner_c(self.Ref.p0_half[k])
end

return
Expand Down
1 change: 0 additions & 1 deletion src/TurbulenceConvection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ include("EDMF_Updrafts.jl")
include("Turbulence_PrognosticTKE.jl")
include("Forcing.jl")
include("Radiation.jl")
include("forcing_functions.jl")
include("Surface.jl")
include("surface_functions.jl")
include("closures/perturbation_pressure.jl")
Expand Down
3 changes: 0 additions & 3 deletions src/forcing_functions.jl

This file was deleted.

4 changes: 0 additions & 4 deletions src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -691,17 +691,13 @@ Base.@kwdef mutable struct ForcingBase{T}
coriolis_param::Float64 = 0
ug::AbstractArray{Float64, 1} = zeros(1)
vg::AbstractArray{Float64, 1} = zeros(1)
# (*convert_forcing_prog_fp)(p0, qt, qv, T,::Float64
# qt_tendency, T_tendency) ::Float64
convert_forcing_prog_fp::Function = x -> x
Gr::Grid
Ref::ReferenceState
end

Base.@kwdef mutable struct RadiationBase{T}
dTdt::AbstractArray{Float64, 1} = zeros(1) # horizontal advection temperature tendency
dqtdt::AbstractArray{Float64, 1} = zeros(1) # horizontal advection moisture tendency
convert_forcing_prog_fp::Function = x -> x
Gr::Grid
Ref::ReferenceState
divergence::Float64 = 0
Expand Down