Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hommexx: Temporarily work around some EAMxx-Hommexx incompatibilities. #6645

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ void init_simulation_params_c (const int& remap_alg, const int& limiter_option,
params.hypervis_scaling = hypervis_scaling;
params.disable_diagnostics = disable_diagnostics;
params.use_moisture = use_moisture;
params.moisture = params.use_moisture ? MoistDry::MOIST : MoistDry::DRY; //todo-repo-unification
params.use_cpstar = use_cpstar;
params.transport_alg = transport_alg;
// SphereOperators parameters; preqx supports only the sphere.
Expand Down
6 changes: 6 additions & 0 deletions components/homme/src/share/cxx/HommexxEnums.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ enum class ComparisonOp {

// =================== Run parameters enums ====================== //

//todo-repo-unification Remove this enum in favor of bool
// SimulationParams::use_moisture once we change EAMxx to use
// use_moisture. Search "todo-repo-unification" for other bits of code to
// remove.
enum class MoistDry { MOIST, DRY };

enum class ForcingAlg : int {
FORCING_OFF =-1,
FORCING_0 = 0,
Expand Down
1 change: 1 addition & 0 deletions components/homme/src/share/cxx/SimulationParams.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ struct SimulationParams

TimeStepType time_step_type;
bool use_moisture;
MoistDry moisture; //todo-repo-unification
RemapAlg remap_alg;
TestCase test_case;
ForcingAlg ftype = ForcingAlg::FORCING_OFF;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ void init_simulation_params_c (const int& remap_alg, const int& limiter_option,
params.hypervis_scaling = hypervis_scaling;
params.disable_diagnostics = (bool)disable_diagnostics;
params.use_moisture = (bool)use_moisture;
params.moisture = params.use_moisture ? MoistDry::MOIST : MoistDry::DRY; //todo-repo-unification
params.use_cpstar = (bool)use_cpstar;
params.transport_alg = transport_alg;
params.theta_hydrostatic_mode = (bool)theta_hydrostatic_mode;
Expand Down
6 changes: 4 additions & 2 deletions components/homme/src/theta-l_kokkos/prim_driver_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -353,12 +353,14 @@ subroutine prim_init_elements_views (elem)
end subroutine prim_init_elements_views

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