Skip to content

create eamxx GW atm process#8319

Open
whannah1 wants to merge 61 commits into
masterfrom
whannah/eamxx/create-gwd-atm-proc-rebase
Open

create eamxx GW atm process#8319
whannah1 wants to merge 61 commits into
masterfrom
whannah/eamxx/create-gwd-atm-proc-rebase

Conversation

@whannah1
Copy link
Copy Markdown
Contributor

No description provided.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://E3SM-Project.github.io/E3SM/pr-preview/pr-8319/

Built to branch gh-pages at 2026-05-07 20:56 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor

@bartgol bartgol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Big PR! I did not really look at the impl folder, as I don't know enough there (I'll defer to Jim).

The infrastructure glue seems ok though. Just one doubt on a team reduction.

Comment thread components/eamxx/src/physics/gw/eamxx_gw_process_interface.cpp
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 8 comments.

Comment thread components/eamxx/src/physics/gw/gw_functions.hpp
Comment thread components/eamxx/src/physics/gw/gw_functions.hpp
Comment on lines +85 to +89
Kokkos::View<Real*, Kokkos::HostSpace> pref_int("pref_int", hyai.size());
Kokkos::parallel_for("calculate_pref_int",
Kokkos::RangePolicy<Kokkos::DefaultHostExecutionSpace>(0, hyai.size()),
KOKKOS_LAMBDA (const int k) {
pref_int(k) = PC::P0.value * hyai(k) + PC::P0.value * hybi(k);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bartgol @jgfouca Do I actually need to use HostSpace here?

Kokkos::View<Real*, Kokkos::HostSpace> pref_int("pref_int", hyai.size());

I just need a quick calculation for the "init" methods.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@whannah1 , no. The bot is right, you are mixing host and device usage here. I don't see any reason not to use the normal device for pref_int.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I (claude) refactored this to remove the host space variables - I ran a CPU test and everything worked. I haven't done a GPU test yet.

Comment thread components/eamxx/src/physics/gw/eamxx_gw_process_interface.cpp
Comment thread components/eamxx/src/physics/gw/eamxx_gw_process_interface.cpp Outdated
Comment thread components/eamxx/src/physics/gw/impl/gw_common_init_impl.hpp Outdated
Comment thread components/eamxx/src/share/util/eamxx_simple_linear_interp.hpp Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 8 comments.

Comment thread components/eamxx/src/physics/gw/eamxx_gw_process_interface.cpp
Comment on lines +130 to +134
const auto team_policy = TPF::get_default_team_policy(m_ncol, nlev_mid_packs);
const auto scan_policy = TPF::get_thread_range_parallel_scan_team_policy(m_ncol, nlev_mid_packs);
// Use one workspace with the biggest size or use two, one for pver, one for pver*2*pgwv?
WSM wsm( (m_nlev+1)*m_npgw, 9, team_policy);
//----------------------------------------------------------------------------
Comment thread components/eamxx/src/physics/gw/eamxx_gw_process_interface.cpp
Comment thread components/eamxx/src/physics/gw/impl/gw_convect_init_impl.hpp
Comment on lines +79 to +83
static bool s_common_init_constructed = false;
if (!s_common_init_constructed) {
new (&s_common_init) GwCommonInit();
s_common_init_constructed = true;
}
Comment thread components/eamxx/src/physics/gw/impl/gw_front_init_impl.hpp
Comment thread components/eamxx/src/physics/gw/impl/gw_front_init_impl.hpp
Comment thread components/eamxx/src/physics/gw/impl/gw_convect_init_impl.hpp
@whannah1 whannah1 marked this pull request as ready for review May 7, 2026 21:09
@rljacob
Copy link
Copy Markdown
Member

rljacob commented May 11, 2026

Is this actually ready for review? Needs a description added. Else change it to draft.

@rljacob
Copy link
Copy Markdown
Member

rljacob commented May 14, 2026

Shold this be draft?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants