# Error in run.emproc of megan2.1

**URL:** <https://forum.cmascenter.org/t/error-in-run-emproc-of-megan2-1/5645>\
**Category:** MEGAN\
**Tags:** cmaq\
**Created:** [March 5, 2025, 3:35am UTC](https://forum.cmascenter.org/t/error-in-run-emproc-of-megan2-1/5645 "2025-03-05T03:35:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tting](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@tting](https://forum.cmascenter.org/u/tting)\
**Post date:** [March 5, 2025, 3:35am UTC](https://forum.cmascenter.org/t/error-in-run-emproc-of-megan2-1/5645/1 "2025-03-05T03:35:07Z")

</div>

Hi everyone!  
I’m using MEGAN2.1 to calculate biogenic emissions and got errors on the last day of each year (December 31st). Does anyone know what might be causing this?  
Here is the log:  
……  
Entering CANOPY: 19 2024366 0  
Exited CANOPY: 19 2024366 0  
Entering CANOPY: 20 2024366 0  
Exited CANOPY: 20 2024366 0  
Estimating soil NOx 1 2024366 0  
Using SOIL parameters in NOx adjustment  
PGFIO-F-235/formatted write/internal file/edit descriptor does not match item type.  
In source file soilnox\_fx.F, at line number 81

---

<div class="post-metadata">

**Author:** ![lizadams](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@lizadams](https://forum.cmascenter.org/u/lizadams)\
**Post date:** [March 31, 2025, 2:58pm UTC](https://forum.cmascenter.org/t/error-in-run-emproc-of-megan2-1/5645/2 "2025-03-31T14:58:18Z")

</div>

It looks like line 81 is the WRITE statement below.

```
  IF( GDAY == 0 ) THEN
      FERTLZ_ADJ = 0.
  ELSE IF( GDAY >= 1 .AND. GDAY < 30 ) THEN
      ! first month of growing season
      FERTLZ_ADJ = 1.
  ELSE IF( GDAY >= 30 .AND. GDAY <= 366) THEN
      ! later month of growing season
      FERTLZ_ADJ = 1. + 30. / FLOAT(GLEN) - FLOAT(GDAY) / FLOAT(GLEN)
  ELSE
      WRITE( MESG,94010 ) 'Invalid date specified; date = ', 
 & DATE, 'growing season day = ',
 & GDAY
      CALL M3EXIT( 'FERTLZ_ADJ', 0, 0, MESG, 2 )
  ENDIF

```

Perhaps others can solve this issue with this additional information.
