Hi Sander
I am trying to derive some variables from a L2 NO2 product as shown below:
harp.import_product([‘S5P_OFFL_L2__NO2____20200706T110830_20200706T125000_14146_01_010302_20200708T040350.nc’, ‘S5P_OFFL_L2__NO2____20200706T092701_20200706T110830_14145_01_010302_20200708T020157.nc’, ‘S5P_OFFL_L2__NO2____20200706T005932_20200706T024102_14140_01_010302_20200707T172142.nc’, ‘S5P_OFFL_L2__NO2____20200707T004028_20200707T022158_14154_01_010302_20200708T165056.nc’, ‘S5P_OFFL_L2__NO2____20200707T090756_20200707T104926_14159_01_010302_20200709T013018.nc’,‘S5P_OFFL_L2__NO2____20200707T104926_20200707T123056_14160_01_010302_20200709T034441.nc’], operations=“tropospheric_NO2_column_number_density_validity > 75;derive(NO2_column_number_density[Pmolec/cm2]);derive(NO2_column_number_density_uncertainty[Pmolec/cm2]);derive(NO2_slant_column_number_density[Pmolec/cm2]);derive(NO2_slant_column_number_density_uncertainty[Pmolec/cm2]);derive(tropospheric_NO2_column_number_density[Pmolec/cm2]);derive(tropospheric_NO2_column_number_density_uncertainty[Pmolec/cm2]);derive(stratospheric_NO2_column_number_density[Pmolec/cm2]); derive(stratospheric_NO2_column_number_density_uncertainty[Pmolec/cm2]);keep(tropospheric_NO2_column_number_density,tropospheric_NO2_column_number_density_uncertainty,tropospheric_NO2_column_number_density_validity,tropospheric_NO2_column_number_density_amf,NO2_column_number_density,NO2_column_number_density_uncertainty,NO2_column_number_density_amf,cloud_fraction,absorbing_aerosol_index,cloud_albedo,cloud_pressure,surface_albedo,surface_altitude,surface_altitude_uncertainty,surface_pressure,surface_meridional_wind_velocity,surface_zonal_wind_velocity,NO2_column_number_density,tropospheric_NO2_column_number_density, stratospheric_NO2_column_number_density,NO2_slant_column_number_density, tropopause_pressure,absorbing_aerosol_index,cloud_fraction, sensor_altitude,sensor_azimuth_angle, sensor_zenith_angle,solar_azimuth_angle,solar_zenith_angle, latitude, longitude);bin_spatial(1975,38.025,0.01,2355,11.815,0.01);derive(longitude{longitude});derive(latitude{latitude});;keep(latitude,longitude,solar_zenith_angle,sensor_zenith_angle,NO2_column_number_density,tropospheric_NO2_column_number_density,stratospheric_NO2_column_number_density,NO2_column_number_density_uncertainty,tropospheric_NO2_column_number_density_uncertainty,stratospheric_NO2_column_number_density_uncertainty,cloud_fraction,cloud_pressure, orbit_index,NO2_slant_column_number_density,NO2_slant_column_number_density_uncertainty)”, post_operations=“bin()”)
When I run this I get this error:
CLibraryError: cannot keep non-existent variable NO2_column_number_density_uncertainty
I am not sure if I’m doing it correctly or not and if the order of the derive functions are correct or not. Could you please advise?
Also, all the examples I’ve seen are deriving NO2 values in [Pmolec/cm2] but I need it molec/m2. Based on the harp documentation I tried this with both [mol/m^2] as well as [molec/m2] but neither worked. How can I do this?
Really appreciate your help.
Thanks!