Skip to content

Remove references to physcons module from SCM#653

Open
scrasmussen wants to merge 1 commit intoNCAR:mainfrom
scrasmussen:rm-physcons-from-scm
Open

Remove references to physcons module from SCM#653
scrasmussen wants to merge 1 commit intoNCAR:mainfrom
scrasmussen:rm-physcons-from-scm

Conversation

@scrasmussen
Copy link
Member

SOURCE: Soren Rasmussen, NSF NCAR

DESCRIPTION OF CHANGES:

  • Removed physcon references in SCM
  • Added all the constants required to build the CCPP Physics if it had no physcons module. The PRs of the changes to the physics will be combined together by common directories and submitted in the future

ISSUE: #652

TESTS CONDUCTED: Compared CI output of unoptimized version of upstream with this PR. All results were identical

| ---------------------------------------------------------------- | ---------- |
| case                                                             | equality   |
| ---------------------------------------------------------------- | ---------- |
| output_COMBLE_SCM_GFS_v16                                        | equal      |
| output_COMBLE_SCM_GFS_v16_RRTMGP                                 | equal      |
| output_COMBLE_SCM_GFS_v17_p8_ugwpv1                              | equal      |
| output_COMBLE_SCM_HRRR_gf                                        | equal      |
| output_COMBLE_SCM_WoFS_v0                                        | equal      |
| output_LASSO_2016051812_SCM_GFS_v15p2                            | equal      |
| output_LASSO_2016051812_SCM_GFS_v16                              | equal      |
| output_LASSO_2016051812_SCM_GFS_v16_RRTMGP                       | equal      |
| output_LASSO_2016051812_SCM_GFS_v17_p8                           | equal      |
| output_LASSO_2016051812_SCM_GFS_v17_p8_ugwpv1                    | equal      |
| output_LASSO_2016051812_SCM_HRRR                                 | equal      |
| output_LASSO_2016051812_SCM_HRRR_gf                              | equal      |
| output_LASSO_2016051812_SCM_RAP                                  | equal      |
| output_LASSO_2016051812_SCM_RRFS_v1beta                          | equal      |
| output_LASSO_2016051812_SCM_WoFS_v0                              | equal      |
| output_MOSAiC-AMPS_SCM_GFS_v16                                   | equal      |
| output_MOSAiC-AMPS_SCM_GFS_v16_RRTMGP                            | equal      |
| output_MOSAiC-AMPS_SCM_GFS_v17_p8_ugwpv1                         | equal      |
| output_MOSAiC-AMPS_SCM_HRRR_gf                                   | equal      |
| output_MOSAiC-AMPS_SCM_WoFS_v0                                   | equal      |
| output_arm_sgp_summer_1997_A_SCM_GFS_v15p2                       | equal      |
| output_arm_sgp_summer_1997_A_SCM_GFS_v16                         | equal      |
| output_arm_sgp_summer_1997_A_SCM_GFS_v16_RRTMGP                  | equal      |
| output_arm_sgp_summer_1997_A_SCM_GFS_v16_gfdlmpv3                | equal      |
| output_arm_sgp_summer_1997_A_SCM_GFS_v17_p8                      | equal      |
| output_arm_sgp_summer_1997_A_SCM_GFS_v17_p8_ugwpv1               | equal      |
| output_arm_sgp_summer_1997_A_SCM_GFS_v17_p8_ugwpv1_tempo         | equal      |
| output_arm_sgp_summer_1997_A_SCM_HRRR                            | equal      |
| output_arm_sgp_summer_1997_A_SCM_HRRR_gf                         | equal      |
| output_arm_sgp_summer_1997_A_SCM_RAP                             | equal      |
| output_arm_sgp_summer_1997_A_SCM_RRFS_v1beta                     | equal      |
| output_arm_sgp_summer_1997_A_SCM_WoFS_v0                         | equal      |
| output_astex_SCM_GFS_v15p2                                       | equal      |
| output_astex_SCM_GFS_v16                                         | equal      |
| output_astex_SCM_GFS_v16_RRTMGP                                  | equal      |
| output_astex_SCM_GFS_v17_p8                                      | equal      |
| output_astex_SCM_GFS_v17_p8_ugwpv1                               | equal      |
| output_astex_SCM_HRRR                                            | equal      |
| output_astex_SCM_HRRR_gf                                         | equal      |
| output_astex_SCM_RAP                                             | equal      |
| output_astex_SCM_RRFS_v1beta                                     | equal      |
| output_astex_SCM_WoFS_v0                                         | equal      |
| output_atomic_Jan16T22Jan18T06_SCM_GFS_v16_no_nsst               | equal      |
| output_atomic_Jan16T22Jan18T06_SCM_GFS_v17_p8_ugwpv1_no_nsst     | equal      |
| output_atomic_Jan16T22Jan18T06_SCM_RRFS_v1beta_no_nsst           | equal      |
| output_bomex_SCM_GFS_v15p2                                       | equal      |
| output_bomex_SCM_GFS_v16                                         | equal      |
| output_bomex_SCM_GFS_v16_RRTMGP                                  | equal      |
| output_bomex_SCM_GFS_v16_debug                                   | equal      |
| output_bomex_SCM_GFS_v17_p8                                      | equal      |
| output_bomex_SCM_GFS_v17_p8_ugwpv1                               | equal      |
| output_bomex_SCM_HRRR                                            | equal      |
| output_bomex_SCM_HRRR_gf                                         | equal      |
| output_bomex_SCM_RAP                                             | equal      |
| output_bomex_SCM_RRFS_v1beta                                     | equal      |
| output_bomex_SCM_WoFS_v0                                         | equal      |
| output_gabls3_SCM_GFS_v16                                        | equal      |
| output_twpice_SCM_GFS_v15p2                                      | equal      |
| output_twpice_SCM_GFS_v15p2_ntiedtke                             | equal      |
| output_twpice_SCM_GFS_v16                                        | equal      |
| output_twpice_SCM_GFS_v16_RRTMGP                                 | equal      |
| output_twpice_SCM_GFS_v17_p8                                     | equal      |
| output_twpice_SCM_GFS_v17_p8_ugwpv1                              | equal      |
| output_twpice_SCM_HRRR                                           | equal      |
| output_twpice_SCM_HRRR_gf                                        | equal      |
| output_twpice_SCM_RAP                                            | equal      |
| output_twpice_SCM_RRFS_v1beta                                    | equal      |
| output_twpice_SCM_WoFS_v0                                        | equal      |
| ---------------------------------------------------------------- | ---------- |
[68 / 68] PASSING

@scrasmussen scrasmussen force-pushed the rm-physcons-from-scm branch 2 times, most recently from 68ef7be to c2e06ac Compare January 27, 2026 22:14
Copy link
Collaborator

@hertneky hertneky left a comment

Choose a reason for hiding this comment

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

Code changes look good to me. Only 1 minor comment to take or leave.

real(kind=dp),parameter:: con_avgd =6.0221415e23_dp
real(kind=dp),parameter:: con_amd =28.9644_dp !< molecular wght of dry air (\f$g/mol\f$)
real(kind=dp),parameter:: con_amw =18.0154_dp
real(kind=dp),parameter:: con_amo3 =47.9982_dp
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we add the description for this one that's being added?
!< molecular wght of o3 (\f$g/mol\f$)

Copy link
Member Author

@scrasmussen scrasmussen Jan 28, 2026

Choose a reason for hiding this comment

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

I'll add that, thanks!

@grantfirl
Copy link
Collaborator

Were all new additions to scm_physical_constants.F90/meta from UFS? (e.g. did you have to come up with any new metadata?)

Copy link
Member

@dustinswales dustinswales left a comment

Choose a reason for hiding this comment

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

Need to remove the intent attribute from the host-model metadata.
Other than that this looks fine.
Thanks for making these changes!

dimensions = ()
type = real
kind = kind_phys
intent = in
Copy link
Member

Choose a reason for hiding this comment

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

The intent attribute is not needed for host-model metadata.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed, thanks for the feedback!

@scrasmussen
Copy link
Member Author

Were all new additions to scm_physical_constants.F90/meta from UFS? (e.g. did you have to come up with any new metadata?)

The metadata changes here are all ones that I came up with (based on the comments in the physics and physcon files). I was able to find existing definitions for a lot of physcon variables but not for these references. I may have missed something but I did check the UFSATM/ccpp/data/*.meta files and the existing metadata files in the SCM.

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.

4 participants