Skip to content

Commit fc02007

Browse files
committed
Merge branch 'ambrad/hommexx/fix-E3SM-SCREAMv1-build' (PR #6645)
Hommexx: Temporarily work around some EAMxx-Hommexx incompatibilities. These are due to PR #6594 and break the E3SM-repo EAMxx build. Once the SCREAM and E3SM repos are unified, we can back out these workarounds. The workarounds are isolated to components/homme, keeping the commit separation of components/eamxx (SCREAM repo) and components/homme (E3SM repo) clean. Fixes #6635. [BFB]
2 parents ae51494 + 2413f42 commit fc02007

File tree

5 files changed

+13
-2
lines changed

5 files changed

+13
-2
lines changed

components/homme/src/preqx_kokkos/cxx/cxx_f90_interface_preqx.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ void init_simulation_params_c (const int& remap_alg, const int& limiter_option,
9191
params.hypervis_scaling = hypervis_scaling;
9292
params.disable_diagnostics = disable_diagnostics;
9393
params.use_moisture = use_moisture;
94+
params.moisture = params.use_moisture ? MoistDry::MOIST : MoistDry::DRY; //todo-repo-unification
9495
params.use_cpstar = use_cpstar;
9596
params.transport_alg = transport_alg;
9697
// SphereOperators parameters; preqx supports only the sphere.

components/homme/src/share/cxx/HommexxEnums.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ enum class ComparisonOp {
4040

4141
// =================== Run parameters enums ====================== //
4242

43+
//todo-repo-unification Remove this enum in favor of bool
44+
// SimulationParams::use_moisture once we change EAMxx to use
45+
// use_moisture. Search "todo-repo-unification" for other bits of code to
46+
// remove.
47+
enum class MoistDry { MOIST, DRY };
48+
4349
enum class ForcingAlg : int {
4450
FORCING_OFF =-1,
4551
FORCING_0 = 0,

components/homme/src/share/cxx/SimulationParams.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ struct SimulationParams
2424

2525
TimeStepType time_step_type;
2626
bool use_moisture;
27+
MoistDry moisture; //todo-repo-unification
2728
RemapAlg remap_alg;
2829
TestCase test_case;
2930
ForcingAlg ftype = ForcingAlg::FORCING_OFF;

components/homme/src/theta-l_kokkos/cxx/cxx_f90_interface_theta.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ void init_simulation_params_c (const int& remap_alg, const int& limiter_option,
114114
params.hypervis_scaling = hypervis_scaling;
115115
params.disable_diagnostics = (bool)disable_diagnostics;
116116
params.use_moisture = (bool)use_moisture;
117+
params.moisture = params.use_moisture ? MoistDry::MOIST : MoistDry::DRY; //todo-repo-unification
117118
params.use_cpstar = (bool)use_cpstar;
118119
params.transport_alg = transport_alg;
119120
params.theta_hydrostatic_mode = (bool)theta_hydrostatic_mode;

components/homme/src/theta-l_kokkos/prim_driver_mod.F90

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,12 +353,14 @@ subroutine prim_init_elements_views (elem)
353353
end subroutine prim_init_elements_views
354354

355355
subroutine prim_init_kokkos_functors (allocate_buffer)
356-
use iso_c_binding, only : c_int
356+
!todo-repo-unification Remove the use of c_bool here. It's used in purely
357+
! F90 code.
358+
use iso_c_binding, only : c_int, c_bool
357359
use theta_f2c_mod, only : init_functors_c, init_boundary_exchanges_c
358360
!
359361
! Optional Input
360362
!
361-
logical, intent(in), optional :: allocate_buffer ! Whether functor memory buffer should be allocated internally
363+
logical(kind=c_bool), intent(in), optional :: allocate_buffer ! Whether functor memory buffer should be allocated internally
362364
integer(kind=c_int) :: ab
363365
! Initialize the C++ functors in the C++ context
364366
! If no argument allocate_buffer is present,

0 commit comments

Comments
 (0)