Discussions about the HARP software: support, examples, development ideas, etc.
Hello
I want to export a NetCDF file to raster to use it on Qgis or ArcmapâŚ
File: (S5P_NRTI_L2__NO2____20191217T181608_20191217T182108_11284_01_010302_20191217T190947.nc )
Id already installed Anaconda, Visan and HARP. (Windows64)
When i open the environment with pyton and put the âharpconvert -a bin_spatialâ command but always have syntax error.
Help please!!
Note that bin_spatial is a function that requires arguments.
You will need to give the information on the target grid you want.
There is actually a whole sequence of operations that you might want to perform in order to efficiently convert the product to a file that can be used in qgis. This includes applying the quality filter, removing unneeded variables, etc.
An example convert for the file that you provided (i.e. the parameters to bin_spatial are tailored for this specific O3 file) is:
harpconvert -a 'tropospheric_NO2_column_number_density_validity>75;keep(latitude_bounds,longitude_bounds,tropospheric_NO2_column_number_density);bin_spatial(2400,-37,0.01,3300,-83,0.01);derive(tropospheric_NO2_column_number_density [Pmolec/cm2]);squash(time, (latitude_bounds,longitude_bounds));derive(latitude {latitude});derive(longitude {longitude});exclude(latitude_bounds,longitude_bounds,count,weight)' S5P_NRTI_L2__NO2____20191217T181608_20191217T182108_11284_01_010302_20191217T190947.nc o3grid.nc
If you use a different product then modify parameters to the bin_spatial function accordingly.
See also the other forum threads such as Map Sentinel 5p CH4, SO2 and CO Data (Visan) for more details.
Hello svniemeijer
Verry thank you for the explanation.
Now i can export S5P data with HARP.
I have another question: I want to export the same S5P NO2 Data with the WPLOT Visan configuration to handle on Qgis.
This configuration, same size:
Can u help me with this bin_spatial function please
Thank u for your explanation again.
Regards
I am not entirely sure what you mean. Do you mean a plot without the filtering and unit conversion?
In that case use:
harpconvert -a 'keep(latitude_bounds,longitude_bounds,tropospheric_NO2_column_number_density);bin_spatial(2400,-37,0.01,3300,-83,0.01);squash(time, (latitude_bounds,longitude_bounds));derive(latitude {latitude});derive(longitude {longitude});exclude(latitude_bounds,longitude_bounds,count,weight)' S5P_NRTI_L2__NO2____20191217T181608_20191217T182108_11284_01_010302_20191217T190947.nc o3grid.nc
Hi I need obtain puntual information about sentinel 5p, and Iâm used a similar code but I donât be what are this numbers (2400,-37,0.01,3300,-83,0.01).
You can help my.
The meaning of the values are explained in the HARP documentation for the bin_spatial operation.
The parameters are: lat_edge_length, lat_edge_offset, lat_edge_step, lon_edge_length, lon_edge_offset, and lon_edge_step.
Thanks for your explaination. but, I am still confused about these parameters. I mean, for instance, the dataset I have named âS5P_OFFL_L2__NO2____20200301T035508_20200301T053638_12340_01_010302_20200304T083242.ncâ, I do not know how to obtain or calculate these six parameters?
who can give me a hand? Many many thanks!
What is the range and resolution that you want for your latitude/longitude grid?
Hi thanks for your reply, spatial resolution is 7000m*3500m, and latitude/longitude grid? Iâm not sure, how about worldwide, sorry for this stupid question, Iâm freshman for this sensor data. how about one degree?
If you want a worldwide 1x1 degree grid then you would use bin_spatial(181,-90,1,361,-180,1)
: latitude starts at -90 with 1 degree steps (ending up after (181 - 1) steps at 90) and longitude starts at -180 with 1 degree steps (ending up after (361 - 1) steps at 180).
Hi many thanks! it works. another question, how do you know, this variable âtropospheric_NO2_column_number_densityâ, I tried gdalinfo to obtain meta data of my data, but I canât find a variable named âtropospheric_NO2_column_number_densityâ, so where could I find useful variable or what varialbe could I change to ?
I observed meta data of this ââS5P_OFFL_L2__NO2____20200301T035508_20200301T053638_12340_01_010302_20200304T083242.ncââ use gdalinfo, matlabâs function ncinfo
I also browse document of S5P named âSentinel-5P-L01B-metadata-specifications.pdfâ, âSentinel-5P-Level-2-Product-User-Manual-Nitrogen-Dioxide.pdfâ, âSentinel-5P-Nitrogen-Dioxide-Level-2-Product-Readme-File.pdfâ
while, I can not find a variable named âtropospheric_NO2_column_number_densityâ, so why it is ââtropospheric_NO2_column_number_densityââ here?
Kind regards,
HARP actually performs a conversion of the S5P data to make everything more harmonised (and so it becomes easier to compare against other atmospheric data instruments).
The full mapping of the conversion that HARP performs can be found in the documentation. For S5P NO2 it is the Mapping description section of this page.
Thank you for your response. I was downloaded NO2 data over India region having West=67 degree, East= 98 degree, South= 5.0 degree and North=38.0 degree. The dataset is âS5P_OFFL_L2__NO2____20181101T054736_20181101T072905_05446_01_010200_20181107T073552.ncâ. what will be the bin_spatial() six parameters if I will have to draw a map over this coordinates.
Thanks
For NO2 a 0.02 degree resolution would be ok. You would then use (38-5)/0.02 + 1 = 1651 latitude edge points and (98-67)/0.02 + 1 = 1551 longitude edge points: bin_spatial(1651, 5, 0.02, 1551, 67, 0.02)