Skip to content

Commit

Permalink
fix and format
Browse files Browse the repository at this point in the history
  • Loading branch information
szy21 committed Nov 13, 2023
1 parent d22ca86 commit af6fad0
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 24 deletions.
3 changes: 0 additions & 3 deletions config/default_configs/default_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@ forcing:
test_dycore_consistency:
help: "Test dycore consistency [`false` (default), `true`]"
value: false
energy_name:
help: "Energy variable name [`rhoe` (default), `rhotheta`]"
value: "rhoe"
dt_save_to_disk:
help: "Time between saving to disk. Examples: [`10secs`, `1hours`, `Inf` (do not save)]"
value: "Inf"
Expand Down
7 changes: 1 addition & 6 deletions post_processing/post_processing_funcs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@ import ClimaCoreTempestRemap: def_space_coord
import ClimaCoreSpectra: power_spectrum_1d, power_spectrum_2d
import ClimaCore: Geometry, Fields, Spaces
using LinearAlgebra: norm
import ClimaAtmos:
DryModel,
EquilMoistModel,
NonEquilMoistModel,
PotentialTemperature,
TotalEnergy
import ClimaAtmos: DryModel, EquilMoistModel, NonEquilMoistModel

function process_name(s::AbstractString)
# "c_ρ", "c_ρe", "c_uₕ_1", "c_uₕ_2", "f_w_1"
Expand Down
1 change: 0 additions & 1 deletion src/initial_conditions/InitialConditions.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module InitialConditions

import ..AtmosModel
import ..PotentialTemperature
import ..DryModel
import ..EquilMoistModel
import ..NonEquilMoistModel
Expand Down
7 changes: 2 additions & 5 deletions src/prognostic_equations/hyperdiffusion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,8 @@ NVTX.@annotate function hyperdiffusion_tendency!(Yₜ, Y, p, t)
C123(wgradₕ(divₕ(p.precomputed.ᶜu))) -
C123(wcurlₕ(C123(curlₕ(p.precomputed.ᶜu))))

if in propertynames(ᶜspecific)
@. ᶜ∇²specific_energy = wdivₕ(gradₕ(ᶜspecific.θ))
elseif :e_tot in propertynames(ᶜspecific)
@. ᶜ∇²specific_energy = wdivₕ(gradₕ(ᶜspecific.e_tot + ᶜp / Y.c.ρ))
end
@. ᶜ∇²specific_energy = wdivₕ(gradₕ(ᶜspecific.e_tot + ᶜp / Y.c.ρ))

if diffuse_tke
@. ᶜ∇²tke⁰ = wdivₕ(gradₕ(ᶜtke⁰))
end
Expand Down
2 changes: 1 addition & 1 deletion src/prognostic_equations/implicit/implicit_solver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function ImplicitEquationJacobian(

is_in_Y(name) = MatrixFields.has_field(Y, name)

energy_name = (@name(c.ρe_tot),)
energy_name = @name(c.ρe_tot)
tracer_names = (
@name(c.ρq_tot),
@name(c.ρq_liq),
Expand Down
2 changes: 1 addition & 1 deletion src/prognostic_equations/implicit/implicit_tendency.jl
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function implicit_vertical_advection_tendency!(Yₜ, Y, p, t, colidx)
ᶠu³[colidx],
ᶜχ[colidx],
dt,
χ_name == ? energy_upwinding : tracer_upwinding,
tracer_upwinding,
)
end

Expand Down
2 changes: 0 additions & 2 deletions src/prognostic_equations/vertical_diffusion_boundary_layer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ function vertical_diffusion_boundary_layer_tendency!(
χ_name == :e_tot && continue
if χ_name == :q_tot
@. ρ_flux_χ[colidx] = sfc_conditions.ρ_flux_q_tot[colidx]
elseif χ_name ==
@. ρ_flux_χ[colidx] = sfc_conditions.ρ_flux_θ[colidx]
else
@. ρ_flux_χ[colidx] = C3(FT(0))
end
Expand Down
4 changes: 0 additions & 4 deletions src/solver/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ struct DryModel <: AbstractMoistureModel end
struct EquilMoistModel <: AbstractMoistureModel end
struct NonEquilMoistModel <: AbstractMoistureModel end

abstract type AbstractEnergyFormulation end
struct PotentialTemperature <: AbstractEnergyFormulation end

abstract type AbstractPrecipitationModel end
struct NoPrecipitation <: AbstractPrecipitationModel end
struct Microphysics0Moment <: AbstractPrecipitationModel end
Expand Down Expand Up @@ -229,7 +226,6 @@ struct GCMSurfaceThermoState <: AbstractSurfaceThermoState end
# Define broadcasting for types
Base.broadcastable(x::AbstractSurfaceThermoState) = tuple(x)
Base.broadcastable(x::AbstractMoistureModel) = tuple(x)
Base.broadcastable(x::AbstractEnergyFormulation) = tuple(x)
Base.broadcastable(x::AbstractPrecipitationModel) = tuple(x)
Base.broadcastable(x::AbstractForcing) = tuple(x)
Base.broadcastable(x::PrognosticEDMFX) = tuple(x)
Expand Down
1 change: 0 additions & 1 deletion src/surface_conditions/SurfaceConditions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ module SurfaceConditions

import ..InitialConditions as ICs
import ..Parameters as CAP
import ..PotentialTemperature
import ..DryModel
import ..ZonallyAsymmetricSST
import ..ZonallySymmetricSST
Expand Down

0 comments on commit af6fad0

Please sign in to comment.