Skip to content

Tempo version 3 - #353

Merged
grantfirl merged 40 commits into
ufs-community:ufs/devfrom
AndersJensen-NOAA:tempo_v3
Jul 17, 2026
Merged

Tempo version 3#353
grantfirl merged 40 commits into
ufs-community:ufs/devfrom
AndersJensen-NOAA:tempo_v3

Conversation

@AndersJensen-NOAA

@AndersJensen-NOAA AndersJensen-NOAA commented Feb 4, 2026

Copy link
Copy Markdown
Collaborator

Description of Changes:

Tempo version 3. See release notes and documentation in the TEMPO: repository https://github.com/NCAR/TEMPO

Tests Conducted:

Tempo Regression tests

Dependencies:

NOAA-EMC/ufsatm#1063
ufs-community/ufs-weather-model#3078

Documentation:

https://ncar.github.io/TEMPO/

Issue (optional):

Contributors (optional):

@AndersJensen-NOAA AndersJensen-NOAA linked an issue Feb 17, 2026 that may be closed by this pull request
@grantfirl

Copy link
Copy Markdown
Collaborator

@AndersJensen-NOAA Could you please fill out the pull request template so that this PR can be reviewed?

Comment thread .gitmodules
@AndersJensen-NOAA

Copy link
Copy Markdown
Collaborator Author

@grantfirl @dustinswales

I need help getting these two regression tests to pass:
fail_compile_atm_mpas_dyn32_gnu
fail_compile_atm_mpas_dyn32_debug_gnu

I modified GFS_rrtmpg_pre for the TEMPO hookup, and now the two mpas tests fail. It appears that those tests are radiation only physics tests specific to MPAS. Since we aren't using MPAS yet in the UFS and since these aren't actually full physics tests, I think those tests should actually be turned off.

If not, can one of you fix the TEMPO hookup on the CCPP side?

Or better yet, address #361

Thanks.

@grantfirl

Copy link
Copy Markdown
Collaborator

@grantfirl @dustinswales

I need help getting these two regression tests to pass: fail_compile_atm_mpas_dyn32_gnu fail_compile_atm_mpas_dyn32_debug_gnu

I modified GFS_rrtmpg_pre for the TEMPO hookup, and now the two mpas tests fail. It appears that those tests are radiation only physics tests specific to MPAS. Since we aren't using MPAS yet in the UFS and since these aren't actually full physics tests, I think those tests should actually be turned off.

If not, can one of you fix the TEMPO hookup on the CCPP side?

Or better yet, address #361

Thanks.

We use those tests to keep the MPAS-in-UFS functionality working, so they need to stay.

It looks like your RTs were run with the wrong (old) version of TEMPO checked out. I addressed the comment in #353 (comment). Please try to pull down the latest commit of this PR branch with the .gitmodules fix and run git submodule update --init --recursive from the ccpp/physics directory. Then, make sure that https://github.com/NCAR/TEMPO/tree/b1ee10c4e53f5cb9b68ac1c4e770cbe126d1e24e is actually checked out in the TEMPO submodule.

Once that's done, please run those 2 failing mpas-based tests again. I'm guessing that it'll fix them.

@AndersJensen-NOAA

Copy link
Copy Markdown
Collaborator Author

@grantfirl @dustinswales
I need help getting these two regression tests to pass: fail_compile_atm_mpas_dyn32_gnu fail_compile_atm_mpas_dyn32_debug_gnu
I modified GFS_rrtmpg_pre for the TEMPO hookup, and now the two mpas tests fail. It appears that those tests are radiation only physics tests specific to MPAS. Since we aren't using MPAS yet in the UFS and since these aren't actually full physics tests, I think those tests should actually be turned off.
If not, can one of you fix the TEMPO hookup on the CCPP side?
Or better yet, address #361
Thanks.

We use those tests to keep the MPAS-in-UFS functionality working, so they need to stay.

It looks like your RTs were run with the wrong (old) version of TEMPO checked out. I addressed the comment in #353 (comment). Please try to pull down the latest commit of this PR branch with the .gitmodules fix and run git submodule update --init --recursive from the ccpp/physics directory. Then, make sure that https://github.com/NCAR/TEMPO/tree/b1ee10c4e53f5cb9b68ac1c4e770cbe126d1e24e is actually checked out in the TEMPO submodule.

Once that's done, please run those 2 failing mpas-based tests again. I'm guessing that it'll fix them.

@grantfirl @dustinswales
I need help getting these two regression tests to pass: fail_compile_atm_mpas_dyn32_gnu fail_compile_atm_mpas_dyn32_debug_gnu
I modified GFS_rrtmpg_pre for the TEMPO hookup, and now the two mpas tests fail. It appears that those tests are radiation only physics tests specific to MPAS. Since we aren't using MPAS yet in the UFS and since these aren't actually full physics tests, I think those tests should actually be turned off.
If not, can one of you fix the TEMPO hookup on the CCPP side?
Or better yet, address #361
Thanks.

We use those tests to keep the MPAS-in-UFS functionality working, so they need to stay.

It looks like your RTs were run with the wrong (old) version of TEMPO checked out. I addressed the comment in #353 (comment). Please try to pull down the latest commit of this PR branch with the .gitmodules fix and run git submodule update --init --recursive from the ccpp/physics directory. Then, make sure that https://github.com/NCAR/TEMPO/tree/b1ee10c4e53f5cb9b68ac1c4e770cbe126d1e24e is actually checked out in the TEMPO submodule.

Once that's done, please run those 2 failing mpas-based tests again. I'm guessing that it'll fix them.

Still failed:
/scratch4/BMC/wrfruc/Anders.Jensen/RT_RUNDIRS/Anders.Jensen/FV3_RT/rt_3613567/compile_atm_mpas_dyn32_debug_gnu/

@AndersJensen-NOAA

Copy link
Copy Markdown
Collaborator Author

Any other ideas, @grantfirl

@grantfirl

grantfirl commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

@grantfirl

Copy link
Copy Markdown
Collaborator

@AndersJensen-NOAA The FV3 preprocessor flag isn't defined when running with MPAS. Can you remove this #ifdef? Or maybe add the one for MPAS? I'm not sure if it's just MPAS or what. @dustinswales Can you remember when running MPAS in UFS, FV3 isn't defined, but should Anders be putting in a check for #ifdef MPAS or something similar? @AndersJensen-NOAA Why is this guard needed in the first place?

@AndersJensen-NOAA

Copy link
Copy Markdown
Collaborator Author

@AndersJensen-NOAA The FV3 preprocessor flag isn't defined when running with MPAS. Can you remove this #ifdef? Or maybe add the one for MPAS? I'm not sure if it's just MPAS or what. @dustinswales Can you remember when running MPAS in UFS, FV3 isn't defined, but should Anders be putting in a check for #ifdef MPAS or something similar? @AndersJensen-NOAA Why is this guard needed in the first place?

God find, @grantfirl, thank you.
The flag is used to expose cloud, ice, and snow properties to the radiation code, so that the effective radii can be calculated. Otherwise, those procedures don't need to be public.

@AndersJensen-NOAA

Copy link
Copy Markdown
Collaborator Author

@grantfirl @dustinswales
I'm sure there is some sort of UFS_IN_MPAS flag that I can track down and add.

@AndersJensen-NOAA

Copy link
Copy Markdown
Collaborator Author

Actually, @grantfirl and @dustinswales, the check should go in the radiation code because when using the MPAS dycore, the effective radius values should be passed through from the microphysics. They only need to be calculated when using FV3.

@dustinswales

Copy link
Copy Markdown
Collaborator

FV3 is not defined when running MPAS in the UFS.
@AndersJensen-NOAA Do you need the FV3 macro? Is there any harm in these routines being public?

As for the radiation coupling...
How different are these new routines compared to what is done here?
That is, are these new routines analogous to make_IceNumber, make_DropletNumber, and make_RainNumber in Thompson MP?

make_DropletNumber_thompson => make_DropletNumber, &
make_RainNumber_thompson => make_RainNumber

#ifdef FV3

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@AndersJensen-NOAA Can you revert these changes?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@dustinswales it works, the mpas tests now pass, and it is probably better than unnecessarily exposing internal tempo procedures to mpas when they aren't needed.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Sure it works, but it's not great to add macros we don't need. There are physics variables you could use to make dycore specific selections in the physics (e.g. here). No need to macros.

But, can you please answer my questions above about changes to TEMPO compared to Thompson?
Previously, with Thompson, all of these routines were made public and referenced in GFS_rrtmg_pre.F90. Why are they now private with TEMPO? (Seems like an MPAS-A specific decision that is having ramifications in the UFS....)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The Thompson functions , like make_DropletNumber, serve a different purpose. They simply calculate number concentrations if mass mixing ratios exist but number concentrations are too low. They are basically a check on low values. These functions in Thompson have several hard-coded parameter values, and there is no guarantee (given the way the are currently coded) that they will remain physically consistent with Thompson code itself.

My functions are used internally by TEMPO main. They are general procedures for bound checking and updating mass and number concentrations. They are called before diagnostics are output by tempo (reflectivity, effective radius, etc), so they are needed in GFS_rrtmg_pre, but only when effective radii are being calculated, which should not be the case for MPAS.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The Thompson functions , like make_DropletNumber, serve a different purpose. They simply calculate number concentrations if mass mixing ratios exist but number concentrations are too low. They are basically a check on low values. These functions in Thompson have several hard-coded parameter values, and there is no guarantee (given the way the are currently coded) that they will remain physically consistent with Thompson code itself.

My functions are used internally by TEMPO main. They are general procedures for bound checking and updating mass and number concentrations. They are called before diagnostics are output by tempo (reflectivity, effective radius, etc), so they are needed in GFS_rrtmg_pre, but only when effective radii are being calculated, which should not be the case for MPAS.

My point is that "general" routines in Thompson were public and used by the host models, but this is not true with TEMPO.

Your decision to wall off routines potentially needed by different host models, with coupling different needs, is the issue.

Making these public would avoid the need for macros in two repositories (ccpp and tempo) and have zero consequences within MPAS-A

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

WRF and MPAS do things one way, and the UFS/CCPP do things differently. I think we can agree on that. Any so yes, WRF and MPAS specific decisions can have ramifications in the UFS. That is just the way things work. I don't see it as a problem, given that WRF has been around for longer than the UFS and CCPP.

The "general" routines in Thompson are actually in a separate fortran module called module_mp_thompson_make_number_concentrations.F90. They are not in the main Thompson code. So, I could create another module with public routines exposed to the radiation code in a similar way. I don't think I want to add code thought, so I"ll probably just get rid of the FV3 macros.

But, now I need to know how the radiation code will work with MPAS in the UFS? Will there be code added to pass effective radius values to GFS_rrtmg_pre and skip the calculations?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

But, now I need to know how the radiation code will work with MPAS in the UFS? Will there be code added to pass effective radius values to GFS_rrtmg_pre and skip the calculations?

@grantfirl is doing this piece, so you don't need to worry about doing it. You just need TEMPO to work with FV3.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@grantfirl

Copy link
Copy Markdown
Collaborator

@AndersJensen-NOAA Does this PR need to go back into draft mode? I had approved and had run the UFS RTs for what I thought was the last time before getting this in the UFS merge queue, and then more commits have appeared. Perhaps this is my fault for not commenting that I was doing so. Please let us know when this is ready to go in final form. Also, I noticed that the TEMPO submodule is now pointing to a different branch (main) where the TEMPO submodule commit hash (c237eae42e0dcc8f8b775f114df5c7017e68b84c) doesn't exist. This needs to be updated to the actual commit from the branch that you're pointing to in .gitmodules at this point.

In the future, there needs to be a PR in the TEMPO submodule that corresponds to the ccpp-physics PR so this process can be cleaner and we can have an actually static codebase to use for testing. Every time the codebase changes, we need to rerun UFS RTs, which is expensive, and the resources used for RTs are all too finite.

@AndersJensen-NOAA

Copy link
Copy Markdown
Collaborator Author

@grantfirl sorry for the miscommunication on this. This is now done, and the ccpp should point to the main branch here: https://github.com/NCAR/TEMPO, which is tagged version 3.1.0.

@gspetro-NOAA

Copy link
Copy Markdown

Testing completed successfully on ufs-community/ufs-weather-model#3078. This PR is ready to merge.

@grantfirl
grantfirl merged commit b5addad into ufs-community:ufs/dev Jul 17, 2026
3 checks passed
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.

Optional arguments

10 participants