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

fix: adjustments for FV3_HRRR_gf in SRW for global physics suite #2

Open
wants to merge 7 commits into
base: bugfix/allow_hrrr_gf_suite
Choose a base branch
from

Conversation

benkozi
Copy link

@benkozi benkozi commented Feb 28, 2025

No description provided.

@benkozi
Copy link
Author

benkozi commented Feb 28, 2025

@mkavulich - We can reduce the number of changes here if you merge https://github.com/ufs-community/ufs-srweather-app/tree/develop into this bug fix branch. I'll be looking into automatically setting LEVP based on the requested physics suite.

@benkozi benkozi marked this pull request as draft February 28, 2025 15:27
@mkavulich
Copy link
Owner

@benkozi done, let me know if you need anything else

@benkozi benkozi marked this pull request as ready for review February 28, 2025 20:18
@benkozi
Copy link
Author

benkozi commented Feb 28, 2025

@mkavulich - This is ready for a review/merge when you have time.

Comment on lines +1775 to +1781
# Verify correct LEVP specified for FV3_HRRR_gf
if expt_config["workflow"].get("CCPP_PHYS_SUITE") == "FV3_HRRR_gf":
task_names = ("task_make_ics", "task_make_lbcs")
not_correct_levp = [task_name for task_name in task_names if expt_config[task_name].get("LEVP") != 66]
vcoord_file = "{{ workflow.FIXam }}/global_hyblev_fcst_rrfsL65.txt"
if len(not_correct_levp) > 0:
raise ValueError(f"Set 'LEVP: 66' and 'VCOORD_FILE: \"{vcoord_file}\"' in task(s) '{not_correct_levp}' when using 'CCPP_PHYS_SUITE: FV3_HRRR_gf'")
Copy link
Owner

Choose a reason for hiding this comment

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

The CCPP suite shouldn't depend on the number of vertical levels, any suite can be used with any number of vertical levels assuming the correct vertical coordinate file is used (see users guide: https://ufs-srweather-app.readthedocs.io/en/latest/UsersGuide/CustomizingTheWorkflow/LAMGrids.html#verticallevels). I'm not sure the exact reasons why a different number of vertical levels is needed, but I'm guessing it's something specific to the smoke/dust configuration. So maybe these changes are what you want?

Suggested change
# Verify correct LEVP specified for FV3_HRRR_gf
if expt_config["workflow"].get("CCPP_PHYS_SUITE") == "FV3_HRRR_gf":
task_names = ("task_make_ics", "task_make_lbcs")
not_correct_levp = [task_name for task_name in task_names if expt_config[task_name].get("LEVP") != 66]
vcoord_file = "{{ workflow.FIXam }}/global_hyblev_fcst_rrfsL65.txt"
if len(not_correct_levp) > 0:
raise ValueError(f"Set 'LEVP: 66' and 'VCOORD_FILE: \"{vcoord_file}\"' in task(s) '{not_correct_levp}' when using 'CCPP_PHYS_SUITE: FV3_HRRR_gf'")
# Verify correct LEVP specified for FV3_HRRR_gf
if expt_config['smoke_dust_parm'].get('DO_SMOKE_DUST'):
task_names = ("task_make_ics", "task_make_lbcs")
not_correct_levp = [task_name for task_name in task_names if expt_config[task_name].get("LEVP") != 66]
vcoord_file = "{{ workflow.FIXam }}/global_hyblev_fcst_rrfsL65.txt"
if len(not_correct_levp) > 0:
raise ValueError(f"Set 'LEVP: 66' and 'VCOORD_FILE: \"{vcoord_file}\"' in task(s) '{not_correct_levp}' when using 'DO_SMOKE_DUST: True'")

This hard-coding is still imperfect though because I don't think a specific configuration should require a specific number of vertical levels.

Copy link
Author

Choose a reason for hiding this comment

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

I'll reach out to SD folks about this. What's interesting is that this is required when rrfs_sd = .false.. So it could be some other parameter in the namelist is triggering (which you've mentioned).

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.

2 participants