geoschem / geos-chem

GEOS-Chem "Science Codebase" repository. Contains GEOS-Chem science routines, run directory generation scripts, and interface code. This repository is used as a submodule within the GCClassic and GCHP wrappers, as well as in other modeling contexts (external ESMs).
http://geos-chem.org
Other
167 stars 163 forks source link

[BUG/ISSUE] Units of VOCs in output files #414

Closed msulprizio closed 4 years ago

msulprizio commented 4 years ago

Mat Evans wrote:

We are looking at VOC concentrations around the world and testing different emissions inventories. The plot for ethane below shows the Tzompa (in red) and the CEDS inventory (in green) being used. We have divided the emission by 2 and the the Tzompa inventory looks better than the CEDS inventory. If we don’t divide by 2 the Tzompa inventory looks massively high and the CEDS inventory looks much better. Similarly for the Propane we’ve divided by 3 we get good agreement. If we don’t do that we over estimate in the model.

The output in the model’s netCDF says that they are in v/v but it looks to use like these species are in vC/v (ppbCv)

We’ve been looking through the code and the unit conversation appear to all be using EmWg rather than MW_g. If no EmWG is specified the model reverts to the MW_g. But I think this means that the output for the VOCs in vC/v rather than v/v which is what the units say.

So I think in the conversion SUBROUTINE ConvertSpc_KgKgDry_to_VVDry( State_Chm, State_Grid, RC )

There is this: State_Chm%Species(I,J,L,N) = State_Chm%Species(I,J,L,N) * MwRatio

With MW_g = State_Chm%SpcData(N)%Info%emMW_g, which is fine if the output is vC/v but would seem wrong for v/v (mixing ratio).

There might be a hidden division MolecRatio somewhere else in the code as there is in ConvertSpc_KgKgDry_to_MND

State_Chm%Species(I,J,L,N) = State_Chm%Species(I,J,L,N) * State_Met%AIRDEN(I,J,L) * ( AVO / MW_kg ) / ( 1e+6_fp * MolecRatio )

But we can’t find it for the standard conversion to mixing ratio for the speciesConc diagnostic. This obviously has quite an impact for these species. Especially something like isoprene where we might be off by a factor of 5.

Could somebody take a look and check to see what whether we should be doing the division or not?

multisite_ethane_2 multisite_propane_3

msulprizio commented 4 years ago

I believe the issue here is in a typo in the units of output in the species concentration netCDF file. For VOCs, the units of the SpeciesConc collection in the netCDF file should be volume carbon/volume dry air (vC/v, or molC/mol).

VOCs in GEOS-Chem have historically been carried as carbons with molecular weight of 12.0 g/mol. When we introduced the species database, we added a field MW_g which holds the actual species molecular weight. The idea was that we'd eventually use the actual species molecular weights instead of carbon-based units. For non-VOC species, emMW_g = MW_g. The molecular weight used by GEOS-Chem is stored in emMW_g .(I agree this name can be confusing because it implies MW used for emissions only.)

Following the unit conversions for VOCs:

The use of carbon-based units has long been a source of confusion. We will be removing them in 13.0.0 as described in feature request https://github.com/geoschem/geos-chem/issues/309. At that time, units of all species in the SpeciesConc netCDF output will truly be v/v.

mje1398 commented 4 years ago

So just to confirm @msulprizio, in the current versions of the model, for species in the model database where the emMW_g=12 we should interpret the unit as vC/v rather than v/v?

If that's the case we should probably alert people to this directly? Has this been the case since we moved to netCDF diagnostics?

msulprizio commented 4 years ago

Yes, the units for carbon-based species should be interpreted as vC/v and not v(species)/v(dry air). It looks like when we converted to netCDF output and GCPy for plotting instead of BPCH output and GAMAP for plotting, carbon got dropped from the units for VOCs in the output. I confirmed the BPCH output used to output those species in units ppbC. Here is the GEOS-Chem 12.5.0 benchmark output as viewed in GAMAP:

      CATEGORY ILUN  TRCNAME    TRC            UNIT      TAU0 DATE        DIMENSIONS
   1 : IJ-AVG-$   20       NO      1            ppbv 276096.00 2016070100   72  46  72
   2 : IJ-AVG-$   20       O3      2            ppbv 276096.00 2016070100   72  46  72
       ...
  19 : IJ-AVG-$   20     C3H8     19            ppbC 276096.00 2016070100   72  46  72
  21 : IJ-AVG-$   20     C2H6     21            ppbC 276096.00 2016070100   72  46  72

Screen Shot 2020-08-26 at 12 22 14 PM

When we switched to netCDF for GEOS-Chem output and Python for benchmark plotting, the values of species concentrations stayed the same, but C was dropped from the units string. When we did the conversion from BPCH to netCDF, our goal was to reproduce the BPCH values. We did not want to change units at the time because that would further complicate the BPCH to netCDF comparisons. From the GEOS-Chem 12.5.0 validation of netCDF diagnostics against BPCH diagnostics:

Screen Shot 2020-08-26 at 11 01 09 AM

@lizziel looked into the handling of BPCH input via the xbpch package in Python and found there's the added complication that using python with bpch seems to also rename the units to simply "ppb", meaning anyone using that package may also misinterpret the units of those species. She wrote:

It appears that carbon-based units, e.g. ppbC, are renamed to be non-carbon-based units, e.g. ppb, for CF-compliance upon bpch read. However, the values do not appear to be scaled in this conversion.

For reference:

We can send an email to the user community. Anyone using netCDF output from GEOS-Chem and/or using BPCH output in Python via the xbpch package should be aware of this. As mentioned above, carbon-based units will be retired in GEOS-Chem 13.0.0 so this should be resolved in future versions.

mje1398 commented 4 years ago

I think we should send an e-mail to the user community. I don't think people are aware of this and it might have significant impacts on research.

lizziel commented 4 years ago

We completely agree. @msulprizio will draft something.

msulprizio commented 4 years ago

Here is a copy of the email I sent to the comminuty:

Dear GEOS-Chem users,

We’re writing to clear up some confusion about species with carbon-based units in GEOS-Chem. For historical reasons, some hydrocarbon species have been carried in equivalent carbon atoms. For those species, the molecular weight of carbon (12 g/mol) has been used throughout GEOS-Chem. The relevant species are listed in the table at the end of this email with their properties as currently found in the GEOS-Chem species database.

Users should be aware that species concentrations output by GEOS-Chem in netCDF format should be interpreted as mol C / mol dry air (or vC/v) for the species carried as carbon atoms. This impacts species concentrations saved out via HISTORY.rc (diagnostics and restart file). It reflects a typo in the unit strings for those species that goes back to the introduction of the netCDF diagnostics in GEOS-Chem v11-02.

This issue has persisted in part by our switch from IDL/GAMAP to python/GCPy for data analysis and benchmarking. We recently discovered that the xbpch python package renames carbon-based unit strings (e.g. “ppbC”) to not include the carbon (e.g. “ppb”) without converting values. Meanwhile the GCPy package does not include handling of carbon-based units at all because neither the GEOS-Chem netCDF files nor the python containers for the BPCH data included them. This has enabled the incorrect units for hydrocarbon species concentrations in the netCDF files to persist despite validation against binary output.

If you are using BPCH output and processing via IDL or GAMAP then you are not impacted as units are properly reflected as ppbC for those species. If, however, you are reading BPCH output into python via the xbpch package or if you are using GEOS-Chem netCDF output, with GCPy or any other data analysis package, then hydrocarbon species concentrations should be interpreted as carbon atoms. This also applies to GEOS-Chem benchmark plots for versions 12.3.0-12.9.0, where units listed as ppb should be interpreted as ppbC for the species listed below.

Thanks to Mat Evans and his group for pointing out the unit string issue in the netCDF files. Please see this Github issue for the complete discussion. If you have any further questions, you may join the discussion there or create your own Github issue. Also note that in GEOS-Chem 13.0.0 we will be removing carbon-based units to avoid this confusion in the future. This version is currently in development and will be made available this fall.

Best regards, The GEOS-Chem Support Team

xpye98 commented 4 years ago

Hi, all For some VOC species, like LIMO, there is no emMW_g in species_database.yml, and in tracerinfo.dat, the unit is set to ppb not ppbc. So, for this case, we don't need to convert the unit, right? Thanks

msulprizio commented 4 years ago

That is correct. Species like LIMO, MTPA, etc. are not carried in units carbon and don't need to be converted.

xpye98 commented 3 years ago

That is correct. Species like LIMO, MTPA, etc. are not carried in units carbon and don't need to be converted.

Is the unit of VOCs in HEMCO_diagnostic output correct? It's kg/m2/s now, but it seems to be kgC/m2/s.

msulprizio commented 3 years ago

That is also correct. In the HEMCO diagnostic output, units of VOCs is kgC/m2/s even if the output file and HEMCO_Diagn.rc specify kg/m2/s.

This has been fixed in 13.0.0 (currently undergoing benchmarking) with the removal of carbon-based units from both GEOS-Chem and HEMCO. With those updates, HEMCO diagnostic output will always be in kg species/m2/s.