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

Using 'T' in WRF model_mod gives 'boundscheck' error #728

Closed
braczka opened this issue Aug 30, 2024 · 4 comments
Closed

Using 'T' in WRF model_mod gives 'boundscheck' error #728

braczka opened this issue Aug 30, 2024 · 4 comments
Assignees
Labels
wrf Weather Research & Forecasting Model

Comments

@braczka
Copy link
Contributor

braczka commented Aug 30, 2024

🐛

Describe the bug

  1. List the steps someone needs to take to reproduce the bug.
    I ran into this while using filter with obs_def_rttov13.f90, however this error will occur during any process that uses the WRF model_mod.f90 and requires 'boundscheck' for forward operator calculation

  2. What was the expected outcome?
    It was expected that the WRF model_modf.90 would be able to interpolate the pressure variable while using 'T variable.

  3. What actually happened?
    Get error below, which is hard to interpret. Error is actually from boundscheck located here:

    if ( boundsCheck( i, wrf%dom(id)%periodic_x, id, dim=1, type=wrf%dom(id)%type_t ) .and. &

Error Message

 PE 0: filter: Model does not need to run; data already at required time
 retreiving obs kind            6  on domain            1
   15.8469319216636        280.002512194406        45.6224972990873
   38.3367806743645
  corners of lat
   15.8359298706055        15.8365554809570        15.8673477172852
   15.8680267333984
  corners of long
  -80.0176086425781       -79.9849243164062       -80.0182800292969
  -79.9855957031250
 is_vertical(PRESSURE)  F
 is_vertical(HEIGHT)  F
 is_vertical(LEVEL)  T
 is_vertical(SURFACE)  F
 is_vertical(UNDEFINED)  F
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
filter             000000000077EACD  model_mod_mp_boun        6679  model_mod.f90
filter             0000000000620AB1  model_mod_mp_mode        2045  model_mod.f90
filter             00000000009BE297  obs_def_rttov_mod        3241  obs_def_mod.f90
filter             0000000000A1765B  obs_def_mod_mp_ge        8308  obs_def_mod.f90
filter             00000000008CF288  forward_operator_         440  forward_operator_mod.f90
filter             00000000008C7565  forward_operator_         276  forward_operator_mod.f90
filter             0000000000574393  filter_mod_mp_fil         839  filter_mod.f90
filter             00000000008B3DC3  MAIN__                     20  filter.f90
filter             0000000000410F7D  Unknown               Unknown  Unknown
libc-2.31.so       0000149F5620329D  __libc_start_main     Unknown  Unknown
filter             0000000000410EAA  Unknown               Unknown  Unknown
dec2442.hsn.de.hpc.ucar.edu: rank 0 exited with code 152

Which model(s) are you working with?

WRF4.4

Version of DART

v11.6.0

Have you modified the DART code?

The fix is easy enough -- just replace T with THM and make sure WRF outputs THM. We encourage users to use THM and not T in the WRF documentation, however, it appears when using the WRF model_mod.f90 the code makes using THM mandatory, which is really an unintended side effect. The code should be able to use T or THM interchangeably when just used as a forward operator.

Note: The code isn't actually using 'T' or 'THM' to interpolate but using for a 'boundscheck' so not really sure if using 'type_t' is mandatory for this application.

At any rate the code throws a non-intuitive error and may be hard for casual user to intepret.

Build information

Derecho - intel compiler.

@braczka braczka added the wrf Weather Research & Forecasting Model label Aug 30, 2024
@hkershaw-brown
Copy link
Member

see the wrf model_mod refactor for not using model_mod types #683

@hkershaw-brown
Copy link
Member

Notes on thm vs t boundaries:

#385, #385 (comment)
main...wrf-thm

@braczka
Copy link
Contributor Author

braczka commented Sep 5, 2024

Thanks @hkershaw-brown for including these references. Based on our group conversation today I will address this for now with better documentation to always use THM, not T -- and perhaps include a warning message when T is included in WRF state. This doesn't limit WRF-DART functionality, it only prohibits use of T variable. We can revisit discussion on wrf model_mod refactor later down the road.

@braczka braczka self-assigned this Sep 5, 2024
@hkershaw-brown
Copy link
Member

fixed in #733

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

No branches or pull requests

2 participants