Skip to content

Commit

Permalink
Merge #533
Browse files Browse the repository at this point in the history
533: Cleanup unused methods r=charleskawczynski a=charleskawczynski

We can now get rid of `center_field`! 🎉  ~This PR also removes get/set index support for the face-`k` indices (since they're no longer used), so that nobody can accidentally put them back in.~ We can't get rid of that support yet, since we still grab data from arrays in some surface routines.

Co-authored-by: Charles Kawczynski <kawczynski.charles@gmail.com>
  • Loading branch information
bors[bot] and charleskawczynski committed Nov 5, 2021
2 parents 3728ce4 + 0a81984 commit 40430df
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
2 changes: 1 addition & 1 deletion integration_tests/utils/Cases.jl
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ function initialize_forcing(self::CasesBase{TRMM_LBA}, grid::Grid, state, gm, pa
end...)
A = A'

self.rad = zeros(size(A, 1), length(TC.center_field(grid)))
self.rad = zeros(size(A, 1), grid.nz)
self.rad .= A # store matrix in self
ind1 = Int(trunc(10.0 / 600.0)) + 1
ind2 = Int(ceil(10.0 / 600.0))
Expand Down
9 changes: 0 additions & 9 deletions src/Fields.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@

function center_field(grid::Grid)
return zeros(grid.nz)
end

function center_field(grid::Grid, nu::Int)
return zeros(nu, grid.nz)
end

# A complementary struct to ClimaCore's `PlusHalf` type.
struct Cent{I <: Integer}
i::I
Expand Down
3 changes: 0 additions & 3 deletions src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,4 @@ mutable struct EDMF_PrognosticTKE{A1}
)
end
end
diffusivity_m(edmf::EDMF_PrognosticTKE) = edmf.KM
diffusivity_h(edmf::EDMF_PrognosticTKE) = edmf.KH
Ri_bulk_crit(edmf::EDMF_PrognosticTKE) = edmf.Ri_bulk_crit
parameter_set(obj) = obj.param_set

0 comments on commit 40430df

Please sign in to comment.