Skip to content

Added max/min, detailed lat/lon print out for surface pressure tendency - #271

Draft
mdtoyNOAA wants to merge 1 commit into
ufs-community:noaa/developfrom
mdtoyNOAA:noaa/develop_tend_ps
Draft

Added max/min, detailed lat/lon print out for surface pressure tendency#271
mdtoyNOAA wants to merge 1 commit into
ufs-community:noaa/developfrom
mdtoyNOAA:noaa/develop_tend_ps

Conversation

@mdtoyNOAA

Copy link
Copy Markdown
Collaborator

Added capability to print out min/max values of the surface pressure tendency along with the lat/lon positions where these occur. This adds to the existing feature for printing min/max values for 'u', 'w' and 'wspd'.

This capability is activated with 2 new namelist logicals:

  1. config_print_global_minmax_tend_ps -- same as config_print_global_minmax_vel, except for surface-pressure tendency
  2. config_print_detailed_minmax_tend_ps -- same as config_print_detailed_minmax_vel, except for surface-pressure tendency

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.

Pull request overview

This PR extends the existing timestep summary printouts in the core atmosphere to also report global min/max values for surface-pressure tendency (tend_sfc_pressure), optionally including the lat/lon locations of those extrema, controlled via two new namelist options.

Changes:

  • Added two new namelist logicals to enable global and detailed (with location) min/max printouts for surface-pressure tendency.
  • Updated summarize_timestep to retrieve tend_sfc_pressure from the tend pool and print min/max (and lat/lon when requested).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/core_atmosphere/Registry.xml Adds two new namelist options to control surface-pressure tendency min/max reporting.
src/core_atmosphere/dynamics/mpas_atm_time_integration.F Implements global and detailed min/max logging for tend_sfc_pressure in summarize_timestep.
Suppressed comments (4)

src/core_atmosphere/dynamics/mpas_atm_time_integration.F:9156

  • OpenACC collapse(2) is applied to a single do iCell loop (no nested loops) when reducing offset_1d. This can fail to compile; remove the collapse(2) clause.
         !$acc parallel default(present)
         !$acc loop collapse(2) gang vector reduction(min:offset_1d)
         do iCell = 1, nCellsSolve

src/core_atmosphere/dynamics/mpas_atm_time_integration.F:9194

  • OpenACC collapse(2) is applied to a single do iCell loop for the max reduction. This should be a 1-D loop, so dropping collapse(2) avoids compilation errors.
         !$acc parallel default(present)
         !$acc loop collapse(2) gang vector reduction(max:scalar_max)
         do iCell = 1, nCellsSolve

src/core_atmosphere/dynamics/mpas_atm_time_integration.F:9201

  • OpenACC collapse(2) is used on a non-nested loop in the offset_1d reduction for the max-location search. Remove collapse(2) to keep the directive valid for a single loop.
         !$acc parallel default(present)
         !$acc loop collapse(2) gang vector reduction(min:offset_1d)
         do iCell = 1, nCellsSolve

src/core_atmosphere/dynamics/mpas_atm_time_integration.F:9240

  • collapse(2) is specified on an OpenACC loop that has only a single do iCell loop. This can break OpenACC builds; remove the collapse(2) clause.
         !$acc parallel default(present)
         !$acc loop gang vector collapse(2) reduction(min:scalar_min) reduction(max:scalar_max)
         do iCell = 1, nCellsSolve

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +9145 to +9147
!$acc parallel default(present)
!$acc loop collapse(2) gang vector reduction(min:scalar_min)
do iCell = 1, nCellsSolve
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: DRAFT

Development

Successfully merging this pull request may close these issues.

3 participants