From 2d99f18ee4b8ffc2e2c5c94d958590f10c7b3cb0 Mon Sep 17 00:00:00 2001 From: braczka Date: Thu, 10 Oct 2024 15:42:29 -0600 Subject: [PATCH] Enforcing inclusion of THM --- models/wrf/model_mod.f90 | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/models/wrf/model_mod.f90 b/models/wrf/model_mod.f90 index 9f135421b..381c60cc1 100644 --- a/models/wrf/model_mod.f90 +++ b/models/wrf/model_mod.f90 @@ -695,15 +695,17 @@ 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 (???) - ! If using WRF temperature variable 'T' instead of 'THM' fail immediately to - ! prevent boundscheck errors. For WRFv4 and later version variable 'T' is - ! diagnostic, thus updating the 'THM' variable (prognostic) is preferred. + ! The model_nml must contain WRF temperature variable 'THM' to + ! prevent boundcheck error. 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) then + 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 T in model_nml must be replaced', & - ' with THM for WRFv4 and later' + 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