Skip to content

Commit

Permalink
Merge pull request #733 from NCAR/THM_variable_doc
Browse files Browse the repository at this point in the history
THM is mandatory WRF temp variable
  • Loading branch information
hkershaw-brown authored Oct 22, 2024
2 parents 464aa57 + 92dac72 commit 5c4c880
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
16 changes: 16 additions & 0 deletions models/wrf/model_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,22 @@ subroutine static_init_model()

! JPH now that we have the domain ID just go ahead and get type indices once
! NOTE: this is not strictly necessary - can use only stagger info in the future (???)

! Prevent boundscheck error by making WRF temperature variable 'THM' as mandatory.
! Also, for WRFv4 and later versions variable 'T' is
! diagnostic, thus updating the 'THM' variable (prognostic) is also preferred
! for all DA applications.



if (get_type_ind_from_type_string(id,'T') >=0 .or. get_type_ind_from_type_string(id,'THM') <=0) then

write(errstring,*)'WRF temperature variable THM must appear in DART model_nml', &
' for WRFv4 and later'
call error_handler(E_ERR,'static_init_model', errstring, source, revision, revdate)

endif

wrf%dom(id)%type_u = get_type_ind_from_type_string(id,'U')
wrf%dom(id)%type_v = get_type_ind_from_type_string(id,'V')
wrf%dom(id)%type_w = get_type_ind_from_type_string(id,'W')
Expand Down
12 changes: 11 additions & 1 deletion models/wrf/readme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ Some important WRF-DART updates include:
operator calculations.

- Version 11.5.0: Improves compatibility with WRFv4+ versions where
the prognostic 3D temperature variable is THM.
the prognostic 3D temperature variable is THM. It is now mandatory to
include THM instead of T in the ``wrf_state_variables`` namelist.



It is always recommended that you update your DART version to the
`latest release <https://github.com/NCAR/DART/releases>`__ before beginning new research.
Expand Down Expand Up @@ -336,6 +339,13 @@ For example:
'PSFC','QTY_PRESSURE','TYPE_PS','UPDATE','999',


.. Important::

It is mandatory to include ``THM`` instead of ``T`` as the ``TYPE_T`` WRF
temperature variable. This is because ``THM`` is the prognostic temperature variable
that will impact the forecast when updated.


- polar, periodic_x

The ``Polar`` and ``periodic_x`` namelist values are used in global WRF simulations.
Expand Down
4 changes: 3 additions & 1 deletion models/wrf/tutorial/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ either WRF or DART.
versions 11.4.0 and earlier because those older versions do not account
for different coordinate systems including the sigma hybrid coordinates as
described in `DART Issue #650 <https://github.com/NCAR/DART/pull/650>`__.
Furthermore, older versions do not account for the prognostic temperature variable
switch from ``T`` (perturbation potential temperature) to ``THM``, (either perturbation
potential temperature or perturbation moist potential temperature) as described in
`DART issue #661 <https://github.com/NCAR/DART/issues/661>`__. The current implementation
of the code sets ``T=THM`` because within &dynamics section of ``namelist.input``
``use_theta_m=0``.
``use_theta_m=0``. For this reason, It is mandatory to include ``THM`` instead of
``T`` as the ``TYPE_T`` within the wrf_state_variables namelist.
Earlier version of WRF (v3.9) may run without errors with more recent versions of
DART (later than 11.4.0), but the assimilation performance will be deprecated.
Expand Down

0 comments on commit 5c4c880

Please sign in to comment.