AirChem / F0AM

Framework for 0-D Atmospheric Modeling
GNU General Public License v3.0
62 stars 23 forks source link

Output of running xx_Chamber.m #20

Closed zyh929 closed 1 year ago

zyh929 commented 1 year ago

Hello I have run the MCM_Chamber.m (modified according to ExampleSetup_Chamber.m) for the simulation of atmospheric photochemical reaction process with no constrains. When using different chemical mechanisms, the number of the same species concentration output are different (e.g. when using MCM, S.Conc.HNO3: 241×1 double, when using CB05, S.Conc.HNO3: 194×1 double). I was wondering whether the number of S.Conc.xx can be modified. In F0AM paper "The Framework for 0-D Atmospheric Modeling (F0AM) v3.1", it says In the second paragraph of part “2 Model description” that “MATLAB is a higher-level language than FORTRAN and can be less computationally efficient; however, it is easier to learn for researchers with little programming experience and is used extensively by the experimental community”. But it took 24 seconds to run a 3-hours simulation by runing MCM_Chamber.m, while it takes 15 hours to run a 3-hours simulation by AtChem(FORTRAN) on HPC. Speed of F0AM is so fast! I was wondering what causes the large difference in simulation speed between F0AM and AtChem. Thank you very much for your kind consideration. Not sure what I am doing wrong, any assistance would be appreciated, or just fyi.

gmwolfe commented 1 year ago

Hello,

Would it be possible for you to post this question on the user forum? I think others would be interested in the answer, and I prefer to keep model communications in a public area.

https://groups.google.com/g/f0amusers

The short answer to your first question is that the number of outputs with ModelOptions.EndPointsOnly = 0 will vary because the ode15s solver adjusts its internal timestep based on the stiffness of the differential equations. MCM has more reactions and includes a lot of very fast reactions, whereas CB05 is condensed. So, MCM is a stiffer set of equations (larger range in reaction rates).

I haven't used AtChem, but I can tell you that it is possible to make F0AM run very slow with the introduction of a typo. Order-of-magnitude errors in rate coefficients or initial conditions are the usual culprit.

Thank you,

Glenn M. Wolfe NASA Goddard Space Flight Center Atmospheric Chemistry and Dynamics Laboratory Office: 301.614.6008 Lab: 301.614.6925 @.**@.> | https://sites.google.com/site/wolfegm/

From: zyh929 @.> Sent: Sunday, September 25, 2022 12:47 AM To: AirChem/F0AM @.> Cc: Subscribed @.***> Subject: [EXTERNAL] [AirChem/F0AM] Output of running xx_Chamber.m (Issue #20)

Hello I have run the MCM_Chamber.m (modified according to ExampleSetup_Chamber.m) for the simulation of atmospheric photochemical reaction process with no constrains. When using different chemical mechanisms, the number of the same species concentration output are different (e.g. when using MCM, S.Conc.HNO3: 241×1 double, when using CB05, S.Conc.HNO3: 194×1 double). I was wondering whether the number of S.Conc.xx can be modified. In F0AM paper "The Framework for 0-D Atmospheric Modeling (F0AM) v3.1", it says In the second paragraph of part "2 Model description" that "MATLAB is a higher-level language than FORTRAN and can be less computationally efficient; however, it is easier to learn for researchers with little programming experience and is used extensively by the experimental community". But it took 24 seconds to run a 3-hours simulation by runing MCM_Chamber.m, while it takes 15 hours to run a 3-hours simulation by AtChem(FORTRAN) on HPC. Speed of F0AM is so fast! I was wondering what causes the large difference in simulation speed between F0AM and AtChem. Thank you very much for your kind consideration. Not sure what I am doing wrong, any assistance would be appreciated, or just fyi.

- Reply to this email directly, view it on GitHubhttps://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAirChem%2FF0AM%2Fissues%2F20&data=05%7C01%7Cglenn.m.wolfe%40nasa.gov%7Cc0b718fb3cb84946fd2708da9eb0ed1d%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637996779988723609%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=P13W5sA8lhICtYQ6ixEnTf7RuFfCG9nOLo6CzPkKbLc%3D&reserved=0, or unsubscribehttps://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKADQAFI4E33JKBH37WKM7LV77KKRANCNFSM6AAAAAAQU5T67Q&data=05%7C01%7Cglenn.m.wolfe%40nasa.gov%7Cc0b718fb3cb84946fd2708da9eb0ed1d%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637996779988723609%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=GChZxrFy5x6FtYgiOWhM9%2BfMzbjDbeAOP8OJ2H45bQM%3D&reserved=0. You are receiving this because you are subscribed to this thread.Message ID: @.***>