# Problem in exporting data to Panoply

**URL:** https://forum.atmospherictoolbox.org/t/problem-in-exporting-data-to-panoply/191
**Category:** Uncategorized
**Created:** [July 30, 2020, 12:51pm UTC](https://forum.atmospherictoolbox.org/t/problem-in-exporting-data-to-panoply/191 "2020-07-30T12:51:24Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![layali](https://forum.atmospherictoolbox.org/user_avatar/forum.atmospherictoolbox.org/layali/32/57_2.png) [@layali](https://forum.atmospherictoolbox.org/u/layali)
#### Post date: [July 30, 2020, 12:51pm UTC](https://forum.atmospherictoolbox.org/t/problem-in-exporting-data-to-panoply/191/1 "2020-07-30T12:51:24Z")

</div>

Hello everybody,

I tried to find the global average of AAI for July month. I used (code 1 below) to do this and get a fine image when I imported the output product and visualize it in the VISAN window. But when I exported the product into Panoply I get a problem when I tried to create a plot shows a map of the AAI. I got sms tell me “There was an error preparing the data. Failed creating the data handler: Axis var $s is \> 1D”. Then I followed Sander’s instructions and found something similar in the link below.

> [@Map Sentinel 5p CH4, SO2 and CO Data (Visan)](https://forum.atmospherictoolbox.org/t/map-sentinel-5p-ch4-so2-and-co-data-visan/45/5):
>
> Thanks for the response, I found that the unit used for SO2 is DU how do I derive this in code? This is my base SO2 code: product = harp.import\_product(r"/Users/jpoetzscher/Downloads/SO2 OCT 1/\*.nc", operations=‘SO2\_column\_number\_density\_validity\>50;keep(latitude\_bounds,longitude\_bounds,SO2\_column\_number\_density);bin\_spatial(1801,-90,0.1,3601,-180,0.1);derive(SO2\_column\_number\_density [DU])’, post\_operations=“bin();squash(time, (latitude\_bounds,longitude\_bounds));derive(latitude {latitude});de…

I tried to axis variables that are independent of the time axis (code2) and used post\_operations=“bin();squash(time, (latitude,longitude))” as it is mentioned in the instructions. But in this case, I get an error message in the Anaconda Powershell Prompt “ERROR: syntax error, unexpected $undefined”.

I will be very grateful if someone can help me to solve this problem and write the correct code.

code 1

(base) PS C:\> harpmerge -a ‘latitude \> 29 [degree\_north]; latitude \< 37.7 [degree\_north]; longitude \> 38 [degree\_east]; longitude \< 48.5 [degree\_east]; absorbing\_aerosol\_index\_validity\>80; bin\_spatial(180, 29, 0.1, 280, 38, 0.1); derive(longitude {longitude});derive(latitude {latitude})’ \Users\Layali\data\AAI\July\Originol .\Users\Layali\data\AAI\July\Processing\Monthlyavg\July\_avg.nc

code 2

(base) PS C:\> harpmerge -a ‘latitude \> 29 [degree\_north]; latitude \< 37.7 [degree\_north]; longitude \> 38 [degree\_east]; longitude \< 48.5 [degree\_east]; absorbing\_aerosol\_index\_validity\>80; bin\_spatial(180, 29, 0.1, 280, 38, 0.1); post\_operations=“bin();squash(time,(latitude,longitude))”; derive(longitude {longitude});derive(latitude {latitude})’ \Users\Layali\Layali\data\AAI\July\Originol .\Users\Layali\data\AAI\July\Processing\Monthlyavg\July\_avg.nc

---

<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 5, 2020, 10:40am UTC](https://forum.atmospherictoolbox.org/t/problem-in-exporting-data-to-panoply/191/2 "2020-08-05T10:40:56Z")

</div>

You need to use the `-ap` option instead of including a post\_operations setting inside an operation string. e.g.

harpmerge -a ‘latitude \> 29 [degree\_north]; latitude \< 37.7 [degree\_north]; longitude \> 38 [degree\_east]; longitude \< 48.5 [degree\_east]; absorbing\_aerosol\_index\_validity\>80; bin\_spatial(180, 29, 0.1, 280, 38, 0.1); derive(longitude {longitude});derive(latitude {latitude})’ -ap ‘bin();squash(time,(latitude,longitude))’ \Users\Layali\Layali\data\AAI\July\Originol .\Users\Layali\data\AAI\July\Processing\Monthlyavg\July\_avg.nc
