I've used these steps below to extract the subdataset of Sentinel-5P netCDF file:

First, extract the **latitude** and **longitude** variables as **geolocation arrays**

    gdal_translate -of VRT HDF5:"S5P_OFFL_L2__AER_AI_20190101T013729_20190101T031859_06309_01_010202_20190107T010005.nc"://PRODUCT/latitude lat.vrt
    gdal_translate -of VRT HDF5:"S5P_OFFL_L2__AER_AI_20190101T013729_20190101T031859_06309_01_010202_20190107T010005.nc"://PRODUCT/longitude lon.vrt

And create a customized VRT file for a subdataset

    <VRTDataset rasterXSize="450" rasterYSize="3245">
 <metadata domain="GEOLOCATION">
 <mdi key="X_DATASET">lon.vrt</mdi>
 <mdi key="X_BAND">1</mdi>
 <mdi key="Y_DATASET">lat.vrt</mdi>
 <mdi key="Y_BAND">1</mdi>
 <mdi key="PIXEL_OFFSET">0</mdi>
 <mdi key="LINE_OFFSET">0</mdi>
 <mdi key="PIXEL_STEP">1</mdi>
 <mdi key="LINE_STEP">1</mdi>
 </metadata> 

   <VRTRasterBand dataType="Float32" band="1">

    <SimpleSource>
      <SourceFilename relativeToVRT="1">HDF5:S5P_OFFL_L2__AER_AI_20190101T013729_20190101T031859_06309_01_010202_20190107T010005.nc://PRODUCT/aerosol_index_340_380</SourceFilename>
      <SourceBand>1</SourceBand>
      <SourceProperties RasterXSize="450" RasterYSize="3245" DataType="Float32"/>
      <SrcRect xOff="0" yOff="0" xSize="450" ySize="3245" />
      <DstRect xOff="0" yOff="0" xSize="450" ySize="3245" />
    </SimpleSource>
  </VRTRasterBand>
</VRTDataset>

Then, project the subdataset to GeoTIFF

     gdalwarp -geoloc -t_srs EPSG:4326 -srcnodata 9.96921e+36f aerosol_index_340_380.vrt aerosol_index_340_380.tif -tr 0.069 0.069 -tap


The problem is this **O3_TCL (Tropospheric Ozone)** (e.g: file name: **S5P_OFFL_L2__O3_TCL_20190101T120803_20190107T125357_06315_01_010105_20190115T235953.nc**) data doesn't have **latitude** and **longitude** variables.

Does anyone know how to process this data to GeoTiff?