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 9, 2024
1 parent 3e30fd8 commit 63d9b92
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 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
1 change: 1 addition & 0 deletions src/ClimaAtmos.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module ClimaAtmos

include("fix_1d_spectral_space_on_gpu.jl")
# include("disable_topography_dss.jl")

using NVTX, Colors
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
4 changes: 1 addition & 3 deletions src/disable_topography_dss.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ import ClimaCore:
DataLayouts,
Geometry,
Topologies,
Quadratures,
Grids,
Hypsography,
Spaces,
Fields,
Operators
import ClimaTimeSteppers
import ClimaComms
using StaticArrays: SVector, SMatrix
using LinearAlgebra: adjoint, Adjoint, ldiv!, DenseMatrix, lu, norm
import LinearAlgebra: adjoint, ldiv!, DenseMatrix, lu, norm

ClimaTimeSteppers.NVTX.@annotate function ClimaTimeSteppers.solve_newton!(
alg::ClimaTimeSteppers.NewtonsMethod,
Expand Down
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 63d9b92

Please sign in to comment.