-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #255 from NCAR/config_parser
Config parser
- Loading branch information
Showing
7 changed files
with
244 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"camp-files": ["camp_species.json", "camp_mechanism.json", "other.json"]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"wrong-key": ["camp_species.json", "camp_mechanism.json"]} |
134 changes: 134 additions & 0 deletions
134
test/unit/unit_configs/CAMP/camp_valid/camp_mechanism.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
{ | ||
"camp-data" : [ | ||
{ | ||
"name" : "Chapman", | ||
"type" : "MECHANISM", | ||
"reactions" : [ | ||
{ | ||
"type" : "PHOTOLYSIS", | ||
"reactants" : { | ||
"O2" : { } | ||
}, | ||
"products" : { | ||
"O" : { "yield" : 2.0 } | ||
}, | ||
"MUSICA name" : "O2_1" | ||
}, | ||
{ | ||
"type" : "PHOTOLYSIS", | ||
"reactants" : { | ||
"O3" : { } | ||
}, | ||
"products" : { | ||
"O1D" : { }, | ||
"O2" : { } | ||
}, | ||
"MUSICA name" : "O3_1" | ||
}, | ||
{ | ||
"type" : "PHOTOLYSIS", | ||
"reactants" : { | ||
"O3" : { } | ||
}, | ||
"products" : { | ||
"O" : { }, | ||
"O2" : { } | ||
}, | ||
"MUSICA name" : "O3_2" | ||
}, | ||
{ | ||
"type" : "ARRHENIUS", | ||
"reactants" : { | ||
"O1D" : { }, | ||
"N2" : { } | ||
}, | ||
"products" : { | ||
"O" : { }, | ||
"N2" : { } | ||
}, | ||
"A" : 2.15e-11, | ||
"C" : 110.0 | ||
}, | ||
{ | ||
"type" : "ARRHENIUS", | ||
"reactants" : { | ||
"O1D" : { }, | ||
"O2" : { } | ||
}, | ||
"products" : { | ||
"O" : { }, | ||
"O2" : { } | ||
}, | ||
"A" : 3.3e-11, | ||
"C" : 55.0 | ||
}, | ||
{ | ||
"type" : "ARRHENIUS", | ||
"reactants" : { | ||
"O" : { }, | ||
"O3" : { } | ||
}, | ||
"products" : { | ||
"O2" : { "yield" : 2.0 } | ||
}, | ||
"A" : 8.0e-12, | ||
"C" : -2060.00 | ||
}, | ||
{ | ||
"type" : "ARRHENIUS", | ||
"reactants" : { | ||
"O" : { }, | ||
"O2" : { }, | ||
"M" : { } | ||
}, | ||
"products" : { | ||
"O3" : { }, | ||
"M" : { } | ||
}, | ||
"A" : 6.0e-34, | ||
"B" : 2.4 | ||
}, | ||
{ | ||
"type" : "EMISSION", | ||
"species" : "O1D", | ||
"MUSICA name" : "O1D" | ||
}, | ||
{ | ||
"type" : "EMISSION", | ||
"species" : "O", | ||
"MUSICA name" : "O" | ||
}, | ||
{ | ||
"type" : "EMISSION", | ||
"species" : "O3", | ||
"MUSICA name" : "O3" | ||
}, | ||
{ | ||
"type" : "FIRST_ORDER_LOSS", | ||
"species" : "N2", | ||
"MUSICA name" : "N2" | ||
}, | ||
{ | ||
"type" : "FIRST_ORDER_LOSS", | ||
"species" : "O2", | ||
"MUSICA name" : "O2" | ||
}, | ||
{ | ||
"type" : "FIRST_ORDER_LOSS", | ||
"species" : "CO2", | ||
"MUSICA name" : "CO2" | ||
}, | ||
{ | ||
"type" : "FIRST_ORDER_LOSS", | ||
"species" : "Ar", | ||
"MUSICA name" : "Ar" | ||
}, | ||
{ | ||
"type" : "FIRST_ORDER_LOSS", | ||
"species" : "H2O", | ||
"MUSICA name" : "H2O" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"camp-data" : [ | ||
{ | ||
"type" : "RELATIVE_TOLERANCE", | ||
"value" : 1.0e-4 | ||
}, | ||
{ | ||
"name" : "M", | ||
"type" : "CHEM_SPEC", | ||
"tracer type" : "CONSTANT" | ||
}, | ||
{ | ||
"name" : "Ar", | ||
"type" : "CHEM_SPEC", | ||
"absolute tolerance" : 1.0e-12 | ||
}, | ||
{ | ||
"name" : "CO2", | ||
"type" : "CHEM_SPEC", | ||
"absolute tolerance" : 1.0e-12 | ||
}, | ||
{ | ||
"name" : "H2O", | ||
"type" : "CHEM_SPEC", | ||
"absolute tolerance" : 1.0e-12 | ||
}, | ||
{ | ||
"name" : "N2", | ||
"type" : "CHEM_SPEC", | ||
"absolute tolerance" : 1.0e-12 | ||
}, | ||
{ | ||
"name" : "O1D", | ||
"type" : "CHEM_SPEC", | ||
"absolute tolerance" : 1.0e-12 | ||
}, | ||
{ | ||
"name" : "O", | ||
"type" : "CHEM_SPEC", | ||
"absolute tolerance" : 1.0e-12 | ||
}, | ||
{ | ||
"name" : "O2", | ||
"type" : "CHEM_SPEC", | ||
"absolute tolerance" : 1.0e-12 | ||
}, | ||
{ | ||
"name" : "O3", | ||
"type" : "CHEM_SPEC", | ||
"absolute tolerance" : 1.0e-12 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"camp-files": ["camp_species.json", "camp_mechanism.json"]} |