# Error reading the first BCON time step in centralized\_io\_module.F

**URL:** <https://forum.cmascenter.org/t/error-reading-the-first-bcon-time-step-in-centralized-io-module-f/3212>\
**Category:** Run Time Errors and Issues\
**Tags:** cmaq\
**Created:** [April 28, 2022, 11:44am UTC](https://forum.cmascenter.org/t/error-reading-the-first-bcon-time-step-in-centralized-io-module-f/3212 "2022-04-28T11:44:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkoo](https://avatars.discourse-cdn.com/v4/letter/b/2acd7d/32.png) [@bkoo](https://forum.cmascenter.org/u/bkoo)\
**Post date:** [April 28, 2022, 11:44am UTC](https://forum.cmascenter.org/t/error-reading-the-first-bcon-time-step-in-centralized-io-module-f/3212/1 "2022-04-28T11:44:21Z")

</div>

- My BCON inputs were prepared using global model outputs whose data is 6-hourly; thus the BCON file has data at 0:00, 6:00, 12:00, and so on.
- My daily CMAQ run starts at 8:00 (regional modeling for California is often done this way so that daily inputs/outputs cover mindnight to midnight in local time).
- CMAQ (v5.3.3) stops with error saying it can’t read BCON data at the model start time.

It looks like the problem is in the subroutine **centralized\_io\_init** where it assumes BCON data at the model start date/time is available (which is not always true as in my case):

> call retrieve\_boundary\_data (cio\_model\_sdate, cio\_model\_stime)

Fixing this is a bit tricky: I don’t think you can simply replace **cio\_model\_stime** in the above call with **file\_stime(f\_bcon)** because the subroutine may also read METBDY3D file which has its own start time (typically matching the model start time).  
My quick-and-dirty solution was setting **loc\_jtime** inside the subroutine **retrieve\_boundary\_data** to **jtime** if the optional argument **vname** is present (non-intialization call); to **file\_stime(f\_bcon)** if **vname** is not present (initialization call).  
A more elegant solution should come.

---

<div class="post-metadata">

**Author:** ![cjcoats](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@cjcoats](https://forum.cmascenter.org/u/cjcoats)\
**Post date:** [April 28, 2022, 11:56am UTC](https://forum.cmascenter.org/t/error-reading-the-first-bcon-time-step-in-centralized-io-module-f/3212/2 "2022-04-28T11:56:13Z")

</div>

To begin with, routine `retrieve_boundary_data` should never have been using `READ3` to read boundary data; the original design called for using time-interpolation routine `INTERP3`, instead, and it is a significant degradation to the numerical-method order of accuracy to be using `READ3` instead. And with 6-hour time steps, this degradation of accuracy is potentially quite bad.

As a hack, you could use M3Tools program m3interp to interpolate your BCON file to a finer time-resolution (hourly, at least), and use the resulting high-time-resolution file as your BCON: see [https://www.cmascenter.org/ioapi/documentation/all\_versions/html/M3CPLE.html](https://www.cmascenter.org/ioapi/documentation/all_versions/html/M3CPLE.html) for the program’s manual.

---

<div class="post-metadata">

**Author:** ![wong.david-c](https://avatars.discourse-cdn.com/v4/letter/w/bcef8e/32.png) [@wong.david-c](https://forum.cmascenter.org/u/wong.david-c)\
**Post date:** [April 28, 2022, 1:04pm UTC](https://forum.cmascenter.org/t/error-reading-the-first-bcon-time-step-in-centralized-io-module-f/3212/3 "2022-04-28T13:04:07Z")

</div>

Hi bkoo,

```
We will provide an updated centralized_io_module.F as soon as possible.

```

Cheers,  
David

---

<div class="post-metadata">

**Author:** ![wong.david-c](https://avatars.discourse-cdn.com/v4/letter/w/bcef8e/32.png) [@wong.david-c](https://forum.cmascenter.org/u/wong.david-c)\
**Post date:** [May 3, 2022, 4:00pm UTC](https://forum.cmascenter.org/t/error-reading-the-first-bcon-time-step-in-centralized-io-module-f/3212/4 "2022-05-03T16:00:51Z")

</div>

Hi bkoo,

```
Please send me an email at wong.david-c@epa.gov so I can send you an updated code.

```

Cheers,  
David
