# MEGAN TXT2IOAPI Execution Error: “ERROR ABORT in subroutine CNVT\_EFS” I/O error

**URL:** <https://forum.cmascenter.org/t/megan-txt2ioapi-execution-error-error-abort-in-subroutine-cnvt-efs-i-o-error/4640>\
**Category:** MEGAN\
**Created:** [January 19, 2024, 9:39am UTC](https://forum.cmascenter.org/t/megan-txt2ioapi-execution-error-error-abort-in-subroutine-cnvt-efs-i-o-error/4640 "2024-01-19T09:39:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![whr](https://avatars.discourse-cdn.com/v4/letter/w/22d042/32.png) [@whr](https://forum.cmascenter.org/u/whr)\
**Post date:** [January 19, 2024, 9:39am UTC](https://forum.cmascenter.org/t/megan-txt2ioapi-execution-error-error-abort-in-subroutine-cnvt-efs-i-o-error/4640/1 "2024-01-19T09:39:04Z")

</div>

Dear all,  
I have tried to run the MEGAN2.1 model (compiled by _PGI_ ). There is something wrong with the _TXT2IOAPI_ program (_run.txt2ioapi.v32.csh_ ) . When I use the official test data, I got “_ERROR ABORT in subroutine CNVT\_EFS_ I/O error 209 reading input file at line 1”. It looks like there is a problem with I/O, so I tried installing ioapi3.1 and ioapi3.2, but neither solved the problem. I am very confused, please help me. Thank you very much.

The logfile is:

```auto
 This program uses the EPA-AREAL/MCNC-EnvPgms/BAMS Models-3
     I/O Applications Programming Interface, [I/O API] which is
     built on top of the netCDF I/O library (Copyright 1993, 1996
     University Corporation for Atmospheric Research/Unidata
     Program) and the PVM parallel-programming library (from
     Oak Ridge National Laboratory). Copyright (C) 1992-2002 MCNC,
     (C) 1992-2013 Carlie J. Coats, Jr., and (C) 2003-2012 Baron
     Advanced Meteorological Systems, LLC and released under the
     GNU LGPL License, version 2.1. See URL

         https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html

     for conditions of use.

     ioapi-3.1: $Id:: init3.F 321 2016-02-26 16:00:20Z coats $
     Version with PARMS3.EXT/PARAMETER::MXVARS3= 2048
     netCDF version 4.3.3 of Jan 16 2024 21:33:31 $

     Missing environment variable EXECUTION_ID
     Value for GDNAM3D: 'USA36km'
     Value for GDNAM3D: 'USA36km'
     Value for RUN_EFS: T returning TRUE

     File "GRIDDESC" opened for input on unit: 99
     /usr/local/MEGANv2.10/work/GRIDDESC

 NCOLS3D USA36km LAM_39N97W 2
    33.00000000000000 45.00000000000000 -97.00000000000000
   -97.00000000000000 39.00000000000000 -2664000.000000000
   -1905428.125000000 36000.00000000000 36000.00000000000
          148 112 1
     Value for PROMPTFLAG: N returning FALSE

     File "EFSTXTF" opened for input on unit: 99
     /usr/local/MEGANv2.10/Input/MAP/EF210_USA36.csv

     *** ERROR ABORT in subroutine CNVT_EFS
     I/O error 209 reading input file at line 1

```

The process input files _EF210\_USA36.csv_ , _cnvt\_efs.F_ , and _run.txt2ioapi.v210.csh_ files are uploaded: [https://pan.baidu.com/s/1covIzO-WRBiS7KOBise0gw?pwd=wc8d](https://pan.baidu.com/s/1covIzO-WRBiS7KOBise0gw?pwd=wc8d)

Thank you again!

---

<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 19, 2024, 12:42pm UTC](https://forum.cmascenter.org/t/megan-txt2ioapi-execution-error-error-abort-in-subroutine-cnvt-efs-i-o-error/4640/2 "2024-01-19T12:42:35Z")

</div>

This is a text-file error (actually, it would seem, CSI-formatted text), not an I/O API error.

The PGI compiler documentation says that 209 is the error-number for “file does not exist”, so you may want to check on that: what does this say:  
_ls -l /usr/local/MEGANv2.10/Input/MAP/EF210\_USA36.csv_

---

<div class="post-metadata">

**Author:** ![whr](https://avatars.discourse-cdn.com/v4/letter/w/22d042/32.png) [@whr](https://forum.cmascenter.org/u/whr)\
**Post date:** [January 19, 2024, 1:45pm UTC](https://forum.cmascenter.org/t/megan-txt2ioapi-execution-error-error-abort-in-subroutine-cnvt-efs-i-o-error/4640/3 "2024-01-19T13:45:24Z")

</div>

Dear cjcoats

Thank you so much for helping me.  
When I type _ls -l /usr/local/MEGANv2.10/Input/MAP/EF210\_USA36.csv_，  
it say _-rw-r–r-- 1 root root 5088966 Jan 19 15:58 /usr/local/MEGANv2.10/  
Input/MAP/EF210\_USA36.csv_.  
It looks like the file exists. I have checked this result several times. I’m not sure if error 209 occurs because I’m running the program under root. I’ve been plagued by this problem for a long time. Looking forward to your reply.  
Thank you again!
