File tree Expand file tree Collapse file tree 4 files changed +89
-16
lines changed
components/eamxx/src/physics/gw Expand file tree Collapse file tree 4 files changed +89
-16
lines changed Original file line number Diff line number Diff line change 1- set (PATH_TO_LEGACY_GW ${SCREAM_BASE_DIR} /../eam/src/physics/cam/gw)
21set (GW_SRCS
3- ${PATH_TO_LEGACY_GW} /gw_utils.F90
4- ${PATH_TO_LEGACY_GW} /gw_common.F90
5- ${PATH_TO_LEGACY_GW} /gw_convect.F90
6- ${PATH_TO_LEGACY_GW} /gw_diffusion.F90
7- ${PATH_TO_LEGACY_GW} /gw_front.F90
8- ${PATH_TO_LEGACY_GW} /gw_oro.F90
9- ${PATH_TO_LEGACY_GW} /../vdiff_lu_solver.F90
10- ${CMAKE_CURRENT_SOURCE_DIR} /tests/infra/gw_iso_c.f90
2+ eamxx_gw_process_interface.cpp
113)
124
135# Add ETI source files if not on CUDA/HIP
@@ -38,16 +30,10 @@ if (NOT EAMXX_ENABLE_GPU OR Kokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE OR Kokkos
3830endif ()
3931
4032add_library (gw ${GW_SRCS} )
41- set_target_properties (gw PROPERTIES
42- Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} /modules
43- )
4433
4534target_include_directories (gw PUBLIC
4635 ${CMAKE_CURRENT_SOURCE_DIR}
47- ${CMAKE_CURRENT_BINARY_DIR} /modules
4836 ${CMAKE_CURRENT_SOURCE_DIR} /impl
49- ${PATH_TO_LEGACY_GW}
50- ${PATH_TO_LEGACY_GW} /..
5137)
5238target_link_libraries (gw physics_share scream_share)
5339
Original file line number Diff line number Diff line change 1+ #include " gw_functions.hpp"
2+ #include " eamxx_gw_process_interface.hpp"
3+
4+ #include < ekat_assert.hpp>
5+ #include < ekat_units.hpp>
6+
7+ #include < array>
8+
9+ namespace scream
10+ {
11+
12+ // =========================================================================================
13+ GWMicrophysics::GWMicrophysics (const ekat::Comm& comm, const ekat::ParameterList& params)
14+ : AtmosphereProcess(comm, params)
15+ {
16+ // Nothing to do here
17+ }
18+
19+ // =========================================================================================
20+ void GWMicrophysics::set_grids (const std::shared_ptr<const GridsManager> grids_manager)
21+ {
22+ m_grid = grids_manager->get_grid (" physics" );
23+ }
24+
25+ // =========================================================================================
26+ } // namespace scream
Original file line number Diff line number Diff line change 1+ #ifndef SCREAM_GW_MICROPHYSICS_HPP
2+ #define SCREAM_GW_MICROPHYSICS_HPP
3+
4+ #include " share/atm_process/atmosphere_process.hpp"
5+ #include " physics/gw/gw_functions.hpp"
6+ #include " share/physics/eamxx_common_physics_functions.hpp"
7+
8+ #include < ekat_parameter_list.hpp>
9+
10+ #include < string>
11+
12+ namespace scream
13+ {
14+ /*
15+ * The class responsible to handle the gravity wave physics
16+ *
17+ * The AD should store exactly ONE instance of this class stored
18+ * in its list of subcomponents (the AD should make sure of this).
19+ *
20+ * This is currently just a placeholder
21+ */
22+
23+ class GWMicrophysics : public AtmosphereProcess
24+ {
25+ public:
26+ // Constructors
27+ GWMicrophysics (const ekat::Comm& comm, const ekat::ParameterList& params);
28+
29+ // The type of subcomponent
30+ AtmosphereProcessType type () const { return AtmosphereProcessType::Physics; }
31+
32+ // The name of the subcomponent
33+ std::string name () const { return " gw" ; }
34+
35+ // Set the grid
36+ void set_grids (const std::shared_ptr<const GridsManager> grids_manager);
37+
38+ protected:
39+ std::shared_ptr<const AbstractGrid> m_grid;
40+ }; // class GWMicrophysics
41+
42+ } // namespace scream
43+
44+ #endif // SCREAM_GW_MICROPHYSICS_HPP
Original file line number Diff line number Diff line change 1+ set (PATH_TO_LEGACY_GW ${SCREAM_BASE_DIR} /../eam/src/physics/cam/gw)
12set (INFRA_SRCS
23 gw_test_data.cpp
34 gw_iso_c.f90
5+ ${PATH_TO_LEGACY_GW} /gw_utils.F90
6+ ${PATH_TO_LEGACY_GW} /gw_common.F90
7+ ${PATH_TO_LEGACY_GW} /gw_convect.F90
8+ ${PATH_TO_LEGACY_GW} /gw_diffusion.F90
9+ ${PATH_TO_LEGACY_GW} /gw_front.F90
10+ ${PATH_TO_LEGACY_GW} /gw_oro.F90
11+ ${PATH_TO_LEGACY_GW} /../vdiff_lu_solver.F90
12+ )
13+
14+ set_target_properties (gw PROPERTIES
15+ Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} /modules
416)
517
618add_library (gw_test_infra ${INFRA_SRCS} )
719target_link_libraries (gw_test_infra PUBLIC gw scream_test_support)
8- target_include_directories (gw_test_infra PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} )
20+ target_include_directories (gw_test_infra PUBLIC
21+ ${CMAKE_CURRENT_SOURCE_DIR}
22+ ${CMAKE_CURRENT_BINARY_DIR} /modules
23+ ${PATH_TO_LEGACY_GW}
24+ ${PATH_TO_LEGACY_GW} /..
25+ )
You can’t perform that action at this time.
0 commit comments