Fix formatting of mass & emission tables; add mass table option to 1-year TransportTracers benchmarks #238
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Name and Institution (Required)
Name: Bob Yantosca
Institution: Harvard + GCST
Confirm you have reviewed the following documentation
Describe the update
This fixes the problem in the mass table output described by @msulprizio in #237. This was most apparent in the TransportTracers benchmarks, where underflow was causing several entries to show up as zero even though they were very small numbers.
This PR adds the following features:
format_number_for_table
, which generates a format string for numbers used in mass table and emission table output. If the number is larger or smaller than supplied thresholds, it will be printed in scientific notation instead of floating-point notation._
character. This will ensure that certain species names (such as TransportTracers speciesCO_25
) will be printed properly.gcpy/benchmark/config/1yr_tt_benchmark.yml
configuration file.gcpy/benchmark/modules/run_1yr_tt_benchmark.py
.Expected changes
Mass table output with very small & very large numbers now looks like this (e.g. the TransportTracers mass table):
Related Github Issues: