-
Notifications
You must be signed in to change notification settings - Fork 358
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
Use adjust_ps=false in Cxx theta-l_kokkos code #6063
Changes from 5 commits
057c4f3
046a080
2913989
f61f055
0e3acbb
a659a3f
9cafd9e
c768be3
39c2d73
eba2ee0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,8 +99,7 @@ class ForcingFunctor | |
m_hydrostatic = p.theta_hydrostatic_mode; | ||
m_qsize = p.qsize; | ||
|
||
// TODO: this may change, depending on the simulation params | ||
m_adjust_ps = true; | ||
m_adjust_ps = (p.dt_remap_factor == 0); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. by some reason i thought scream is already using adjust_dp3d, but looking at the code it does not. When this goes to scream, it will cause nonbfb. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, every test with homme against baselines should fail. I'm going to create a PR when this is merged and look at the diffs. |
||
|
||
m_eos.init(m_hydrostatic,m_hvcoord); | ||
m_elem_ops.init(m_hvcoord); | ||
|
@@ -370,7 +369,7 @@ class ForcingFunctor | |
}); | ||
if (!m_adjust_ps) { | ||
Kokkos::parallel_for(Kokkos::ThreadVectorRange(kv.team,NUM_LEV), | ||
[&](const int ilev) { | ||
[&](const int ilev) { | ||
dp_adj(ilev) = dp(ilev) + dp(ilev)*(fq(ilev)-q(ilev)); | ||
}); | ||
} | ||
|
@@ -386,7 +385,7 @@ class ForcingFunctor | |
}); | ||
if (!m_adjust_ps) { | ||
Kokkos::parallel_for(Kokkos::ThreadVectorRange(kv.team,NUM_LEV), | ||
[&](const int& ilev) { | ||
[&](const int& ilev) { | ||
dp_adj(ilev) = dp(ilev) + compute_fqdt_pack(ilev,fq,qdp); | ||
}); | ||
} | ||
|
@@ -472,14 +471,14 @@ class ForcingFunctor | |
} else { | ||
// Compute hydrostatic p from dp. Store in exner, then add to pnh | ||
auto p_i = Homme::subview(m_pi_i,kv.team_idx,igp,jgp); | ||
m_elem_ops.compute_hydrostatic_p(kv,dp,p_i,exner); | ||
m_elem_ops.compute_hydrostatic_p(kv,dp_adj,p_i,exner); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here is the change to make F90 BFB. We were not using the correct dp calculation which matches F90. |
||
Kokkos::parallel_for(Kokkos::ThreadVectorRange(kv.team,NUM_LEV), | ||
[&](const int ilev) { | ||
[&](const int ilev) { | ||
pnh(ilev) += exner(ilev); | ||
dp(ilev) = dp_adj(ilev); | ||
}); | ||
} | ||
|
||
Kokkos::parallel_for(Kokkos::ThreadVectorRange(kv.team,NUM_LEV), | ||
[&](const int ilev) { | ||
using namespace PhysicalConstants; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,10 +67,10 @@ struct LimiterFunctor { | |
, m_hvcoord(hvcoord) | ||
, m_state(elements.m_state) | ||
, m_geometry(elements.m_geometry) | ||
, m_policy_dp3d_lim (Homme::get_default_team_policy<ExecSpace,TagDp3dLimiter>(m_num_elems)) | ||
, m_tu(m_policy_dp3d_lim) | ||
, m_dp3d_thresh(params.dp3d_thresh) | ||
, m_vtheta_thresh(params.vtheta_thresh) | ||
, m_policy_dp3d_lim (Homme::get_default_team_policy<ExecSpace,TagDp3dLimiter>(m_num_elems)) | ||
, m_tu(m_policy_dp3d_lim) | ||
Comment on lines
-70
to
+73
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is unrelated, but gives us a warning in EAMxx that I would like to remove. Let me know if I need to revert for the PR. |
||
{ | ||
m_np1 = -1; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this last change is the problem for cdahs -- DYAMOND and DPSCREAM tests ( SMS_Ln5.ne30pg2_ne30pg2.F2010-SCREAM-LR-DYAMOND2.chrysalis_intel and SMS_Ln9_P24x1.ne4_ne4.FDPSCREAM-ARM97.chrysalis_intel ) both have -DCAM and -DSCREAM in ./cmake-bld/cmake/atm/CMakeFiles/atm.dir/flags.make defined. We code like only one is active. Previously v0 scream was using adjust_dp3d, but now it is switched to adjust_ps .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to only forcing
adjust_ps=.true.
is CAM is defined and SCREAM is not defined.