About Monthly average of OMI NO2

I’m Jorge and i want to merge, regrid and average all the NO2 retrievals of october 2004 around the city i live. The problem is when i make it I get a 3d array when i should get 2d array. This is the code I made with jupyter:

filename_omi = r"OMNO2_2004_Oct\OMI-Aura_L2-OMNO2_2004m10*.he5"

These are my operations:
operations_omi = “;”.join([
“validity !& 1”,
“derive(tropospheric_NO2_column_number_density [Pmolec/cm2])”,
“derive (latitude{latitude})”,
“derive (longitude{longitude})”,

and my reduced_operations

reduced_operations = “squash(time, (latitude, longitude, latitude_bounds, longitude_bounds))” ; “bin()”

omi_NO2 = harp.import_product(filename_omi,operations_omi,reduce_operations = reduced_operations)

and i get this array when I prompt : omi_NO2.tropospheric_NO2_column_number_density
dimension = {time=29, latitude=6, longitude=8}

Thank you very much

This is wrong. You probably meant: reduced_operations = "squash(time, (latitude, longitude, latitude_bounds, longitude_bounds));bin()" (i.e. the ; should be within the double quoted part)

1 Like

I see thank you very much for that. I did not realize about the ; out of the quoted part.
But there is another error when i run the harp.import_product part with the right reduced_operations
I get:
"products don’t both have variable ‘count’ ". I’m working with OMI products
Do I have to do something before the harp.import?

Thanks again

In your keep() operation you should also keep all count and weight variables. Those should only be thrown away at the end if you don’t need them anymore (i.e. have the more restricted keep() inside the post_operations argument).