The CH4 file contains the CH4_column_volume_mixing_ratio_dry_air in ppb. Can this be transformed into a CH4_column_number density in mol/m2? I tried the operation, using derive, but it didn’t work and something tells me that harp is expecting to read CH4_column_volume_mixing_ratio and not CH4_column_volume_mixing_ratio_dry_air.
Can I use the dry_air_column_number_density to convert? I’ll just have to sum it first, since this is a profile, right?
Note that the Algorithms documentation of HARP shows you how variables can be derived from inputs (it works only one-way). We did have algorithms that can derive column vmr from column number density but we didn’t have ones that produced column nd from column vmr.
We just committed a change that introduces these missing conversions (and these will be included in the next official HARP release). The online documentation already shows these new derivations.
What is also useful to know is that running harpdump --list-derivations on a product will show you which variables HARP is able to generate based on the content of the product itself (and how it will do this).
If you expect that some variable should be able to be derived, but isn’t in the list, then please raise a request on this forum and we will see whether we can have this added.
I am updating my old IDL ingestion routines for S5P CH4. I note that now the derivation for CH4_column_number_density from CH4_volume_mixing_ratio_dry_air is included in harp 1.14, which is excellent.
See also the documentation on the derive operation. You will need to add the dimensions that you want in order for HARP to calculate the variable from other inputs. When you use derive(CH4_column_number_density {time,vertical} [molec/m2]) you will get a partial column density profile and if you use derive(CH4_column_number_density {time} [molec/m2]) you will get total (=integrated) columns. So there is no need to do integration yourself.
I found this post by chance and it happens that I find very useful to transform CH4 ppbv from L2 S5P data into CH4 mol/m2. Reading your answers, I need the dry_air_column_number_density, but this variable is not provided in the CH4 L2 files, as far as I could check. Is that correct?
I’m new using S5P L2 data and also new in the HARP package.
The dry air column is available and HARP already ingests it. You can find the mapping for the L2 CH4 product in the documentation.
You can immediately get the column number density by using e.g. product = harp.import_product("S5P_OFFL_L2__CH4____20181128T122504_20181128T140634_05833_01_010202_20181205T132750.nc", "derive(CH4_column_number_density {time} [mol/m2])")
It is quite straightforward. Thank you. Although the output has different arrangement for dimensions. It seems that “time” dimension “absorbs” scanline/ground_pixel dimensions. Is this something than can be handled with HARP by any chance? preserve input dataset dimensions, I mean.
When you perform per-pixel filtering (which you should if you apply the recommended quality filtering) then you won’t have a grid anymore. You can however still figure out the position of each pixel in the satellite viewing grid based on the datetime_start and scan_subindex variable values. All pixels with the same datetime_start are in the same row, and all pixels with the same scan_subindex are in the same column.