Skip to content

Commit

Permalink
Merge pull request #250 from NCAR/main
Browse files Browse the repository at this point in the history
v2.5.1
  • Loading branch information
K20shores authored Oct 3, 2024
2 parents e4ea340 + 2343239 commit ea86445
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 19 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ doc/latex/
data/
__pycache__/
*.pyc
dist
dist

.vscode/
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ classifiers = ["License :: OSI Approved :: Apache Software License"]
dynamic = ["version", "description"]

dependencies = [
"musica==0.8.0",
"musica==0.8.1",
"xarray",
"colorlog",
"pandas",
Expand Down
4 changes: 2 additions & 2 deletions src/acom_music_box/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"""
This is the music_box package.
An atmospheric chemistry box model. Powered by MUSICA.
This package contains modules for handling various aspects of a music box,
including species, products, reactants, reactions, and more.
"""
__version__ = "2.5.0"
__version__ = "2.5.1"

from .utils import convert_time, convert_pressure, convert_temperature, convert_concentration
from .species import Species
Expand Down
3 changes: 3 additions & 0 deletions src/acom_music_box/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
BOLTZMANN_CONSTANT = 1.380649e-23
AVOGADRO_CONSTANT = 6.02214076e23
GAS_CONSTANT = BOLTZMANN_CONSTANT * AVOGADRO_CONSTANT
16 changes: 1 addition & 15 deletions src/acom_music_box/music_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from .species_list import SpeciesList
from .reaction_list import ReactionList
from .evolving_conditions import EvolvingConditions
from .constants import GAS_CONSTANT
import json
import os
import pandas as pd
Expand Down Expand Up @@ -221,9 +222,6 @@ def solve(self, output_path=None, callback=None):
next_conditions = None

# calculate air density from the ideal gas law
BOLTZMANN_CONSTANT = 1.380649e-23
AVOGADRO_CONSTANT = 6.02214076e23
GAS_CONSTANT = BOLTZMANN_CONSTANT * AVOGADRO_CONSTANT
air_density = curr_conditions.pressure / \
(GAS_CONSTANT * curr_conditions.temperature)

Expand Down Expand Up @@ -333,18 +331,6 @@ def loadJson(self, path_to_json):
musica.micmsolver.rosenbrock,
1)

def speciesOrdering(self):
"""
Retrieves the ordering of species used in the solver.
This function calls the `species_ordering` function from the `musica` module,
passing the solver instance from the current object.
Returns:
dict: The ordered dictionary of species used in the solver.
"""
return musica.species_ordering(self.solver)

@classmethod
def order_reaction_rates(self, curr_conditions, rate_constant_ordering):
"""
Expand Down

0 comments on commit ea86445

Please sign in to comment.