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. |
grantfirl
left a comment
There was a problem hiding this comment.
@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.tblfile is mandatory, even for configurations that don't need it. #107errflg=0anderrmsg=''in two routines that were missing them.