Skip to content

Commit

Permalink
Merge pull request #433 from NCAR/develop-update-chapman
Browse files Browse the repository at this point in the history
Update chapman conditions and model runner status
  • Loading branch information
K20shores committed Aug 28, 2024
2 parents 1a400b3 + a352d68 commit a4e7867
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
27 changes: 18 additions & 9 deletions interactive/api/static/examples/CHAPMAN/my_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,41 @@
"box model options": {
"grid": "box",
"chemistry time step [min]": 1.0,
"output time step [sec]": 200.0,
"simulation length [day]": 5.0
"output time step [min]": 1.0,
"simulation length [day]": 3.0
},
"chemical species": {
"Ar": {
"initial value [mol m-3]": 0.0334
"initial value [mol m-3]": 7.71e-3
},
"CO2": {
"initial value [mol m-3]": 0.00146
"initial value [mol m-3]": 3.08e-4
},
"H2O": {
"initial value [mol m-3]": 1.19e-05
"initial value [mol m-3]": 2.31e-2
},
"O": {
"initial value [mol m-3]": 3.58e-11
},
"O1D": {
"initial value [mol m-3]": 1.83e-17
},
"O2": {
"initial value [mol m-3]": 0.75
"initial value [mol m-3]": 1.62e-1
},
"O3": {
"initial value [mol m-3]": 8.1e-06
"initial value [mol m-3]": 6.43e-6
},
"N2": {
"initial value [mol m-3]": 6.01e-1
}
},
"environmental conditions": {
"temperature": {
"initial value [K]": 206.6374207
"initial value [K]": 217.6
},
"pressure": {
"initial value [Pa]": 6152.049805
"initial value [Pa]": 1394.3
}
},
"evolving conditions": {
Expand Down
6 changes: 3 additions & 3 deletions interactive/rabbit_mq_model_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ def run_music_box(session_id):
path = get_session_path(session_id)
config_file_path = os.path.join(path, 'my_config.json')

body = {"session_id": session_id}
publish_message(route_key=RunStatus.RUNNING.value, message=body)

music_box = MusicBox()
music_box.readConditionsFromJson(config_file_path)

Expand All @@ -157,9 +160,6 @@ def run_music_box(session_id):
)
)

body = {"session_id": session_id}
publish_message(route_key=RunStatus.RUNNING.value, message=body)


def run_partmc(session_id):
from partmc_model.default_partmc import run_pypartmc_model
Expand Down

0 comments on commit a4e7867

Please sign in to comment.