Plotting L3 data with avl.Geo

Dear forum,
I am trying to use avl in a Jupyter notebook to plot L3 data on a map with a command like:
avl.Geo(l3product, varname, colorrange=(0.,6.e16))

l3product is the result of an harp.import_product command.

However, I get an error message, saying UnboundLocalError: cannot access local variable 'data_type' where it is not associated with a value plus a bunch of diagnostics that boil down to: raise Exception('invalid lat/lon/data dimensions')

According to: https://github.com/stcorp/avl-demo-lps2022/blob/main/geo2d.md, plotting of L3 should be possible. The L3 data dimensions look okay to me.

What am I missing here?

Can you let me know the content of the l3product (e.g. print(l3product)). This might be due to the existence of a time dimension.

print(l3product) shows indeed a time dimension, but of length 1, which is normal, no?

history = "2024-03-01T15:15:38Z [harp-1.20.2] harp.import_product('C:/Users/jeroenv/Data/avl/2023/06/13\\S5P_OFFL_L2__HCHO___20230613T230204_20230614T004334_29362_03_020401_20230615T150140.nc',operations='tropospheric_HCHO_column_number_density_validity>50;keep(latitude_bounds,longitude_bounds,datetime_start,datetime_length,tropospheric_HCHO_column_number_density);derive(datetime_stop {time} [days since 2000-01-01]);derive(datetime_start [days since 2000-01-01]);exclude(datetime_length);bin_spatial(361,-90,0.5,721,-180,0.5);derive(latitude {latitude});derive(longitude {longitude})',reduce_operations='squash(time, (latitude, longitude, latitude_bounds, longitude_bounds));bin()')"

double datetime_start {time=1} [days since 2000-01-01]
double tropospheric_HCHO_column_number_density {time=1, latitude=360, longitude=720} [mol/m^2]
double datetime_stop {time=1} [days since 2000-01-01]
long count {time=1}
float weight {time=1, latitude=360, longitude=720}
double latitude_bounds {latitude=360, 2} [degree_north]
double longitude_bounds {longitude=720, 2} [degree_east]
double latitude {latitude=360} [degree_north]
double longitude {longitude=720} [degree_east]

Having a time dimension for grids is still something we need to support better in AVL (specifically the length=1 case), but for now you can explicitly remove the time dimension of the grid by using the squash operation (as is already done for the lat/lon variables):

You can add a post_operations argument to your import having: squash(time, (tropospheric_HCHO_column_number_density, weight)).

Ah yes, of course. Thank you very much.