-
Notifications
You must be signed in to change notification settings - Fork 34
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
Fixes to allow FV3_HRRR_c3 to run with gnu debug plus PR #113, #106, and #103 #102
Fixes to allow FV3_HRRR_c3 to run with gnu debug plus PR #113, #106, and #103 #102
Conversation
Changes look good, but it is a bit surprising the the cu_gf_deep.F90 doesn't run into the same problem? |
Correct. I didn't change other schemes because I wanted to simplify the changes as much as possible. My ufs-weather-model changes add hrrr_c3_debug and hrrr_gf_debug tests for both compilers. If we encounter problems again, we'll know. |
In a recent email about this PR, I got the usual question about WRF compatibility, so I'm pasting my answer here. WRF needs a starting index for each dimension. By that, I mean the In short, your dimensions must look like this
That way, both WRF and CCPP work. |
@SamuelTrahanNOAA Your are spot on. |
@dustinswales does it actually break WRF? We just like to keep the absolute index for debugging purposes. |
@dudhia |
Loops inside the WRF physics use its as a starting index. If the arrays start at 1 and you access index its, it may be far beyond the allocated array. The its:ite may be 2560:2610. Lose the its and the array bounds will be 1:51. Accessing index its=2560 puts you past the array bounds. Also, WRF arrays are declared with memory bounds, not tile bounds:
So long WRF passes arrays to the low-level physics routines like this, it'll work:
|
@SamuelTrahanNOAA I see. Yes, we can't do that in WRF as we also pass in its. CCPP must be treating those as 1. |
…to c3-pointer-fix
I've merged #106 into this PR since the UFS code managers plan to merge the two simultaneously. |
Can we get at least one re-approval since there have been code changes since the latest approval. Just need someone to be OK with those newer changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BrianCurtis-NOAA This still looks good to me after the combination of PRs.
@haiqinli - Please confirm I merged your changes correctly. |
@SamuelTrahanNOAA Thank you very much! Your merging looks good to me. |
@grantfirl @dustinswales All tests are done at ufs-community/ufs-weather-model#1893. Can you merge this pr? |
The c3 code cannot handle null pointers correctly. This changes some array argument declarations so tests pass. At the ufs-weather-model level, I've added hrrr_c3_debug tests for both the gnu and intel compilers. The new tests pass on Jet, Hera, and Cheyenne.
This PR includes #113 and #106
noahmptable.tbl
file is mandatory, even for configurations that don't need it. #107errflg=0
anderrmsg=''
in two routines that were missing them.