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

WRF doesn't halt when beginning LBC time is not in wrfbdy_d01 file #769

Closed
mgduda opened this issue Jan 31, 2019 · 3 comments
Closed

WRF doesn't halt when beginning LBC time is not in wrfbdy_d01 file #769

mgduda opened this issue Jan 31, 2019 · 3 comments

Comments

@mgduda
Copy link
Collaborator

mgduda commented Jan 31, 2019

When restarting a model simulation at a time beyond the last valid boundary data in the wrfbdy_d01 file, the model doesn't stop, but instead appears to go into an infinite loop, generating printout like the following in all rsl files:

WRF restart, LBC starts at 2019-01-25_00:00:00 and restart starts at 2019-01-26_00:00:00
 LBC for restart: Starting valid date = 2019-01-25_00:00:00, Ending valid date = 2019-01-25_03:00:00
 LBC for restart: Restart time            = 2019-01-26_00:00:00
 LBC for restart: Looking for a bounding time
 LBC for restart: Starting valid date = 2019-01-25_03:00:00, Ending valid date = 2019-01-25_06:00:00
 LBC for restart: Starting valid date = 2019-01-25_06:00:00, Ending valid date = 2019-01-25_09:00:00
 LBC for restart: Starting valid date = 2019-01-25_09:00:00, Ending valid date = 2019-01-25_12:00:00
 LBC for restart: Starting valid date = 2019-01-25_12:00:00, Ending valid date = 2019-01-25_15:00:00
 LBC for restart: Starting valid date = 2019-01-25_15:00:00, Ending valid date = 2019-01-25_18:00:00
 LBC for restart: Starting valid date = 2019-01-25_18:00:00, Ending valid date = 2019-01-25_21:00:00
 LBC for restart: Starting valid date = 2019-01-25_21:00:00, Ending valid date = 2019-01-26_00:00:00
---- ERROR: Cannot find a valid time to start the LBC during this restart, likely ran out of time periods to test
 LBC for restart: Starting valid date = 2019-01-25_21:00:00, Ending valid date = 2019-01-26_00:00:00
---- ERROR: Cannot find a valid time to start the LBC during this restart, likely ran out of time periods to test
 LBC for restart: Starting valid date = 2019-01-25_21:00:00, Ending valid date = 2019-01-26_00:00:00
---- ERROR: Cannot find a valid time to start the LBC during this restart, likely ran out of time periods to test
 LBC for restart: Starting valid date = 2019-01-25_21:00:00, Ending valid date = 2019-01-26_00:00:00
---- ERROR: Cannot find a valid time to start the LBC during this restart, likely ran out of time periods to test
 LBC for restart: Starting valid date = 2019-01-25_21:00:00, Ending valid date = 2019-01-26_00:00:00
---- ERROR: Cannot find a valid time to start the LBC during this restart, likely ran out of time periods to test

In a small test run, I was able to generate almost 26 GB of rsl files before manually terminating WRF.

@mgduda
Copy link
Collaborator Author

mgduda commented Jan 31, 2019

The shortest route to reproducing this would probably be:

  1. Run real.exe to generate a wrfinput_d01 and wrfbdy_d01 file, where the wrfbdy_d01 file has, say, 24 hours of data
  2. Run the model for 24 hours, writing a restart file at the end of the simulation
  3. Try to restart the model

@mgduda
Copy link
Collaborator Author

mgduda commented Jan 31, 2019

Although the code in input_wrf.F limits the number of messages to 10000, the input_boundary routine (which calls input_wrf) appears to be called in what becomes an infinite loop in mediation_integrate.F.

@weiwangncar
Copy link
Collaborator

@davegill Can you take a look at this? Thanks.

davegill added a commit to davegill/WRF that referenced this issue Apr 8, 2019
TYPE: bug fix

KEYWORDS: LBC, valid time

SOURCE: identified by Michael Duda (NCAR/MMM), fixed internally

DESCRIPTION OF CHANGES:
Problem:
If a user tried to start a simulation _after_ the LBC valid period, the
WRF model would get into an infinite loop and print out repeated
statements:
```
 THIS TIME 2000-01-24_18:00:00, NEXT TIME 2000-01-25_00:00:00
d01 2000-01-25_06:00:00  Input data is acceptable to use: wrfbdy_d01
           2  input_wrf: wrf_get_next_time current_date: 2000-01-24_18:00:00 Status =           -4
d01 2000-01-25_06:00:00  ---- ERROR: Ran out of valid boundary conditions in file wrfbdy_d01
```

Solution:
In another routine, the lateral boundary condition is read to get to the
correct time. Once inside of share/input_wrf.F, we should be at the
correct time. There is no need to try to get to the next time. In this
particular case, the effort to get to the next time fails, but we try
again (and again and again).

ISSUE:
Fixes wrf-model#769 "WRF doesn't halt when beginning LBC time is not in wrfbdy_d01 file"

LIST OF MODIFIED FILES:
M share/input_wrf.F

TESTS CONDUCTED:
1. Without fix, get lots of repeated messages
```
 THIS TIME 2000-01-24_18:00:00, NEXT TIME 2000-01-25_00:00:00
d01 2000-01-25_06:00:00  Input data is acceptable to use: wrfbdy_d01
           2  input_wrf: wrf_get_next_time current_date: 2000-01-24_18:00:00 Status =           -4
d01 2000-01-25_06:00:00  ---- ERROR: Ran out of valid boundary conditions in file wrfbdy_d01
```
2. With this fix, when LBC stops at 2000 01 25 00, and WRF starts at 2000 01 25 06
```
d01 2000-01-25_06:00:00  Input data is acceptable to use: wrfbdy_d01
 THIS TIME 2000-01-24_12:00:00, NEXT TIME 2000-01-24_18:00:00
d01 2000-01-25_06:00:00  Input data is acceptable to use: wrfbdy_d01
 THIS TIME 2000-01-24_18:00:00, NEXT TIME 2000-01-25_00:00:00
d01 2000-01-25_06:00:00  Input data is acceptable to use: wrfbdy_d01
           2  input_wrf: wrf_get_next_time current_date: 2000-01-24_18:00:00 Status =           -4
-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE:  <stdin>  LINE:    1134
 ---- ERROR: Ran out of valid boundary conditions in file wrfbdy_d01
-------------------------------------------
-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE:  <stdin>  LINE:    1134
 ---- ERROR: Ran out of valid boundary conditions in file wrfbdy_d01
-------------------------------------------
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants