# Problem with METCRO2D using MEGAN inline

**URL:** <https://forum.cmascenter.org/t/problem-with-metcro2d-using-megan-inline/6138>\
**Category:** MEGAN\
**Tags:** megan\
**Created:** [January 22, 2026, 2:26pm UTC](https://forum.cmascenter.org/t/problem-with-metcro2d-using-megan-inline/6138 "2026-01-22T14:26:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MariaMB](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@MariaMB](https://forum.cmascenter.org/u/MariaMB)\
**Post date:** [January 22, 2026, 2:26pm UTC](https://forum.cmascenter.org/t/problem-with-metcro2d-using-megan-inline/6138/1 "2026-01-22T14:26:18Z")

</div>

Hello! I’m using MEGAN inline in CMAQ version 5.4. I’ve used “prepmegan4cmaq” to prepare my input files and I’m getting the following error, related to my MCIP (v5.4) METCRO2D file:

Value for PROMPTFLAG: T returning TRUE  
Enter name for gridded met input file [MET\_CRO\_2D] \>\>  
\*\*\* ERROR ABORT in subroutine M3PROMPT  
END-OF-FILE encountered

I’ve previously used the MCIP outputs in SMOKE and they worked fine. I’ve also been able to run CMAQ with and without biogenic emissions by enabling CTM\_BIOGEMIS\_MG = Y. The error occurs when I enable BDSNP\_MEGAN = Y.

I’m not sure what the problem is. I think it can’t access the METCRO2D file, but I’ve checked that the path is correct. Does anyone know what might be happening to me? Thank you very much in advance.

---

<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:** [January 22, 2026, 2:33pm UTC](https://forum.cmascenter.org/t/problem-with-metcro2d-using-megan-inline/6138/2 "2026-01-22T14:33:37Z")

</div>

Simple answer: you need a line of input for this prompt – probably a blank if you want to use the default `MET_CRO_2D`.  
Hack: in your script,  
_setenv PROMPTFLAG FALSE_  
More complete answer: in general, this code should be using [`OPEN3`](https://cjcoats.github.io/ioapi/OPEN3.html) instead of `PROMPTMFILE`: [As documented here,](https://cjcoats.github.io/ioapi/PROMPTMFILE.html) the I/O API `PROMPT*` routines are for interactive use, not for scripted.

---

<div class="post-metadata">

**Author:** ![willison.jeff](https://avatars.discourse-cdn.com/v4/letter/w/c89c15/32.png) [@willison.jeff](https://forum.cmascenter.org/u/willison.jeff)\
**Post date:** [January 22, 2026, 3:03pm UTC](https://forum.cmascenter.org/t/problem-with-metcro2d-using-megan-inline/6138/3 "2026-01-22T15:03:40Z")

</div>

For what it’s worth, this PROMPTMFILE line has since been fixed for our upcoming release.

---

<div class="post-metadata">

**Author:** ![MariaMB](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@MariaMB](https://forum.cmascenter.org/u/MariaMB)\
**Post date:** [January 22, 2026, 4:34pm UTC](https://forum.cmascenter.org/t/problem-with-metcro2d-using-megan-inline/6138/4 "2026-01-22T16:34:08Z")

</div>

> [@MariaMB](#):
>
> Value for PROMPTFLAG: T returning TRUE  
> Enter name for gridded met input file [MET\_CRO\_2D] \>\>  
> \*\*\* ERROR ABORT in subroutine M3PROMPT  
> END-OF-FILE encountered

I made the change you recommended and now it does read the METCRO2D file, but the execution stops. It seems to read all the input files correctly, but I can’t figure out why it stops. I’m uploading a screenshot of the console, in case you can help me (I can’t upload the log file because I’m a new user. I’ll give you the last sentences). Thanks!

Beginning Emissions  
Calling Diagnostic Emissions at Date: 2024002 and time: 0

```
 Value for PROMPTFLAG: F returning FALSE
 NOTE: Grid settings initialized using MET_CRO_2D in  
      gridded file GRID NAME: 5kmSEVILLA_CROSS

```
