-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Air density should be passed to MICM solve function #169
Comments
The "tracer type" of the camp-data? As read from species.json? |
Yes. My suggestion would be to have the python code add a species to the The species |
Thank you @mattldawson. This approach is reminiscent of TUV-x. I will proceed. :-) |
I tried adding the M to species.json directly as a first step:
I get this error: Does musica have to know about the new "tracer type" here? |
I get farther along when I add the type: |
I have not discovered a way to pass in the M species to musica.micm_solve() as described above. Even after bypassing the Key error while setting ordered_concentrations (line 703 of music_box.py), the execution thread goes into micm_solve() and terminates the script without further information:
|
musica.micm_solve() returns without known errors if I create the M species in Python as the final step before solving:
However, there is no change in M after micm_solve(), so I must still be missing something. |
So I guess there are at least two issues. One is that we aren't seeing any useful error message, another is that we can't proceed with solving. I will try to send out a release today or tomorrow that will hopefully solve the error message problem. Then maybe that will help us move this further along |
For reference, we have a test of chapman using the python wrapper in musica which reads this configuration and there M is not marked as a third body species. So it seems we need to update our test case in musica. I will do that with the release |
We have addressed the underlying issue in micm. Once this is merged I'll get a new release (0.7.1) of musica out which should make this fix available here |
With this configuration of M in music-box/tests/configs/analytical_config/camp_data/species.json: musica.micm_solve() succeeds and passes back a solution. mySolution.csv has a column CONC.M, but that column is all zeros. Isn't MICM supposed to set the value of M based on the air_density parameter? Calculated at 44.68980861228497? |
@carl-drews my PR in #178 uses musica 0.7.3 with |
My version of musica is now fixed at 0.7.3 for music-box after fixing the pyproject.toml file. I can run chapman_config successfully with species.json including: But my solution has CONC.M = 0.0 for all time steps. Isn't MICM supposed to set that to the air density? |
It is supposed to set the air density. I think you can remove any setting of the M concentration |
I believe I had to do that in #178, though I don't really remember now |
This issue is addressed in Pull Request 186: #186 |
Resolved and merged with main branch. |
The air density [mol m-3] should be passed to the
musica.micm_solve()
function, similar to temperature and pressure. The calculation of air density should be based on the ideal gas law.Blocked by NCAR/musica#157
Acceptance Criteria
musica.micm_solve()
function at each time stepIdeas
[M]
to get the air density:music-box/src/acom_music_box/music_box.py
Lines 513 to 517 in 589377b
[M]
, change it's"tracer type"
to"THIRD_BODY_SPECIES"
in the configuration data, and let MICM set its value based on the specified air density. See here: https://github.com/NCAR/micm/blob/854ca2db7ea2a70cb72541a2436300c327e51578/test/unit/unit_configs/third_body/species.json#L7-L11The text was updated successfully, but these errors were encountered: