Problem in exporting data to Panoply

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.

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

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