Skip to content
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

New Velocity Potential and Stream Function Calculations #1072

Merged
merged 41 commits into from
Jan 10, 2025

Conversation

KarinaAsmar-NOAA
Copy link
Contributor

This PR adds the CPC-requested streamfunction and velocity potential at 200mb to SFS. It is meant to resolve [Issue #902 ] and update on the runtime issues from the previous PR #951 . Job scripts used for testing are in WCOSS2: /lfs/h2/emc/vpppg/noscrub/karina.asmar/vpot_strm/UPP (submit_run_gfsv16_wcoss2.sh and submit_run_sfs_wcoss2.sh).

@KarinaAsmar-NOAA
Copy link
Contributor Author

@WenMeng-NOAA We have updated the computation for streamfunction and velocity potential for compatibility with UPP parallelization. The subroutine now uses a poisson solver with a convergence tester to reduce runtimes. Comparison of spectral and numerical results is here

@GeorgeVandenberghe-NOAA
Copy link
Contributor

The poisson solver works but is substantially slower than the gather --> stptranf --> scatter operation to solve the equation spectrally. The gather is much cheaper than it sounds because it is TWO fields, (U and V) at one level, not the several hundred such fields that comprise state plus derivative variables. A gather of two fields takes about 0.06 seconds on hera at GFS (high) resolution and it hard to even measure at CFS resolution. The relaxations take about 10 seconds on hera for chi and psi together and less than a second for the spectral solver. Spectral solver takes 27 seconds for the GFS (high) resolution case while the poisson solver takes 161 seconds. Spectral solver takes less than a second for the CFS case while the poisson solver takes about three seconds.

@@ -81,6 +84,9 @@ SUBROUTINE COLLECT_LOC ( A, B )
deallocate(buff)
deallocate(rbufs)

tb=mpi_wtime()
Copy link
Collaborator

Choose a reason for hiding this comment

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

@KarinaAsmar-NOAA Clean up the debugging code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@GeorgeVandenberghe-NOAA Would you please clean up the debugging part of COLLECT_LOC.f? Let me know when done and I'll push it to this branch.

@WenMeng-NOAA
Copy link
Collaborator

Here are the runtime tests for the offline post:

GFS(C768) 120 tasks || develop: 142 seconds  ||  PR #1072: 188 seconds
GEFS (C384) 48 tasks || develop: 52 seconds   || PR #1072: 77 seconds
SFS (C96) 48 tasks  ||  develop: 3.86 seconds   || PR #1072: 5.4 seconds

@WenMeng-NOAA
Copy link
Collaborator

Here are the runtime test for the inline post with the UFS RT 'cpld_control_sfs' on Hera:

Without  velocity potential and stream function generation: 5 seconds
   run directory: /scratch1/NCEPDEV/stmp2/Wen.Meng/FV3_RT/rt_449231-develop/cpld_control_sfs_intel
With velocity potential and stream function generation: 9 seconds
   run directory: /scratch1/NCEPDEV/stmp2/Wen.Meng/FV3_RT/rt_2703606-sfs/cpld_control_sfs_intel

@DusanJovic-NOAA and @junwang-noaa Please let me know your comments on this PR.

parm/post_avblflds.xml Outdated Show resolved Hide resolved
parm/post_avblflds.xml Outdated Show resolved Hide resolved
@WenMeng-NOAA
Copy link
Collaborator

The UPP RTs have been completed on WCOSS2 with no baseline changes.

@WenMeng-NOAA
Copy link
Collaborator

@gspetro-NOAA You may start the UPP RTs on R&D machines. There should be no baseline changes with this PR.

Copy link
Collaborator

@gspetro-NOAA gspetro-NOAA left a comment

Choose a reason for hiding this comment

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

RTs pass on Orion, Hera, and Hercules with no baseline changes.

@WenMeng-NOAA
Copy link
Collaborator

This PR is ready for merging.

@WenMeng-NOAA WenMeng-NOAA merged commit 4b5da80 into NOAA-EMC:develop Jan 10, 2025
3 checks passed
@WenMeng-NOAA WenMeng-NOAA added the No Baseline Change No baseline of the UPP regression tests are made. label Jan 10, 2025
@KarinaAsmar-NOAA KarinaAsmar-NOAA deleted the spectral_strm_vpot branch January 10, 2025 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request No Baseline Change No baseline of the UPP regression tests are made. Ready for commit queue Ready for Review This PR is ready for code review. SFSV1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adapt the calculations of velocity potential and streamfunction in UPP
7 participants