Skip to content

Commit

Permalink
updated python test 3
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjamesgarza committed Apr 4, 2024
1 parent c849c6f commit 1facdae
Show file tree
Hide file tree
Showing 4 changed files with 1,105 additions and 1,053 deletions.
1 change: 1 addition & 0 deletions src/box_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ def solve(self, path_to_output = None):
rate_constant_ordering = musica.user_defined_reaction_rates(self.solver)
species_constant_ordering = musica.species_ordering(self.solver)

#adds species headers to output
ordered_species_headers = [k for k, v in sorted(species_constant_ordering.items(), key=lambda item: item[1])]
for spec in ordered_species_headers:
headers.append("CONC." + spec)
Expand Down
73 changes: 62 additions & 11 deletions src/configs/test_config_3/camp_data/reactions.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,22 @@
"O2": {
"yield": 2
},
"irr__228bcf53-cf76-46cb-b952-68a76a044353": {
"irr__071b97cd-d37e-41e1-9ff1-308e3179f910": {
"yield": 1
}
}
},
{
"type": "PHOTOLYSIS",
"MUSICA name": "O2_1",
"reactants": {
"O2": {}
},
"products": {
"O": {
"yield": 2
},
"irr__17773fe3-c1f6-4015-87e2-f20278517a59": {
"yield": 1
}
}
Expand Down Expand Up @@ -53,61 +68,97 @@
"M": {
"yield": 1
},
"irr__2f09b69b-d831-453a-9d3d-716c6df06d9b": {
"irr__1fce6ca9-960d-4ef9-9435-b5e4ef3f1534": {
"yield": 1
}
}
},
{
"type": "PHOTOLYSIS",
"MUSICA name": "O3_1",
"reactants": {
"O3": {}
},
"products": {
"O1D": {
"yield": 1
},
"O2": {
"yield": 1
},
"irr__427192a6-365c-4d22-9174-8ad91126afab": {
"yield": 1
}
}
},
{
"type": "ARRHENIUS",
"A": 2.15e-11,
"Ea": -1.518e-21,
"A": 3.3e-11,
"Ea": -7.59e-22,
"B": 0,
"D": 300,
"E": 0,
"reactants": {
"O1D": {
"qty": 1
},
"N2": {
"O2": {
"qty": 1
}
},
"products": {
"O": {
"yield": 1
},
"N2": {
"O2": {
"yield": 1
},
"irr__bddff497-90b2-4af9-9b1d-39cb2bc5ea39": {
"irr__93f71f99-b360-451d-b698-cc7f7cfe061b": {
"yield": 1
}
}
},
{
"type": "ARRHENIUS",
"A": 3.3e-11,
"Ea": -7.59e-22,
"A": 2.15e-11,
"Ea": -1.518e-21,
"B": 0,
"D": 300,
"E": 0,
"reactants": {
"O1D": {
"qty": 1
},
"O2": {
"N2": {
"qty": 1
}
},
"products": {
"O": {
"yield": 1
},
"N2": {
"yield": 1
},
"irr__d41171b4-5f9b-4c24-9f0c-4a5bc0041ebc": {
"yield": 1
}
}
},
{
"type": "PHOTOLYSIS",
"MUSICA name": "O3_2",
"reactants": {
"O3": {}
},
"products": {
"O": {
"yield": 1
},
"O2": {
"yield": 1
},
"irr__cf3f20f2-140d-4cb7-a99d-8a37c3c25705": {
"irr__f6bf24e9-1b52-497b-b50c-74eaccc28120": {
"yield": 1
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/configs/test_config_3/camp_data/species.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"camp-data": [{"name": "M", "type": "CHEM_SPEC", "tracer type": "CONSTANT"}, {"name": "Ar", "type": "CHEM_SPEC", "absolute tolerance": 1e-12}, {"name": "CO2", "type": "CHEM_SPEC", "absolute tolerance": 1e-12}, {"name": "H2O", "type": "CHEM_SPEC", "absolute tolerance": 1e-12}, {"name": "O1D", "type": "CHEM_SPEC", "absolute tolerance": 1e-12}, {"name": "O", "type": "CHEM_SPEC", "absolute tolerance": 1e-12}, {"name": "O2", "type": "CHEM_SPEC", "absolute tolerance": 1e-12}, {"name": "O3", "type": "CHEM_SPEC", "absolute tolerance": 1e-12}, {"name": "N2", "type": "CHEM_SPEC", "absolute tolerance": 1e-12}, {"name": "irr__228bcf53-cf76-46cb-b952-68a76a044353", "type": "CHEM_SPEC"}, {"name": "irr__2f09b69b-d831-453a-9d3d-716c6df06d9b", "type": "CHEM_SPEC"}, {"name": "irr__bddff497-90b2-4af9-9b1d-39cb2bc5ea39", "type": "CHEM_SPEC"}, {"name": "irr__cf3f20f2-140d-4cb7-a99d-8a37c3c25705", "type": "CHEM_SPEC"}]}
{"camp-data": [{"name": "M", "type": "CHEM_SPEC", "tracer type": "CONSTANT"}, {"name": "Ar", "type": "CHEM_SPEC", "absolute tolerance": 1e-12}, {"name": "CO2", "type": "CHEM_SPEC", "absolute tolerance": 1e-12}, {"name": "H2O", "type": "CHEM_SPEC", "absolute tolerance": 1e-12}, {"name": "O1D", "type": "CHEM_SPEC", "absolute tolerance": 1e-12}, {"name": "O", "type": "CHEM_SPEC", "absolute tolerance": 1e-12}, {"name": "O2", "type": "CHEM_SPEC", "absolute tolerance": 1e-12}, {"name": "O3", "type": "CHEM_SPEC", "absolute tolerance": 1e-12}, {"name": "N2", "type": "CHEM_SPEC", "absolute tolerance": 1e-12}, {"name": "irr__071b97cd-d37e-41e1-9ff1-308e3179f910", "type": "CHEM_SPEC"}, {"name": "irr__17773fe3-c1f6-4015-87e2-f20278517a59", "type": "CHEM_SPEC"}, {"name": "irr__1fce6ca9-960d-4ef9-9435-b5e4ef3f1534", "type": "CHEM_SPEC"}, {"name": "irr__427192a6-365c-4d22-9174-8ad91126afab", "type": "CHEM_SPEC"}, {"name": "irr__93f71f99-b360-451d-b698-cc7f7cfe061b", "type": "CHEM_SPEC"}, {"name": "irr__d41171b4-5f9b-4c24-9f0c-4a5bc0041ebc", "type": "CHEM_SPEC"}, {"name": "irr__f6bf24e9-1b52-497b-b50c-74eaccc28120", "type": "CHEM_SPEC"}]}
Loading

0 comments on commit 1facdae

Please sign in to comment.