Skip to content

Feature/modify physics - #561

Merged
ywkawai merged 6 commits into
developfrom
feature/modify_physics
Aug 5, 2026
Merged

Feature/modify physics#561
ywkawai merged 6 commits into
developfrom
feature/modify_physics

Conversation

@ywkawai

@ywkawai ywkawai commented Aug 5, 2026

Copy link
Copy Markdown
Owner

close #562

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The updated ocean surface-flux path and the new MP/CP diagnostic accumulation contain confirmed correctness/robustness issues (array shape mismatch and unguarded OpenACC present usage) that can cause build failures or invalid results.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

This PR updates the atmosphere–ocean surface-flux and physics coupling paths, and significantly revises the cumulus moist convective adjustment (MCA) implementation to better handle “no energy root” cases under available-water constraints (Issue #562).

Changes:

  • Add ocean water-vapor surface flux (QV) to ocean variables and coupler exchange, and thread it through surface-flux calculations.
  • Extend atmospheric diagnostics/surface handling to include precipitation flux contributions from both microphysics (MP) and cumulus parameterization (CP).
  • Refactor MCA (moist convective adjustment) root-solving to incorporate water-feasibility constraints and more robust fallback/expansion logic.
File summaries
File Description
model/atm_nonhydro3d/src/ocean/mod_ocean_vars.F90 Adds QV surface-flux ID and increments ocean surface-flux count.
model/atm_nonhydro3d/src/ocean/mod_ocean_mesh_gm.F90 Disables vertical-coordinate setup in global ocean mesh init (matching RM).
model/atm_nonhydro3d/src/ocean/mod_ocean_component.F90 Threads QV surface flux, adds vector conversions for cubed-sphere, revises surface heat-flux calculation.
model/atm_nonhydro3d/src/coupler/mod_cpl_vars.F90 Adds QV to coupler OCN var set and exchange routines; fixes some typing/indexing.
model/atm_nonhydro3d/src/atmos/mod_atmos_vars.F90 Adds CP auxiliary-manager pointer and combines MP+CP precip diagnostic outputs.
model/atm_nonhydro3d/src/atmos/mod_atmos_phy_sfc.F90 Fixes vector conversion slicing and updates surface-flux argument extents to NeA.
model/atm_nonhydro3d/src/atmos/mod_atmos_phy_cp_vars.F90 Exposes CP surface-flux getters for precipitation/energy diagnostics.
model/atm_nonhydro3d/src/atmos/mod_atmos_phy_bl.F90 Renames tracer-list variable usage in BL tendency routine.
model/atm_nonhydro3d/src/atmos/mod_atmos_phy_bl_vars.F90 Adjusts BL tracer tendency variable naming.
model/atm_nonhydro3d/src/atmos/mod_atmos_component.F90 Registers CP manager and sums MP+CP surface precipitation fluxes; adds QV to surface exchange.
FElib/src/radiation/scale_atm_phy_rd_dgm_simple.F90 Initializes dtau_sw_kadd before loop to avoid stale values.
FElib/src/cumulus/scale_atm_phy_cp_dgm_mconv_adjustment.F90 Major MCA redesign: water-feasible bracketing and improved handling of missing energy roots.
FElib/src/bl_turbulence/scale_atm_phy_bl_dgm_mynn_lv2.F90 Fixes missing OpenMP private variable list entry.
FElib/src/bl_turbulence/scale_atm_phy_bl_dgm_common.F90 Renames/clarifies tracer list handling and density conversions in BL common solver.
Review details

Suppressed comments (1)

model/atm_nonhydro3d/src/atmos/mod_atmos_vars.F90:1047

  • Same issue as RAIN: the OpenACC present(SFLX_snow_MP%val, var_out) clause is unconditional, but SFLX_snow_MP is only associated when sw_MP is true. This can dereference an unassociated pointer or fail the OpenACC present check when MP is not active.
      !$omp parallel 
      !$acc parallel present(SFLX_snow_MP%val, var_out) async(1)
      !$omp do
  • Files reviewed: 14/14 changed files
  • Comments generated: 4
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment thread model/atm_nonhydro3d/src/ocean/mod_ocean_component.F90 Outdated
Comment thread model/atm_nonhydro3d/src/ocean/mod_ocean_component.F90
Comment thread model/atm_nonhydro3d/src/atmos/mod_atmos_vars.F90
Comment thread model/atm_nonhydro3d/src/atmos/mod_atmos_vars.F90
@ywkawai
ywkawai merged commit cfdd888 into develop Aug 5, 2026
1 check passed
@ywkawai
ywkawai deleted the feature/modify_physics branch August 7, 2026 02:44
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.

Improve the treatments of no energy root issues in the MCA scheme with available-water constraints.

2 participants