nicholaswogan / photochem Goto Github PK
View Code? Open in Web Editor NEWA chemical model of planetary atmospheres
License: GNU General Public License v3.0
A chemical model of planetary atmospheres
License: GNU General Public License v3.0
Two of the callback functions in PhotochemVars
is not implemented in EvoAtmosphere
:
photochem/src/photochem_types.f90
Line 121 in 8377052
photochem/src/photochem_types.f90
Line 129 in 8377052
the j
in this line should be a k
photochem/src/photochem_common.f90
Line 193 in dbff373
photochem/src/photochem_const.f90
Line 25 in d967407
Would be cool to also include a 1-D climate model. This could be used on its own, but could also coupled in a time-dependent fashion to the photochemical model.
I could improve the relation for mean free path:
photochem/src/photochem_eqns.f90
Line 206 in 9fd679e
Instead use kinetic theory of gases (Equation 9.6, Seinfeld and Pandis (2006))
This is related to #14
I'm thinking atoms should be specified like this
atoms:
- {name: H, mass: 1, redox: - 0.5}
Then we can compute redox state of everything and check for redox conservation.
I interpolate in log space here, but never convert back to linear space:
When there are not any optical properties for a particle, a massive amount of useless data is still read in and held in memory. If we use an array of types, then we can fix this
Looks like I'm screwing up molecular diffusion. There isn't conservation of H2 the atmosphere. There is MORE escaping than is being pushed into the atmosphere from the surface.
It has something to do with the ADU
and ADL
coefficients. I know this because when I neglect molecular diffusion, then there is conservation. Need to carefully step through all of this.
all_reactions
and all_species
in photochem_input_read.f90
could be a leak.
Should be faster overall to use automatic differentiation to compute the Jacobian. I can use fazang.
See relevant post here: https://fortran-lang.discourse.group/t/speed-of-autodif-vs-finite-differencing/2887/8
AD can be useful for climate model jacobians.
The code lacks good documentation.
The dynamic viscosity of gas could depend on the background gas. See Table 1-2 in White (2006), "Viscous Fluid Flow"
photochem/src/photochem_eqns.f90
Line 168 in 9fd679e
Moses boundary condition makes sense for gases. But it does not make sense for particles. Particles should be fallout out of the bottom of the model, but they only diffuse out when Moses is used
Understand why I need to add this term to the jacobian. Seems like it should not be there.
When number of reactants is different than number of productions, I think my codes is getting a different reverse rate than Cantera. The issue would be here
photochem/src/photochem_common.f90
Line 118 in 18abcd5
Right now I'm using center differencing for advection terms. This causes instability for particles falling. We can improve this by using a "upwind" differencing scheme.
Hello,
I'm following the instructions to install photochem, but I ran into an error when I tried to run part of the code:
python -m pip install --no-deps --no-build-isolation
Here's the error shown:
ERROR: You must give at least one requirement to install (see "pip help install")
What can I do to fix this issue? Thanks!
When water condensation is off, then this breaks cases that fix water in troposphere
Need to add error message when climate is turned on in update_vertical_grid
Right now we are using a first order upwind scheme for particles falling. This is very diffusive. We can do better with a second order finite volume upwind scheme.
See Chapter 6 in LeVeque.
One potential issue is that these schemes depend on the size of the timestep. We can get the size of the timestep from CVODE, in the RHS function. I just worry that this will be an issue.
I suggest adding the topics atmosphere
, photochemical-model
as you did for photochempy. Maybe earth-science
too.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.