# Command line harpmerge | sequence of filters

**URL:** https://forum.atmospherictoolbox.org/t/command-line-harpmerge-sequence-of-filters/607
**Category:** HARP
**Tags:** gome-2
**Created:** [February 10, 2023, 7:21pm UTC](https://forum.atmospherictoolbox.org/t/command-line-harpmerge-sequence-of-filters/607 "2023-02-10T19:21:39Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mariliza](https://forum.atmospherictoolbox.org/letter_avatar_proxy/v4/letter/m/c77e96/32.png) [@mariliza](https://forum.atmospherictoolbox.org/u/mariliza)
#### Post date: [February 10, 2023, 7:21pm UTC](https://forum.atmospherictoolbox.org/t/command-line-harpmerge-sequence-of-filters/607/1 "2023-02-10T19:21:40Z")

</div>

Good evening Sander,

I wanted to ask about the sequence of operations/options in harpmerge, command line edition.

I am using

harpmerge -a ‘SO2\_column\_number\_density\>0.8; SO2\_column\_number\_density\_validity!& 255;scan\_direction\_type==0’ -ap ‘bin\_spatial(721,-90.0,0.25,1441,-180.,0.25);derive(latitude {latitude}); derive(longitude {longitude});derive(SO2\_column\_number\_density [DU]);keep(latitude, longitude, latitude\_bounds,longitude\_bounds,SO2\_column\_number\_density,solar\_zenith\_angle, cloud\_fraction,SO2\_column\_number\_density)’ \*.HDF5 temp.nc

On the Raikoke eruptive day of 23.06.2019, with GOME2C GDP4.9

I want to exclude all pixels with SO2 load of less than 0.8 D.U.

However, I seem to be left with a number of values lower that that. Same if I do not bin\_spatial.

 ![SO2_column_number_density_in_temp](https://forum.atmospherictoolbox.org/uploads/default/original/1X/eca7007c4c20c8d38f53f2844babf854f0290c53.jpeg)

There are actual values between 0 and 0.8D.U. in the data, it is not a case of panoply not being able to deal with NaNs or whatever.

What do you think? maybe the sequence of operations has to change?

Furthermore, I just realise that the derive(SO2\_column\_number\_density [DU]) is not needed since this is done automatically for GOME2.

Many thanks  
MariLiza

---

<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: [February 12, 2023, 10:24pm UTC](https://forum.atmospherictoolbox.org/t/command-line-harpmerge-sequence-of-filters/607/2 "2023-02-12T22:24:33Z")

</div>

The [default unit for SO2 as ingested by HARP is [molec/cm2]](http://stcorp.github.io/harp/doc/html/ingestions/GOME2_L2_O3MOTO.html), so, since you are filtering before doing a unit conversion, you are filtering with the wrong unit. The best approach is to just provide an explicit unit with your filter: `SO2_column_number_density > 0.8 [DU]`

---

<div class="post-metadata">

### Author: ![mariliza](https://forum.atmospherictoolbox.org/letter_avatar_proxy/v4/letter/m/c77e96/32.png) [@mariliza](https://forum.atmospherictoolbox.org/u/mariliza)
#### Post date: [February 13, 2023, 7:15am UTC](https://forum.atmospherictoolbox.org/t/command-line-harpmerge-sequence-of-filters/607/3 "2023-02-13T07:15:45Z")

</div>

You are absolutely right, as usual… I was reading the description “unit is converted from DU to molec/cm2” in its vice versa form. From molec to DU.

Let’s see if I get something sensible out this way.

Best wishes,  
MariLiza
