Hi,
I am encountering a persistent issue when using the KF-family cumulus schemes together with the P3 microphysics scheme. I have spent quite some time debugging this problem and would appreciate any suggestions or insights.
Below is a summary of what I have found.
------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------
Fails
Works
Therefore, the problem only appears when the new KF-family schemes are combined with P3.
I tried several approaches that are commonly suggested for this error:
Since I need to run KF + P3, I started tracing where the NaNs first appear.
Inside the KF scheme, I found that:
I then traced the NaNs further upstream.
1. In module_advect_em.F, the advection flux variables (`fqx`, `fqxl`, `fqy`, `fqyl`, `fqz`, `fqzl`) become NaN.
2. As a result, `advect_tend` becomes NaN in `module_advect_em.F`.
3. The `moist` array then becomes NaN in `module_big_step_utilities_em.F` / `solve_em.F`.
4. `QV` becomes NaN.
5. `T` becomes NaN.
6. `RHOE` becomes NaN.
7. `DPTHMX` becomes NaN inside the KF scheme.
8. The model finally stops with the "WOULD GO OFF TOP" error.
So the KF error appears to be a consequence of NaNs that are generated much earlier during moisture advection....?
At this point, I am not sure what could cause the moisture advection variables (fqx, fqy, fqz, etc.) to become NaN only when using the new KF-family schemes together with P3, while:
Do you have any suggestions about where else I should look, or whether there are any known compatibility issues between the newer KF implementations and P3?
------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------
I can also provide the restart files (wrfrst*), wrfbdy if that would help reproduce the problem.
Any advice would be greatly appreciated.
Thank you!
I am encountering a persistent issue when using the KF-family cumulus schemes together with the P3 microphysics scheme. I have spent quite some time debugging this problem and would appreciate any suggestions or insights.
Below is a summary of what I have found.
------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------
Cases that fail / do not fail
Fails
- WRF v4.4.2
- WRF v4.8
- KF (cu_physics = 1) + P3
- KF Eta (cu_physics = 10) + P3
- MSKF (cu_physics = 11) + P3
Works
- Old KF implementation (cu_physics = 99) + P3
- Any other cumulus scheme with P3
- KF-family schemes with other microphysics schemes
Therefore, the problem only appears when the new KF-family schemes are combined with P3.
Things I have already tried
I tried several approaches that are commonly suggested for this error:
- decreasing the time step
- increasing the model top
- increasing dzbot
- testing different radiation and physics options
Debugging results
Since I need to run KF + P3, I started tracing where the NaNs first appear.
Inside the KF scheme, I found that:
- DPTHMX becomes NaN
- DPTHMX is computed using RHOE
- RHOE becomes NaN because both temperature (T) and water vapor (QV) are already NaN.
I then traced the NaNs further upstream.
1. In module_advect_em.F, the advection flux variables (`fqx`, `fqxl`, `fqy`, `fqyl`, `fqz`, `fqzl`) become NaN.
2. As a result, `advect_tend` becomes NaN in `module_advect_em.F`.
3. The `moist` array then becomes NaN in `module_big_step_utilities_em.F` / `solve_em.F`.
4. `QV` becomes NaN.
5. `T` becomes NaN.
6. `RHOE` becomes NaN.
7. `DPTHMX` becomes NaN inside the KF scheme.
8. The model finally stops with the "WOULD GO OFF TOP" error.
So the KF error appears to be a consequence of NaNs that are generated much earlier during moisture advection....?
My question
At this point, I am not sure what could cause the moisture advection variables (fqx, fqy, fqz, etc.) to become NaN only when using the new KF-family schemes together with P3, while:
- the old KF implementation works,
- other cumulus schemes work,
- and other microphysics schemes also work.
Do you have any suggestions about where else I should look, or whether there are any known compatibility issues between the newer KF implementations and P3?
------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------
I can also provide the restart files (wrfrst*), wrfbdy if that would help reproduce the problem.
Any advice would be greatly appreciated.
Thank you!
Attachments
Last edited: