# MEGAN v3.2 preprocessing error

**URL:** <https://forum.cmascenter.org/t/megan-v3-2-preprocessing-error/3970>\
**Category:** MEGAN\
**Created:** [March 13, 2023, 2:13am UTC](https://forum.cmascenter.org/t/megan-v3-2-preprocessing-error/3970 "2023-03-13T02:13:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Starry](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@Starry](https://forum.cmascenter.org/u/Starry)\
**Post date:** [March 13, 2023, 2:13am UTC](https://forum.cmascenter.org/t/megan-v3-2-preprocessing-error/3970/1 "2023-03-13T02:13:22Z")

</div>

Hi all,  
I am working on MEGAN v3.2 preprocessing program

When I run prepmegan4cmaq\_grwform.x, I got this error:  
Reading megan2 bio emiss file GF3aTree.nc  
NetCDF: Attempt to use feature that was not turned on when netCDF was built.

My netcdf library is the one built for WRF with --disable-netcdf4 --disable-shared --disable-dap, version is netcdf-c-4.7.2.tar.gz and netcdf-fortran-4.5.2.tar.gz

Here is my log file

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/9/9f18fee6bf59d6586ef23e2b215c118dc0d65830.png)

Thank you for any help in advance.  
LiP

---

<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:** [March 13, 2023, 2:16pm UTC](https://forum.cmascenter.org/t/megan-v3-2-preprocessing-error/3970/2 "2023-03-13T14:16:18Z")

</div>

Since your netcdf is built without netcdf4, you could try converting that file to classic NETCDF:

> nccopy -k classic GF3aTree.nc GF3aTree\_classic.nc

\*@hogrefe.christian has pointed out that this probably will not work if nccopy was also built with --disable-netcdf4. In that case I would consider building a NetCDF library without that flag.

---

<div class="post-metadata">

**Author:** ![Starry](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@Starry](https://forum.cmascenter.org/u/Starry)\
**Post date:** [March 14, 2023, 8:46am UTC](https://forum.cmascenter.org/t/megan-v3-2-preprocessing-error/3970/3 "2023-03-14T08:46:08Z")

</div>

dear willison.jeff  
Thank you for your help.  
It takes me a long time to install netcdf with netcdf4, but with “–enable-netcdf4 --enable-shared --enable-dap”, prepmegan4cmaq\_grwform.x even can’t be compiled. I will continue to try, but I want to say thank you first.

---

<div class="post-metadata">

**Author:** ![lucysun](https://avatars.discourse-cdn.com/v4/letter/l/5f8ce5/32.png) [@lucysun](https://forum.cmascenter.org/u/lucysun)\
**Post date:** [July 29, 2024, 1:31am UTC](https://forum.cmascenter.org/t/megan-v3-2-preprocessing-error/3970/4 "2024-07-29T01:31:13Z")

</div>

> [@Starry](#):
>
> -disable-dap

Hi, I’m having the same problem, may I ask how you ended up solving it?

---

<div class="post-metadata">

**Author:** ![Starry](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@Starry](https://forum.cmascenter.org/u/Starry)\
**Post date:** [September 6, 2024, 2:53am UTC](https://forum.cmascenter.org/t/megan-v3-2-preprocessing-error/3970/5 "2024-09-06T02:53:05Z")

</div>

Sorry for the long time.  
I converted these MEGAN input files to netcdf3 format by Python. Hope this can help.
