Extract and save a subset region from TROPOMI L1B data into a smaller NetCDF file

Hello,

I am currently working with large TROPOMI Level-1B radiance files (.nc format), each around 3.5 GB. These files contain global data covering an entire orbit, but I only need data within a specific geographic region (filtered by latitude and longitude, e.g.) and not taking hundreds of GB of my pc…

While I can already read, subset, and plot the data for this region, I haven’t found an efficient method to actually save this regional subset into a new, smaller .nc file while including all original variables and metadata. I already have some Python code (using netcdf4 mainly) to save it with some relevant parameters, but manually iterating and copying each variable individually does not seem efficient or practical.

Could you recommend any library or tool capable of saving such a regional subset from the original TROPOMI L1B NetCDF files into a new smaller file?

Thank you very much!

I am not aware of any solution that can subset a L1b product while keeping the original format (i.e. retaining all variable and all metadata).

There is the option of using the harp tools, but then you are getting the data in HARP format and this will not retain all parameters from the original product.