# Harpmerge error relating to CODA and HDF5

**URL:** https://forum.atmospherictoolbox.org/t/harpmerge-error-relating-to-coda-and-hdf5/679
**Category:** HARP
**Created:** [August 28, 2023, 11:21pm UTC](https://forum.atmospherictoolbox.org/t/harpmerge-error-relating-to-coda-and-hdf5/679 "2023-08-28T23:21:49Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![mosaichaoyan](https://forum.atmospherictoolbox.org/user_avatar/forum.atmospherictoolbox.org/mosaichaoyan/32/304_2.png) [@mosaichaoyan](https://forum.atmospherictoolbox.org/u/mosaichaoyan)
#### Post date: [August 28, 2023, 11:21pm UTC](https://forum.atmospherictoolbox.org/t/harpmerge-error-relating-to-coda-and-hdf5/679/1 "2023-08-28T23:21:49Z")

</div>

I installed CODA (2.24.2), HDF4 (hdf-4.2.16), HDF5 (1.10.10) and HARP (1.19) from source on a ubuntu 20.04 machine following instructions on [Installation — HARP 1.21 documentation](http://stcorp.github.io/harp/doc/html/install.html).  
For CODA, the following steps were run.

> \>\>./configure --enable-python HDF4\_INCLUDE=/usr/lib/hdf-4.2.16/hdf4/include/ HDF4\_LIB=/usr/lib/hdf-4.2.16/hdf4/lib/ HDF5\_INCLUDE=/usr/lib/hdf5-1.10.10/hdf5/include/ HDF5\_LIB=/usr/lib/hdf5-1.10.10/hdf5/lib/  
> \>\> make  
> \>\> make install

All installation seems fine, and harpcheck -v returns:

> root@0606-153252-8ggo8xj6-10-155-152-229:/lib/harp# harpcheck -v  
> harpcheck version 1.19  
> Copyright (C) 2015-2023 S[&]T, The Netherlands.

But when I try to use harpmerge, the error comes out:

> root@0606-153252-8ggo8xj6-10-155-152-229:/lib/harp# harpmerge -a ‘CH4\_column\_volume\_mixing\_ratio\_dry\_air\_validity\>50; latitude \> -90; latitude \< 90; longitude \> -180; longitude \< 180; bin\_spatial(1801,-90,0.1,3601,-180,0.1); keep(CH4\_column\_volume\_mixing\_ratio\_dry\_air,cloud\_fraction,latitude\_bounds,longitude\_bounds)’ /dbfs/FileStore/shared\_uploads/tropomi/S5P\_OFFL\_L2\_\_CH4\_\_\_\_20220901\*.nc /dbfs/FileStore/shared\_uploads/hao\_yan/test/20220901.nc  
> ERROR: HDF5 is not supported (this version of CODA was not built with HDF5 support)

Thanks for your help!

---

<div class="post-metadata">

### Author: ![sander.niemeijer](https://forum.atmospherictoolbox.org/user_avatar/forum.atmospherictoolbox.org/sander.niemeijer/32/5_2.png) [@sander.niemeijer](https://forum.atmospherictoolbox.org/u/sander.niemeijer)
#### Post date: [August 29, 2023, 6:15am UTC](https://forum.atmospherictoolbox.org/t/harpmerge-error-relating-to-coda-and-hdf5/679/2 "2023-08-29T06:15:56Z")

</div>

You showed how you configured and build coda, but not how you configured and build harp. This would be the important information to share.

---

<div class="post-metadata">

### Author: ![mosaichaoyan](https://forum.atmospherictoolbox.org/user_avatar/forum.atmospherictoolbox.org/mosaichaoyan/32/304_2.png) [@mosaichaoyan](https://forum.atmospherictoolbox.org/u/mosaichaoyan)
#### Post date: [August 29, 2023, 1:14pm UTC](https://forum.atmospherictoolbox.org/t/harpmerge-error-relating-to-coda-and-hdf5/679/3 "2023-08-29T13:14:22Z")

</div>

Hi Sander, thanks for your reply. I used the following to configure harp.

> ./configure --enable-python HDF4\_INCLUDE=/usr/lib/hdf-4.2.16/hdf4/include/ HDF4\_LIB=/usr/lib/hdf-4.2.16/hdf4/lib/ HDF5\_INCLUDE=/usr/lib/hdf5-1.10.10/hdf5/include/ HDF5\_LIB=/usr/lib/hdf5-1.10.10/hdf5/lib/

After changing the configure of coda to the following, now I can run harpmerge without error.

> ./configure --enable-python --with-hdf5 --with-hdf4 HDF4\_INCLUDE=/usr/lib/hdf-4.2.16/hdf4/include/ HDF4\_LIB=/usr/lib/hdf-4.2.16/hdf4/lib/ HDF5\_INCLUDE=/usr/lib/hdf5-1.10.10/hdf5/include/ HDF5\_LIB=/usr/lib/hdf5-1.10.10/hdf5/lib/

Now I have another question, how do I connect harp with python (be able to use the python wrapper) if I installed harp through building from source? Thanks!!

---

<div class="post-metadata">

### Author: ![sander.niemeijer](https://forum.atmospherictoolbox.org/user_avatar/forum.atmospherictoolbox.org/sander.niemeijer/32/5_2.png) [@sander.niemeijer](https://forum.atmospherictoolbox.org/u/sander.niemeijer)
#### Post date: [August 29, 2023, 1:33pm UTC](https://forum.atmospherictoolbox.org/t/harpmerge-error-relating-to-coda-and-hdf5/679/4 "2023-08-29T13:33:30Z")

</div>

Since you didn’t provide a prefix argument to the configure script, everything should have been installed in `/usr/local`. This means that you should add `/usr/local/lib/python3.11/site-packages` (using the appropriate path depending on your python version) to your python path.  
You can set a `PYTHONPATH` environment variable to point to this path or you can set it programmatically using e.g. `sys.path.append` from within python itself.

---

<div class="post-metadata">

### Author: ![mosaichaoyan](https://forum.atmospherictoolbox.org/user_avatar/forum.atmospherictoolbox.org/mosaichaoyan/32/304_2.png) [@mosaichaoyan](https://forum.atmospherictoolbox.org/u/mosaichaoyan)
#### Post date: [August 29, 2023, 1:40pm UTC](https://forum.atmospherictoolbox.org/t/harpmerge-error-relating-to-coda-and-hdf5/679/5 "2023-08-29T13:40:52Z")

</div>

Got it, thank you very much sander!!
