Error when using harp

i am new to the use of harp, ive followed all the instructions, but it seems im doing somehing wrong cant tell what it is.
product_path = ‘C:/Users/user/Documents/AIR_POLLUTION/METHANE/’
input_files_OFFL=sorted(list(iglob(join(product_path, ‘**’, ‘OFFLCH4*.nc’),recursive=True)))
print(colored(‘CH4 OFFL products detected:’, ‘blue’), len(input_files_OFFL))

export_path =‘C:/Users/user/Documents/AIR_POLLUTION/METHANE/LEVEL_3/’
for i in input_files_OFFL:
harp_L2_L3= harp.import_product(i, operations="
CH4_column_volume_mixing_ratio_dry_air_validity<=50;
derive(CH4_column_volume_mixing_ratio_dry_air [Pmolec/cm2]);
derive (datetime_stop {time});
latitude >= 4 [degree_north] ; latitude <= 8 [degree_north] ; longitude>=2.4 [degree_east]; longitude<=11.2 [degree_east];
bin_spatial(400, 4, 0.01, 880, 2.4, 0.01);
derive(latitude {latitude}); derive(longitude {longitude});
keep(latitude_bounds,longitude_bounds,CH4_column_volume_mixing_ratio_dry_air),weight)",
post_operations=‘bin(); squash(time, (latitude,longitude)’)

export_folder= ‘{export_path}/{name}’.format(export_path=export_path, name = i.split(’/’)[-1].replace(‘L2’, ‘L3’))
harp.export_product(harp_L2_L3, export_folder, file_format=‘netcdf’)
i keep getting this error:
CLibraryError: syntax error, unexpected ‘,’, expecting $end
help will be appreciated

You have an invalid closing parenthesis after CH4_column_volume_mixing_ratio_dry_air in your keep operation.

1 Like

Thanks very much, done everything correctly it ran but I was told the product has no variable or variable without data. The sensing range was more than 20 days

The operational product does not have valid retrievals for all regions. You can have a look at the Mapping Portal for CH4 to get an indication of the coverage.

thank you so much, ive opted for carbon since my AOI have no methane products.

after the painstaking steps, ive encountered another problem, ‘permission error’

CLibraryError: Permission denied (C:/Users/user/Documents/CARBON/LEVEL_3/)
i’ve ran spyder by administrator,
ive added the path to the path manager
im still getting this error, please help. thanks