Skip to content

Commit d4c0b67

Browse files
committed
EAMxx: Removing unused code.
EAMxx: Fixing compilation error in CUDA.
1 parent 18e9fef commit d4c0b67

File tree

2 files changed

+6
-33
lines changed

2 files changed

+6
-33
lines changed

components/eamxx/src/physics/mam/readfiles/vertical_remapper_mam4.cpp

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
#include "vertical_remapper_mam4.hpp"
2-
3-
#include "share/grid/point_grid.hpp"
4-
#include "share/io/scorpio_input.hpp"
5-
#include "share/field/field_tag.hpp"
6-
#include "share/field/field_identifier.hpp"
7-
#include "share/util/eamxx_universal_constants.hpp"
82
#include "share/io/eamxx_scorpio_interface.hpp"
9-
10-
#include <ekat/util/ekat_units.hpp>
11-
#include <ekat/kokkos/ekat_kokkos_utils.hpp>
12-
13-
#include <numeric>
3+
#include <mam4xx/mam4.hpp>
144

155
namespace scream
166
{
@@ -34,11 +24,7 @@ void VerticalRemapperMAM4::remap_fwd_impl ()
3424

3525
}
3626
}
37-
void VerticalRemapperMAM4::
38-
set_source_pressure (const Field& p)
39-
{
40-
m_src_pmid=p;
41-
}
27+
4228
void VerticalRemapperMAM4::
4329
set_target_pressure (const Field& p)
4430
{
@@ -78,15 +64,15 @@ apply_vertical_interpolation(const Field& f_src, const Field& f_tgt,
7864

7965
const auto policy =
8066
ekat::ExeSpaceUtils<KT::ExeSpace>::get_default_team_policy(ncols, nlevs_tgt);
81-
67+
using Team = Kokkos::TeamPolicy<KT::ExeSpace>::member_type;
8268
if (m_vremap_type== MAM4_PSRef) {
8369

8470
const int unit_factor_pin=1;
8571
const auto p_src_c = p_src.get_view<const Real **>();
8672

8773
Kokkos::parallel_for(
8874
"vert_interp", policy,
89-
KOKKOS_LAMBDA(const ThreadTeam &team) {
75+
KOKKOS_LAMBDA(const Team &team) {
9076
const int icol = team.league_rank();
9177
const auto pin_at_icol = ekat::subview(p_src_c, icol);
9278
const auto pmid_at_icol = ekat::subview(p_tgt_c, icol);
@@ -104,7 +90,7 @@ apply_vertical_interpolation(const Field& f_src, const Field& f_tgt,
10490

10591
Kokkos::parallel_for(
10692
"vert_interp", policy,
107-
KOKKOS_LAMBDA(const ThreadTeam &team) {
93+
KOKKOS_LAMBDA(const Team &team) {
10894
const int icol = team.league_rank();
10995
const auto pmid_at_icol = ekat::subview(p_tgt_c, icol);
11096
const auto datain_at_icol = ekat::subview(datain, icol);
@@ -122,7 +108,7 @@ apply_vertical_interpolation(const Field& f_src, const Field& f_tgt,
122108
constexpr Real m2km = 1e-3;
123109
Kokkos::parallel_for(
124110
"tracer_vert_interp_loop", policy,
125-
KOKKOS_LAMBDA(const ThreadTeam &team) {
111+
KOKKOS_LAMBDA(const Team &team) {
126112
const int icol = team.league_rank();
127113
const auto datain_at_icol = ekat::subview(datain, icol);
128114
const auto dataout_at_icol = ekat::subview(dataout, icol);

components/eamxx/src/physics/mam/readfiles/vertical_remapper_mam4.hpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
#ifndef EAMXX_VERTICAL_REMAPPER_MAM4_HPP
22
#define EAMXX_VERTICAL_REMAPPER_MAM4_HPP
33

4-
// #include "share/grid/remap/abstract_remapper.hpp"
54
#include "share/grid/remap/vertical_remapper.hpp"
6-
#include <mam4xx/mam4.hpp>
75

86
namespace scream
97
{
@@ -29,7 +27,6 @@ class VerticalRemapperMAM4 : public VerticalRemapper
2927

3028
~VerticalRemapperMAM4 () = default;
3129

32-
void set_source_pressure (const Field& p);
3330
void set_target_pressure (const Field& p);
3431
void set_source_pressure (const std::string& file_name);
3532

@@ -45,16 +42,6 @@ class VerticalRemapperMAM4 : public VerticalRemapper
4542
const Field& p_src, const Field& p_tgt) const;
4643

4744
protected:
48-
49-
using KT = KokkosTypes<DefaultDevice>;
50-
51-
template<typename T>
52-
using view_1d = typename KT::template view_1d<T>;
53-
template<typename T>
54-
using view_2d = typename KT::template view_2d<T>;
55-
56-
// a thread team dispatched to a single vertical column
57-
using ThreadTeam = mam4::ThreadTeam;
5845
VertRemapType m_vremap_type;
5946
};
6047

0 commit comments

Comments
 (0)