Closed braczka closed 1 month ago
Besides documentation, perhaps I could have also forced the code to throw an error if temperature variable T
is used as the TYPE_T
in wrf_state_variables?
see #733 (review)
Yup, I am on it
Now errors out if using T WRF variable with type_t. Should both prevent boundscheck error, and also an end-user unexpectedly using a diagnostic temperature variable instead of prognostic temperature variable (THM), which will deprecate forecast skill.
Hi Brett, can you share a wrf restart file to test this code with? Thanks, Helen
Hi Brett, can you share a wrf restart file to test this code with? Thanks, Helen
Yes -- this wrf file has both T and THM to test out functionality:
/glade/work/bmraczka/DART/models/wrf/Akeem_bug/wrfinput_d01.original
934d82e Removes check of 'type_t' for error call. Only need to check for WRF variable 'T'
The code is not enforcing "mandatory THM". If you run model_mod_check with THM not in the state, you get a boundCheck error:
***************** RUNNING TEST 4 ***********************
-- Testing model_interpolate with a single location
**************************************************************
--------------------------------------------------------------
Interpolating QTY_10M_U_WIND_COMPONENT
-- at "loc_of_interest" location
--------------------------------------------------------------
-------------------------------------------------------------
interpolating at Lon/Lat(deg): 286.00000000 17.00000000 Vert: 0.0100000 km
interpolating for "QTY_10M_U_WIND_COMPONENT"
-------------------------------------------------------------
forrtl: severe (408): fort: (3): Subscript #2 of the array VAR_SIZE has value -1 which is less than the lower bound of 1
Image PC Routine Line Source
model_mod_check 00000000006E75BE model_mod_mp_boun 6710 model_mod.f90
model_mod_check 000000000055C992 model_mod_mp_mode 1612 model_mod.f90
model_mod_check 00000000007AC643 model_check_utili 86 model_check_utilities_mod.f90
model_mod_check 00000000008E7050 test_interpolate_ 339 test_interpolate_threed_sphere.f90
model_mod_check 0000000000800BEA MAIN__ 257 model_mod_check.f90
model_mod_check 000000000040EE3D Unknown Unknown Unknown
libc-2.31.so 00007F073B6B029D __libc_start_main Unknown Unknown
model_mod_check 000000000040ED6A Unknown Unknown Unknown
hkershaw@derecho4:/glade/derecho/scratch/hkershaw/DART/Bugs/wrf_type_t/runs$
The code is not enforcing "mandatory THM". If you run model_mod_check with THM not in the state, you get a boundCheck error:
***************** RUNNING TEST 4 *********************** -- Testing model_interpolate with a single location ************************************************************** -------------------------------------------------------------- Interpolating QTY_10M_U_WIND_COMPONENT -- at "loc_of_interest" location -------------------------------------------------------------- ------------------------------------------------------------- interpolating at Lon/Lat(deg): 286.00000000 17.00000000 Vert: 0.0100000 km interpolating for "QTY_10M_U_WIND_COMPONENT" ------------------------------------------------------------- forrtl: severe (408): fort: (3): Subscript #2 of the array VAR_SIZE has value -1 which is less than the lower bound of 1 Image PC Routine Line Source model_mod_check 00000000006E75BE model_mod_mp_boun 6710 model_mod.f90 model_mod_check 000000000055C992 model_mod_mp_mode 1612 model_mod.f90 model_mod_check 00000000007AC643 model_check_utili 86 model_check_utilities_mod.f90 model_mod_check 00000000008E7050 test_interpolate_ 339 test_interpolate_threed_sphere.f90 model_mod_check 0000000000800BEA MAIN__ 257 model_mod_check.f90 model_mod_check 000000000040EE3D Unknown Unknown Unknown libc-2.31.so 00007F073B6B029D __libc_start_main Unknown Unknown model_mod_check 000000000040ED6A Unknown Unknown Unknown hkershaw@derecho4:/glade/derecho/scratch/hkershaw/DART/Bugs/wrf_type_t/runs$
Yep -- trying again with 2d99f18
Yes -- let me update the docs to remove the boundscheck comments. This new check avoids the boundscheck issue, so we don't want to lead the user in the wrong direction if they actually get a boundscheck error for other reasons.
This is good on my end.
Description:
Adding documentation in WRF and WRF-DART tutorial to make THM mandatory.
Fixes issue
728
Types of changes
Documentation changes needed?
Checklist for merging
Checklist for release