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

DART with WRF 4+ #661

Closed
hkershaw-brown opened this issue Apr 5, 2024 · 2 comments · Fixed by #673
Closed

DART with WRF 4+ #661

hkershaw-brown opened this issue Apr 5, 2024 · 2 comments · Fixed by #673
Labels
wrf Weather Research & Forecasting Model

Comments

@hkershaw-brown
Copy link
Member

hkershaw-brown commented Apr 5, 2024

Issue created from comment in #404

In addition to making the WRFv3.9.1-DART Tutorial compatible with Derecho as part of the completed issue #627 which was resolved by PR #636 -- I have continued to test WRFv4+ versions with the Tutorial as a continuation of issue #627. I currently have WRFv4 working with the tutorial. This is not a complete wrf model_mod refactor as outlined in this thread, but only includes basic requirements to get DART working with WRFv4+ versions including:

  1. Implementing the sigma hybrid coordinates which are the default in WRFv4+ and are part of PR Add WRF hybrid vertical coordinate  #650.

  2. Swapping T (potential temperature) with THM (moist/dry potential temperature) as discussed in bug THM WRF v3 vs v4 #385.
    The T to THM change mostly includes only namelist changes, but also requires a model_mod.f90 edit where
    T is swapped with THM:

    wrf%dom(id)%type_t = get_type_ind_from_type_string(id,'T')

  3. Requires T to THM modifications to add_bank_perts.ncl including here:

    pert_fields = (/"U", "V", "T", "QVAPOR","MU"/)

  4. Requires T to THM modifications to input.nml and param.csh here:

    'T','QTY_POTENTIAL_TEMPERATURE','TYPE_T','UPDATE','999',

    set extract_vars_a = ( U V PH T MU QVAPOR QCLOUD QRAIN QICE QSNOW QGRAUP QNICE QNRAIN \
    U10 V10 T2 Q2 PSFC TSLB SMOIS TSK RAINC RAINNC GRAUPELNC )
    set extract_vars_b = ( U V W PH T MU QVAPOR QCLOUD QRAIN QICE QSNOW QGRAUP QNICE QNRAIN \
    U10 V10 T2 Q2 PSFC TSLB SMOIS TSK RAINC RAINNC GRAUPELNC \
    REFL_10CM VT_DBZ_WT )
    set cycle_vars_a = ( U V PH T MU QVAPOR QCLOUD QRAIN QICE QSNOW QGRAUP QNICE QNRAIN \
    U10 V10 T2 Q2 PSFC TSLB SMOIS TSK )
    set increment_vars_a = ( U V PH T MU QVAPOR QCLOUD QRAIN QICE QSNOW QGRAUP QNICE QNRAIN U10 V10 T2 Q2 PSFC )

  5. Also requires additional flag use_theta_m=0 within &dynamics section of WRF namelist.input. Makes T=THM.

Finally, during runtime the CONUS tutorial example tends to generate CFL errors 30 minutes after the first analysis step. CFL warnings/errors are related to issues with vertical stability sometimes related to complex terrain. These warnings were overcome by editing WRF namelist.input settings to:

&domains
time_step = 30
smooth_cg_topo = .true.
&dynamics
epssm = 0.9

These settings using WRFv4.0 allowed the tutorial example to run to completion and provided diagnostics similar to WRF3.9.1. Not clear if these instability issues were related to using WRFv4.0, where a more updated version (WRFv4.5) may be more stable. I could provide additional instructions within the WRF-DART tutorial for WRFv4+ users. This should help prepare them for issues related to hybrid coordinates and the T/THM transition.

Originally posted by @braczka in #404 (comment)

@hkershaw-brown hkershaw-brown added the wrf Weather Research & Forecasting Model label Apr 5, 2024
@braczka
Copy link
Contributor

braczka commented Apr 15, 2024

Successfully completed testing of WRF4.5.2 with DART tutorial example. Since version WRF4.3 new namelist options were included to handle vertical instability (CFL) issues as described above for WRF4.0 tutorial case. WRF4.5.2 was successfully run, similarly to the WRF4.0 as described above, except the following namelist options can be returned to their default values as:

&domains
time_step = 60
smooth_cg_topo = .false.

...

&dynamics
epssm = 0.1
use_theta_m = 0

and the following namelist item should be added.

&dynamics
zadvect_implicit = 1

Thank you @lkugler for the guidance on that stability option -- this citation may help with further information about the vertical stability option.

I need to incorporate this stability guidance for WRFv4.0 and WRFv4.5.2 to existing WRF-DART Tutorial documentation (v3.9.1), which should include: 1) necessary namelist options for WRFv4+, 2) source code changes related to THM variable

@braczka
Copy link
Contributor

braczka commented Apr 17, 2024

After performing some additional WRF testing with v4.5.2, (see pull request #650), any documentation regarding stability instructions should also include instructions/coding changes that warn the user, or force the run to fail, if the setup is not compatible with WRFv3.9 and earlier versus WRFv4.0 and later. For example, using WRFv4.0+ with WRFv3.9 setup currently does not fail, but provides reasonable but deprecated performance, that could easily remain unnoticed. Similar to sigma hybrid fix code which identifies coordinates from wrfinput global attributes, could identify WRF version from wrfinput file global attribute:

// global attributes:
		:TITLE = " OUTPUT FROM REAL_EM V3.9.1.1 PREPROCESSOR" ; 

then locate minimal requirements (e.g. T vs THM and namelist.input settings) in DART state.

hkershaw-brown added a commit that referenced this issue May 29, 2024
Latest from main, note keep wrf-wrf-chem version of wrf/model_mod.f90

note need to add #661 #649
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wrf Weather Research & Forecasting Model
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants