barronh / permm Goto Github PK
View Code? Open in Web Editor NEWPython Environment for Reaction Mechanisms/Mathematics provides dynamic analysis tools for evaluating chemical networks easily.
Python Environment for Reaction Mechanisms/Mathematics provides dynamic analysis tools for evaluating chemical networks easily.
I have tried to use plot_rxns
for the O3 product by python -m permm --gui test.mrg.nc
.
Steps:
I selected nothing in the "Select Rectants" column and checked "AND", then chose O3 in the "Select Products" column.
Error info:
Traceback (most recent call last):
File "/home/xin/miniconda3/envs/python37/lib/python3.8/tkinter/__init__.py", line 1883, in __call__
return self.func(*args)
File "/home/xin/miniconda3/envs/python37/lib/python3.8/site-packages/permm-1.0-py3.8.egg/permm/guis/SimpleTk.py", line 87, in execute
getattr(self.mech, method)(**thiskwds)
File "/home/xin/miniconda3/envs/python37/lib/python3.8/site-packages/permm-1.0-py3.8.egg/permm/core/Mechanism.py", line 597, in plot_rxns
reactions = [(rxn.sum()[plot_spc], rxn) for rxn in reactions]
File "/home/xin/miniconda3/envs/python37/lib/python3.8/site-packages/permm-1.0-py3.8.egg/permm/core/Mechanism.py", line 597, in <listcomp>
reactions = [(rxn.sum()[plot_spc], rxn) for rxn in reactions]
AttributeError: 'str' object has no attribute 'sum'
I printed the reactions before the rxn.sum()
:
permm/src/permm/core/Mechanism.py
Line 596 in 5f2b03a
Here's the output:
['RXN_02', 'RXN_92', 'RXN_108']
This issue exists for many products (O, O3, H2O2, NO, etc).
permm/src/permm/guis/SimpleTk.py
Line 54 in 5f2b03a
I guess you use some package to convert the py2 script into py3.
As you can see, it uses list(map ...)
to convert the results into list, you have to rename the list
passd in, like this:
def _get_species(self, species_list):
items = species_list.curselection()
try: items = list(map(int, items))
except: pass
items = list(map(lambda i, d = self.species_objects: d[i], items))
return items
Otherwise, list(map ...)
will use the Listbox which is species_list
in my revision.
Line 28 in 5f2b03a
args.pseudonetcdf
shoud be options.pseudonetcdf
.
Traceback (most recent call last):
File "main.py", line 84, in <module>
parse_and_run()
File "main.py", line 28, in parse_and_run
ifiles, pncoptions = pncparse(has_ofile = False, interactive = True, parser = pncparser, args = args.pseudonetcdf)
NameError: name 'args' is not defined
What steps will reproduce the problem?
1. Running permm with "python -m permm"
What is the expected output? What do you see instead?
Anything that's not an error, really...
What version of the product are you using? On what operating system?
Latest version as of June 2011, with Python 2.7.1+ on Ubuntu 11.04 86x64
Please provide any additional information below.
I followed the install instructions, installed NetCDF and HDF5 using Aptitude,
installed PseudoNetCDF and NetCDF4.
I cannot seem to run Permm, no matter what I try, I get an error about 'permm'
being a package. For example, trying step 2 of the
[http://code.google.com/p/permm/wiki/TutorialPlotGUI tutorial]:
matt@khea:permm-1.0rc$ python -m permm -g /tmp/cmaq.base
/usr/bin/python: No module named permm.__main__; 'permm' is a package and
cannot be directly executed
The install seems to have gone fine:
matt@khea:permm-1.0rc$ sudo python setup.py install
running install
running build
running build_py
copying src/permm/netcdf.py -> build/lib.linux-x86_64-2.7/permm
running install_lib
copying build/lib.linux-x86_64-2.7/permm/netcdf.py ->
/usr/local/lib/python2.7/dist-packages/permm
byte-compiling /usr/local/lib/python2.7/dist-packages/permm/netcdf.py to
netcdf.pyc
running install_egg_info
Removing /usr/local/lib/python2.7/dist-packages/permm-1.0rc.egg-info
Writing /usr/local/lib/python2.7/dist-packages/permm-1.0rc.egg-info
Or, the verbose install log which is attached.
Original issue reported on code.google.com by [email protected]
on 21 Jun 2011 at 5:43
Attachments:
What steps will reproduce the problem?
1. Get pyPA output
2. Use permm to create processes plot from pyPA output(such as test.mrg.nc)
3. Display the plot
What is the expected output? What do you see instead?
The unit of the secondary y-axis shows ppmV/time, it should be ppmV. The unit
for the primary y-axis is missing.
What version of the product are you using? On what operating system?
permm-1.0rc-py2.6
Please provide any additional information below.
None
Original issue reported on code.google.com by [email protected]
on 16 Jun 2010 at 6:32
IRR_233
has a typo in the key:
https://github.com/barronh/permm/blob/5f2b03aad99eb00d32905f5a09050b9acabd8023/src/permm/mechanisms/racm2_cmaq.yaml#L238:L240
Also in the published version of RACM2 the product is ONIT not OP2. Also a few reactions seem to be missing, compared to the published version of RACM2, which has 363 reactions.
Just wanted to let you know!
It would be nice to be able to plot specific reactions based on reaction
number if known (e.g. plot_rxns(IRR_1, ...) ) as well as combine reactions
using a syntax similar to the mathematical processing for species (e.g. NOx
= NO + NO2, rxns_1 = IRR_1 + IRR_2) and be able to plot those as well (e.g.
plot_rxns(rxns_1, ...) ).
Original issue reported on code.google.com by [email protected]
on 20 May 2010 at 2:29
1. from permm.SpeciesGroup import Sepcies
2. OH = Species(names = ['OH'], stoic = [1])
3. print (-OH).exclude
What is the expected output?
False
What do you see instead?
0
This was an error in the reimplementation of Species from dict to object.
I have made the update that fixes Species.
Original issue reported on code.google.com by [email protected]
on 21 May 2010 at 6:22
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.