Skip to content

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

Open
mdtoyNOAA wants to merge 2 commits into
ufs-community:noaa/developfrom
mdtoyNOAA:noaa/develop_tend_ps
Open

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

Conversation

@mdtoyNOAA

@mdtoyNOAA mdtoyNOAA commented Aug 6, 2026

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

Here is a sample of the min/max 'tend_sfc_pressure' output produced from a model run:

global min w: -2.98311 k=28, 43.6261 lat, -112.960 lon
global max w: 5.37123 k=25, 43.6465 lat, -112.975 lon
global min u: -11.2537 k=100, 43.6008 lat, -113.039 lon
global max u: 11.2544 k=100, 43.6003 lat, -113.040 lon
global max wsp: 11.3020 k=100, 43.6533 lat, -112.997 lon
global min tend_sfc_pressure: -0.140625 43.6096 lat, -112.961 lon
global max tend_sfc_pressure: 0.140625 43.5942 lat, -113.032 lon

Timing for integration step: 0.576008E-01 s

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 thread src/core_atmosphere/dynamics/mpas_atm_time_integration.F
@mdtoyNOAA
mdtoyNOAA marked this pull request as ready for review August 17, 2026 22:23
@dustinswales dustinswales moved this from DRAFT to Needs review in MPAS-A PRs to process Aug 19, 2026
@clark-evans clark-evans moved this from Needs review to Needs final review in MPAS-A PRs to process Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs final review

Development

Successfully merging this pull request may close these issues.

5 participants