Skip to content

Move nswbands, nlwbands to host namelist; initialize number concentration species in initialize_constituents#384

Merged
jimmielin merged 4 commits into
ESCOMP:mainfrom
jimmielin:hplin/move_rad_namelist_misc
Apr 25, 2026
Merged

Move nswbands, nlwbands to host namelist; initialize number concentration species in initialize_constituents#384
jimmielin merged 4 commits into
ESCOMP:mainfrom
jimmielin:hplin/move_rad_namelist_misc

Conversation

@jimmielin
Copy link
Copy Markdown
Member

@jimmielin jimmielin commented Apr 21, 2026

Tag name (The PR title should also include the tag name):
Originator(s): @jimmielin

Description (include issue title and the keyword ['closes', 'fixes', 'resolves'] and issue number):

List all namelist files that were added or changed:

M       schemes/rrtmgp/rrtmgp_pre_namelist.xml
  - moved nlwbands, nswbands to host-side (no effect on CAM)

List all files eliminated and why:

List all files added and what they do:

List all existing files that have been modified, and describe the changes:
(Helpful git command: git diff --name-status development...<your_branch_name>)

M       schemes/rrtmgp/rrtmgp_pre_namelist.xml
  - moved nlwbands, nswbands to host-side (no effect on CAM)
  
M       test/test_schemes/initialize_constituents.F90
  - add number concentration species standard names and logic
  - set qmin for chemistry species based on mozart initialization in CAM.

List all automated tests that failed, as well as an explanation for why they weren't fixed:

Is this an answer-changing PR? If so, is it a new physics package, algorithm change, tuning change, etc?

If yes to the above question, describe how this code was validated with the new/modified features:

Copy link
Copy Markdown
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

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

Thanks @jimmielin! I have a couple nit-picky requests, but nothing is critical.

Comment on lines +59 to +63
(/'mass_number_concentration_of_cloud_liquid_wrt_moist_air_and_condensed_water', &
'mass_number_concentration_of_rain_wrt_moist_air_and_condensed_water ', &
'mass_number_concentration_of_ice_wrt_moist_air_and_condensed_water ', &
'mass_number_concentration_of_snow_wrt_moist_air_and_condensed_water ', &
'mass_number_concentration_of_graupel_wrt_moist_air_and_condensed_water '/)
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.

Total nit-pick, but I think for modern (2003) Fortran square brackets are recommended for parameter arrays:

Suggested change
(/'mass_number_concentration_of_cloud_liquid_wrt_moist_air_and_condensed_water', &
'mass_number_concentration_of_rain_wrt_moist_air_and_condensed_water ', &
'mass_number_concentration_of_ice_wrt_moist_air_and_condensed_water ', &
'mass_number_concentration_of_snow_wrt_moist_air_and_condensed_water ', &
'mass_number_concentration_of_graupel_wrt_moist_air_and_condensed_water '/)
['mass_number_concentration_of_cloud_liquid_wrt_moist_air_and_condensed_water', &
'mass_number_concentration_of_rain_wrt_moist_air_and_condensed_water ', &
'mass_number_concentration_of_ice_wrt_moist_air_and_condensed_water ', &
'mass_number_concentration_of_snow_wrt_moist_air_and_condensed_water ', &
'mass_number_concentration_of_graupel_wrt_moist_air_and_condensed_water ']

The same request holds for the other declared parameter arrays above as well.

errmsg = errmsg)
else
! For chemistry species some special handling is necessary for qmin_value;
! this logic is replicated from chem_register in src/chemistry/mozart.
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.

I would make it clear that this is in reference to CAM:

Suggested change
! this logic is replicated from chem_register in src/chemistry/mozart.
! this logic is replicated from chem_register in src/chemistry/mozart in CAM.

@jimmielin jimmielin merged commit ced50be into ESCOMP:main Apr 25, 2026
4 checks passed
jimmielin added a commit to ESCOMP/CAM-SIMA that referenced this pull request Apr 25, 2026
…hys update) (#493)

Tag name (required for release branches):
Originator(s): @jimmielin 
AI tools used (if applicable; please also add the "AI-generated code"
label to the PR):
  What:
  How:

Description (include the issue title, and the keyword ['closes',
'fixes', 'resolves'] followed by the issue number):
- Moves nswbands, nlwbands from atmos_phys side rrtmgp_pre_namelist.xml
to host-side: companion PR
ESCOMP/atmospheric_physics#384

Describe any changes made to build system:

Describe any changes made to the namelist: add nswbands, nlwbands to
radiation_nl.

List any changes to the defaults for the input datasets (e.g. boundary
datasets):

List all files eliminated and why:

List all files added and what they do:

List all existing files that have been modified, and describe the
changes:
(Helpful git command: `git diff --name-status
development...<your_branch_name>`)
```
M       cime_config/namelist_definition_cam.xml
M       src/physics/utils/radiation_namelist.F90
M       src/physics/utils/radiation_namelist.meta
  - add nswbands, nlwbands (previously in rrtmgp_pre_namelist.xml in atmos_phys)
```

If there are new failures (compared to the
`test/existing-test-failures.txt` file),
have them OK'd by the gatekeeper, note them here, and add them to the
file.
If there are baseline differences, include the test and the reason for
the
diff. What is the nature of the change? Roundoff?

derecho/intel/aux_sima:
```
  SMS_Ln9.ne3pg3_ne3pg3_mg37.FKESSLER.derecho_intel.cam-outfrq_se_cslam_multitape (Overall: NLFAIL) details:
    FAIL SMS_Ln9.ne3pg3_ne3pg3_mg37.FKESSLER.derecho_intel.cam-outfrq_se_cslam_multitape NLCOMP
  - pre-existing failure

  SMS_D_Ln9.mpasa120_mpasa120.QPC4.derecho_intel.cam-outfrq_analy_ic_cam4 (Overall: NLFAIL) details:
  SMS_Ln9.mpasa120_mpasa120.QPC4.derecho_intel.cam-outfrq_analy_ic_cam4 (Overall: NLFAIL) details:
  SMS_Ln9.mpasa480_mpasa480.FKESSLER.derecho_intel.cam-outfrq_kessler_mpas_derecho (Overall: NLFAIL) details:
  SMS_Ln9.ne3pg3_ne3pg3_mg37.FADIAB.derecho_intel.cam-outfrq_se_cslam (Overall: NLFAIL) details:
  SMS_Ln9.ne3pg3_ne3pg3_mg37.FCAM7.derecho_intel.cam-outfrq_se_cslam_analy_ic (Overall: NLFAIL) details:
  SMS_Ln9.ne3pg3_ne3pg3_mg37.FHS94.derecho_intel.cam-outfrq_se_cslam (Overall: NLFAIL) details:
  SMS_Ln9.ne3pg3_ne3pg3_mg37.FKESSLER.derecho_intel.cam-outfrq_se_cslam (Overall: NLFAIL) details:
  SMS_Ln9.ne3pg3_ne3pg3_mg37.FKESSLER.derecho_intel.cam-outfrq_se_cslam_multitape (Overall: NLFAIL) details:
  SMS_Ln9.ne3pg3_ne3pg3_mg37.FTJ16.derecho_intel.cam-outfrq_se_cslam (Overall: NLFAIL) details:
  - expected NLFAIL: update to nswbands, nlwbands
  Differences in namelist 'radiation_nl':
  found extra variable: 'nlwbands'
  found extra variable: 'nswbands'
```

derecho/gnu/aux_sima:
```
  SMS_Ln9.ne3pg3_ne3pg3_mg37.FADIAB.derecho_gnu.cam-outfrq_se_cslam (Overall: FAIL) details:
    FAIL SMS_Ln9.ne3pg3_ne3pg3_mg37.FADIAB.derecho_gnu.cam-outfrq_se_cslam NLCOMP
    FAIL SMS_Ln9.ne3pg3_ne3pg3_mg37.FADIAB.derecho_gnu.cam-outfrq_se_cslam RUN time=15
  - pre-existing failure

  SMS_D_Ln9.mpasa120_mpasa120.QPC4.derecho_gnu.cam-outfrq_analy_ic_cam4 (Overall: NLFAIL) details:
  SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_dme_adjust_derecho (Overall: NLFAIL) details:
  SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_gw_cam4_derecho (Overall: NLFAIL) details:
  SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_gw_cam7_derecho (Overall: NLFAIL) details:
  SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_hack_shallow_derecho (Overall: NLFAIL) details:
  SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_hb_vdiff_derecho (Overall: NLFAIL) details:
  SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_held_suarez_derecho (Overall: NLFAIL) details:
  SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_kessler_derecho (Overall: NLFAIL) details:
  SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_rk_stratiform_derecho (Overall: NLFAIL) details:
  SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_rrtmgp_derecho (Overall: NLFAIL) details:
  SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_tj2016_after_coupler_derecho (Overall: NLFAIL) details:
  SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_tj2016_before_coupler_derecho (Overall: NLFAIL) details:
  SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_trcdata_bam_derecho (Overall: NLFAIL) details:
  SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_zm_derecho (Overall: NLFAIL) details:
  SMS_Ln9.mpasa120_mpasa120.QPC4.derecho_gnu.cam-outfrq_analy_ic_cam4 (Overall: NLFAIL) details:
  SMS_Ln9.mpasa480_mpasa480.FKESSLER.derecho_gnu.cam-outfrq_kessler_mpas_derecho (Overall: NLFAIL) details:
  SMS_Ln9.ne3pg3_ne3pg3_mg37.FADIAB.derecho_gnu.cam-outfrq_se_cslam (Overall: FAIL) details:
  SMS_Ln9.ne3pg3_ne3pg3_mg37.FCAM7.derecho_gnu.cam-outfrq_se_cslam_analy_ic (Overall: NLFAIL) details:
  SMS_Ln9.ne3pg3_ne3pg3_mg37.FHS94.derecho_gnu.cam-outfrq_se_cslam (Overall: NLFAIL) details:
  SMS_Ln9.ne3pg3_ne3pg3_mg37.FKESSLER.derecho_gnu.cam-outfrq_se_cslam (Overall: NLFAIL) details:
  SMS_Ln9.ne3pg3_ne3pg3_mg37.FTJ16.derecho_gnu.cam-outfrq_se_cslam (Overall: NLFAIL) details:
  - expected NLFAIL due to namelist update (nswbands, nlwbands added to host)
```

derecho/nvhpc/aux_sima (test is run via Github workflow. Only run the
test manually if we need to save new baselines):
```
  SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_nvhpc.cam-outfrq_rrtmgp_derecho_gpu (Overall: NLFAIL) details:
  - expected NLFAIL due to namelist update (nswbands, nlwbands added to host)
```

If this changes climate describe any run(s) done to evaluate the new
climate in enough detail that it(they) could be reproduced:

CAM-SIMA date used for the baseline comparison tests if different than
latest:
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.

qmin for chemistry/aerosol species read in from snapshot are incorrectly initialized in initialize_constituents

3 participants