AtChem / AtChem2

Atmospheric chemistry box-model for the MCM
MIT License
58 stars 23 forks source link

New environment variable #432

Closed rs028 closed 4 years ago

rs028 commented 4 years ago

Create a new environment variable ASA (aerosol surface area). It should work in the same way as BLHEIGHT, e.g., can be NOTUSED (default), CONSTRAINED or given a fixed value, and it can be used to calculate rate coefficients. For example:

% ASA*525.068*(TEMP@0.5)*2.0D-3   :   O3   =   ;
rs028 commented 4 years ago

@spco Apart from the tests failing, which I will fix later, is this all there is to do to add a new environment variable?

spco commented 4 years ago

Looks about so from searching the codebase. You'll also need to update https://github.com/AtChem/AtChem2/blob/018cf029d879f0f353bc64d7aada9844f9ef3deb/build/mech_converter.py#L432 to match new signature, and add ASA to reservedSpeciesList at https://github.com/AtChem/AtChem2/blob/018cf029d879f0f353bc64d7aada9844f9ef3deb/build/mech_converter.py#L37 . I can't guarantee that that's everything, but looks roughly correct.

spco commented 4 years ago

Looks about so from searching the codebase. You'll also need to update https://github.com/AtChem/AtChem2/blob/018cf029d879f0f353bc64d7aada9844f9ef3deb/build/mech_converter.py#L432 to match new signature, and add ASA to reservedSpeciesList at https://github.com/AtChem/AtChem2/blob/018cf029d879f0f353bc64d7aada9844f9ef3deb/build/mech_converter.py#L37 . I can't guarantee that that's everything, but looks roughly correct.

codecov[bot] commented 4 years ago

Codecov Report

Merging #432 into master will increase coverage by 0.00%. The diff coverage is 80.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #432   +/-   ##
=======================================
  Coverage   88.72%   88.73%           
=======================================
  Files          17       17           
  Lines        2262     2264    +2     
=======================================
+ Hits         2007     2009    +2     
  Misses        255      255           
Flag Coverage Δ
#build 62.49% <80.00%> (+0.04%) :arrow_up:
#tests 87.89% <80.00%> (+0.01%) :arrow_up:
#unittests 35.73% <0.00%> (-0.04%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/inputFunctions.f90 86.31% <ø> (ø)
src/constraintFunctions.f90 81.20% <50.00%> (+0.12%) :arrow_up:
src/solverFunctions.f90 91.25% <100.00%> (+0.11%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 018cf02...3f39361. Read the comment docs.

rs028 commented 4 years ago

If there are no more comments I think this can be merged.