# Error with beld4\_water\_fix script

**URL:** <https://forum.cmascenter.org/t/error-with-beld4-water-fix-script/2079>\
**Category:** SMOKE\
**Created:** [February 15, 2021, 4:39pm UTC](https://forum.cmascenter.org/t/error-with-beld4-water-fix-script/2079 "2021-02-15T16:39:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkharkey](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@mkharkey](https://forum.cmascenter.org/u/mkharkey)\
**Post date:** [February 15, 2021, 4:39pm UTC](https://forum.cmascenter.org/t/error-with-beld4-water-fix-script/2079/1 "2021-02-15T16:39:41Z")

</div>

I’m setting up a CMAQ simulation with a 1.3 km x 1.3 km horizontal resolution and (scaled) Inventory Collaborative 2016v1 emissions. I’m very grateful for the detailed documentation and helpful scripts for generating input files on other grids (found here ftp://newftp.epa.gov/air/emismod/2016/v1/ )–unfortunately one of them isn’t working for me.

In order to generate a land use file on my grid, I was able to run convert\_beld41\_feb2017\_epa\_12US1.csh without problems. At the next step, running beld4\_water\_fix.csh, I get the error message below. Both these scripts come with precompiled executables, so I assume this error is similar to the one reported here: [Xportfrac error](https://forum.cmascenter.org/t/xportfrac-error/1693)  
Is there a way for me to rebuild the water\_fix script on my machine?  
Thank you!

* * *

[mharkey@orchid-submit beld4.1\_land\_use\_feb2017]$ ./beld4\_water\_fix.csh  
setenv BDIR /home/mharkey/CMAQ\_extras/beld4.1\_land\_use\_feb2017  
setenv BELD4 /home/mharkey/CMAQ\_extras/Spatial-Allocator/LM1p3\_output/beld41\_feb2017\_lakemich1p3\_output.ncf  
setenv GRIDCRO2D /ships19/models2/lenzen/MCIP/YNT-SSN.d23.GVF/lakemich1p3/GRIDCRO2D\_20170601.nc  
setenv OUTFILE /home/mharkey/CMAQ\_extras/Spatial-Allocator/LM1p3\_output/beld41\_feb2017\_waterfix\_LM1p3.ncf  
setenv PROMPTFLAG FALSE  
/home/mharkey/CMAQ\_extras/beld4.1\_land\_use\_feb2017/beld4\_water\_fix  
/home/mharkey/CMAQ\_extras/beld4.1\_land\_use\_feb2017/beld4\_water\_fix: error while loading shared libraries: libioapi.so: cannot open shared object file: No such file or directory  
exit

---

<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:** [February 15, 2021, 5:38pm UTC](https://forum.cmascenter.org/t/error-with-beld4-water-fix-script/2079/2 "2021-02-15T17:38:11Z")

</div>

The license for the I/O API library requires that this program (and any others that use the library) be distributed in re-linkable form (either source or “.o” files). Contact the distributor – and also let me know who it is…

`-- Carlie J. Coats, Jr., Ph.D. I/O API Author/Maintainer`

---

<div class="post-metadata">

**Author:** ![jvukovich](https://avatars.discourse-cdn.com/v4/letter/j/df705f/32.png) [@jvukovich](https://forum.cmascenter.org/u/jvukovich)\
**Post date:** [February 17, 2021, 2:18pm UTC](https://forum.cmascenter.org/t/error-with-beld4-water-fix-script/2079/3 "2021-02-17T14:18:11Z")

</div>

The beld4\_water\_fix code is located here:

ftp://newftp.epa.gov/Air/emismod/tmp/b4\_waterfix.zip

There is a makefile (make.biog) in the zipped file along with a sample script. You are one of the first to try to use this code outside of EPA so please let me know how it goes. You will want to unzip this zipped file where ever you have your SMOKE code setup. Specifically in the following directory:

$SMK\_HOME/subsys/smoke/src

The code will go into the biog directory. Once you are setup to compile SMOKE programs (source ASSIGNS file), goto above directory and type “make -f make.biog” and hopefully it works for you. I am not sure how you have compiled IOAPI and other libs so you may have to edit the makefile possibly. The sample script indicates you need the current BELD4 file and a GRID\_CRO\_2D file for input. We were using MCIPv4.3 at the time of this program. If you are using MCIPv5 or a different WRF config possibly, the program may not work. Hope it goes well.

Jeff

---

<div class="post-metadata">

**Author:** ![mkharkey](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@mkharkey](https://forum.cmascenter.org/u/mkharkey)\
**Post date:** [February 19, 2021, 7:45pm UTC](https://forum.cmascenter.org/t/error-with-beld4-water-fix-script/2079/4 "2021-02-19T19:45:58Z")

</div>

thank you, Jeff–  
I tried “make -f make.b4fix” (there wasn’t a make.biog–I hope this was correct), with the result

make: \*\*\* No rule to make target ‘modfileset.mod’, needed by ‘beld4\_water\_fix.o’. Stop.

I’m not familiar enough with the architecture and Makefiles of SMOKE to know what I need to change here. Do you have any recommendations?  
We’re using IOAPI v3.2 and MCIP v4.5 and our GRIDCRO2D files have LUFRAC\_17 = water, fingers crossed the only sticking point is compiling.

-Monica

---

<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:** [February 19, 2021, 8:00pm UTC](https://forum.cmascenter.org/t/error-with-beld4-water-fix-script/2079/5 "2021-02-19T20:00:28Z")

</div>

The _src_ subdirectory of SMOKE will have a structure something like the following:

> _SMOKE.git/src_  
> _SMOKE.git/src/Makeinclude_  
> _SMOKE.git/src/Makefile_  
> _SMOKE.git/src/temporal_  
> _SMOKE.git/src/smkinven_  
> _SMOKE.git/src/spcmat_  
> _SMOKE.git/src/emqa_  
> _SMOKE.git/src/smkmerge_  
> _SMOKE.git/src/point_  
> _SMOKE.git/src/emutil_  
> _SMOKE.git/src/filesetapi_  
> _SMOKE.git/src/inc_  
> _SMOKE.git/src/biog_  
> _SMOKE.git/src/grdmat_  
> _SMOKE.git/src/movesmrg_  
> _SMOKE.git/src/cntlmat_  
> _SMOKE.git/src/emmod_  
> _SMOKE.git/src/lib_  
> You will need to follow the instructions for building SMOKE in order to bulld the libraries for _filesetapi_, _emmod_, and _lib_ in order to generate this (and other) needed files.

---

<div class="post-metadata">

**Author:** ![mkharkey](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@mkharkey](https://forum.cmascenter.org/u/mkharkey)\
**Post date:** [February 19, 2021, 9:03pm UTC](https://forum.cmascenter.org/t/error-with-beld4-water-fix-script/2079/6 "2021-02-19T21:03:02Z")

</div>

thank you–just to check before I embark on that project, you mean I’ll need to compile SMOKE from scratch, not use the precompiled executables, correct?

---

<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:** [February 19, 2021, 9:06pm UTC](https://forum.cmascenter.org/t/error-with-beld4-water-fix-script/2079/7 "2021-02-19T21:06:18Z")

</div>

That is correct: you’ll need to compile SMOKE from scratch
