Skip to content

Commit

Permalink
Add debugging info
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisYatunin committed Jul 10, 2024
1 parent 3e30fd8 commit 5bf2208
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 182 deletions.
2 changes: 1 addition & 1 deletion config/model_configs/box_analytic_cosine_mountain_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ x_elem: 30
y_elem: 30
z_elem: 100
z_stretch: false
dt: "8secs"
dt: "6secs"
t_end: "24hours"
use_reference_state: false
rayleigh_sponge: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ z_max: 21e3
x_elem: 30
z_elem: 100
z_stretch: false
dt: "8secs"
dt: "6secs"
t_end: "24hours"
use_reference_state: false
rayleigh_sponge: true
Expand Down
9 changes: 2 additions & 7 deletions examples/hybrid/driver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@ import ClimaAtmos as CA
import Random
Random.seed!(1234)

# TODO: Fix the bug that's making this necessary for 2D topography runs.
import ClimaCore.DataLayouts: promote_parent_array_type
import CUDA
promote_parent_array_type(
::Type{CUDA.CuArray{T1, N, B} where {N}},
::Type{Array{T2, N} where {N}},
) where {T1, T2, B} = CUDA.CuArray{promote_type(T1, T2), N, B} where {N}
include("fix_1d_spectral_space_on_gpu.jl")
# include("disable_topography_dss.jl")

if !(@isdefined config)
(; config_file, job_id) = CA.commandline_kwargs()
Expand Down
2 changes: 0 additions & 2 deletions src/ClimaAtmos.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
module ClimaAtmos

# include("disable_topography_dss.jl")

using NVTX, Colors
import Thermodynamics as TD

Expand Down
3 changes: 0 additions & 3 deletions src/analytic_solutions/analytic_solutions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ function initial_thermo_state(params, coord)
T_min = FT(100)
z_iso = log((T_min / T_sfc - a) / (1 - a)) / β
p_iso = p_sfc * ((1 - a) / (1 - a * T_sfc / T_min))^(cp_d / R_d)
z > z_iso &&
@warn "Extending constant-N profile with isothermal profile above T = \
$T_min (z = $z_iso)" maxlog = 1

# The perturbation in approximate_FΔuvw is computed around a background
# state that is not hydrostatically balanced and is unphysical above 30 km,
Expand Down
168 changes: 0 additions & 168 deletions src/disable_topography_dss.jl

This file was deleted.

8 changes: 8 additions & 0 deletions src/utils/common_spaces.jl
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@ function make_hybrid_spaces(
hypsography =
Hypsography.LinearAdaption(Geometry.ZPoint.(z_surface))
end
@show device
@show ClimaComms.device(Fields.coordinate_field(h_space))
@show ClimaComms.device(z_grid)
@show ClimaComms.device(z_surface)
@show ClimaComms.device(Geometry.ZPoint.(z_surface))
@show typeof(h_space)
@show typeof(z_grid)
@show typeof(z_surface)
end
grid = Grids.ExtrudedFiniteDifferenceGrid(h_grid, z_grid, hypsography; deep)
# TODO: return the grid
Expand Down

0 comments on commit 5bf2208

Please sign in to comment.