Base State WRFInput#3177
Conversation
| int khi = ubound(valid_bx).z; | ||
| int klo = lbound(valid_bx).z; | ||
|
|
||
| // ARW V4 Constants (5.2.2 Reference State) |
There was a problem hiding this comment.
This is the right ARW reference-state form, but should these constants come from the WRFInput file or ERF inputs rather than being hard-coded?
WRF treats the reference-state parameters (p00, t00, tlp/base_lapse, tiso, tlp_strat, p_strat, p_top) as configurable/input values. If the wrfinput/wrfbdy pair was generated with non-default reference-state constants, ERF would now construct a different dry base state than the one WRF used.
At minimum, I think we should print the values used here. Ideally, we should read the WRF values when present and fall back to these defaults only when absent.
There was a problem hiding this comment.
I do not see these values in any of the wrfinput or wrbdy files I have. We can easily print the current values. However, a discussion is in order if we wish to parse them from somewhere.
There was a problem hiding this comment.
My opinion is that we go ahead and merge this PR then open an issue pointing out that we could read these in from wrfinput / wrfbdy files. Given that we know this is better than what is there, we should not delay in merging, but we should remember we can generalize later. @pressel -- would you be good with that? @cmkaul -- could you give this PR a try on your case that has boundary issues and confirm the solution is hopefully better but at least no worse?
| pi_hse_arr(i,j,k) = getExnergivenP(p_hse_arr(i,j,k), l_rdOcp); | ||
| th_hse_arr(i,j,k) = getRhoThetagivenP(p_hse_arr(i,j,k), Qv) / cons_arr(ii,jj,kk,Rho_comp); | ||
| qv_hse_arr(i,j,k) = Qv; | ||
| // Fill top and bottom ghost cells |
There was a problem hiding this comment.
Does base_state ever require more than one vertical ghost cell in the pressure-gradient/HSE paths? This fills only klo-1 and khi+1, while the previous grown-box/clamping approach populated the whole grown region. If one layer is sufficient, a short assertion or comment would make that clear.
There was a problem hiding this comment.
No, only one ghost cell is needed at the top and bottom.
Summary
The base state needs to be set such that
\partial_{x_h} P_0 \approx 0. This PR now follows WRF in using a laterally homogeneous and dry state for HSE.Regtest Implications
This PR will break the following regtests
WRF Equations
Algorithm
zand setPd, Td, Rdon the low side from WRF equationszon high side and initialize data to the low sideTd(Pd) & Rd(Td,Pd). Use WRF equations forTdand EOS forRd. This ensures a hydrostatic balance is achieved.Result
Qv in the large tornado domain at 30 m AGL after 8 hrs of simulation (6 ITC --> 14 UTC):
