atmos-python / atmos Goto Github PK
View Code? Open in Web Editor NEWAn atmospheric sciences library for Python
License: MIT License
An atmospheric sciences library for Python
License: MIT License
Hi so I was writing a code and I used atm.meta(data) and I am getting the error "AttributeError: module 'atmos' has no attribute 'meta'". Can anyone please help?
after a successful installation on Debian bookworm with pip3 install atmos --break-system-packages
the command python3 -c "import atmos" produces the error message
traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.11/dist-packages/atmos/init.py", line 24, in
from atmos.solve import calculate, FluidSolver
File "/usr/local/lib/python3.11/dist-packages/atmos/solve.py", line 8, in
from atmos import equations
File "/usr/local/lib/python3.11/dist-packages/atmos/equations.py", line 301, in
@AutoDoc(equation=r'AH = q_v \rho')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/atmos/decorators.py", line 73, in decorator
in_quantities = inspect.getargspec(func).args
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?
The python version is 3.11.2 , atmos is 0.2.6
Sometimes a user might forget that a certain quantity is needed to calculate the output they want. In these cases, an exception with the message "can't calculate quantity from inputs" is raised. It would be useful if this message indicated the smallest set of quantities that need to be additionally supplied in order to calculate the desired output quantity.
This enhancement involves tinkering with the fairly complicated equation system solver code, or making code that has some of its qualities, so if you're interested in taking this on please talk to me.
Hi!
As it stands the last tagged version of atmos
is 0.2.5, which corresponds to a version that fails when trying to install via pip > 10.0.
My last PR fixed the issue with the import of pip.req
, but the only way to successfully circumvent the issue as of now is to specify the develop branch and installing directly from github:
pip install --git [email protected]:atmos-python/atmos.git@develop
or if using a wrapper like poetry:
poetry add --git [email protected]:atmos-python/atmos.git@develop
It works, but it's quite cumbersome and will probably frustrate users not aware of the issue.
Could you add a tag to the current version so that it gets its own wheel in Pypi and the default installation falls back to the current version?
Thanks!
Hi!
I got a bit lost in all of these formulas. Could someone tell what would be the most elegant way to calculate the absolute humidity from a given temperature and a relative humidity value?
Best, vrs01
Using:
rvs = atmos.equations.rvs_from_qvs(qvs)
lr = atmos.equations.Gammam_from_rvs_T(rvs, T)
Gives very low values for lr (adiabatic lapse rate). Temperature is definitely in K, QVS is definitely in kg/kg. Below is a plot I made just to visualise the data, with lapse rate on the x axis and temperature on the y axis. Was calculated and plotted for a higher pressure level too, which also seemed to max out at 0.010 LR. Am I doing something wrong, or just missing something?
Edit: found a simple work around, not using atmos, but it would still be interesting to know what's happening here.
setup.py
seems to currently suffer from this problem, will need to fix it at some point.
Where can I find the parameter description of the "RB" module?I want to use the "RB" module, but I can't find which weather variables to enter。Who can help to answer?Thanks a lot.
In terms of fixing the CI, I can't even remember what the issue was, but if you find out what that was feel free to ask me for help if you need it. My email right now is [email protected].
Originally posted by @mcgibbon in #1 (comment)
Just wondering as GH Actions has been out for a while, shall we consider using that instead of fixing the travis-based CI?
I am trying to install the 'atmos' package for my anaconda3 spyder. Since atmos only works with certain python versions, I reverted back to python 2.7 by running the following:
conda create -n py27 python=2.7 activate py27
Now with this sorted I proceeded to install the atmos package by running the following:
conda install -c mcgibbon atmos
The package is succesfully installed.
I tried testing it by typing this in the console:
import atmos
But I get the following error:
ModuleNotFoundError: No module named 'atmos'
For some reason it cannot find the module I just installed. Is there something I am doing wrong?
I've come across a few definitions of RH in the literature, and I'm not certain if there even is a "standard".
It appears that this package is using mixing ratios. For example, if I do
import atmos
e = atmos.calculate('e',T=30, RH=25.0, p=101325, T_unit='degC')
es = atmos.calculate('es',T=30, RH=25.0, p=101325, T_unit='degC')
print(100* e/es)
I get a result of 25.63, which is quite a bit different from the input RH = 25.0
In many fields, I see RH defined in terms of the partial water vapor pressure in relation to the saturation pressure. Given the 25.0 versus 25.63 discrepancy above, I think it would be helpful to provide a note in the section of the documentation where RH is defined indicating that different interpretations of RH can give different results when, for example, you use RH to compute AH.
Let me start by saying this is a great piece of code. I am considering using it for most of the pre-processing calculations that I currently do in my package (Pymicra). Right now the pre-processing is coded in a very ugly way (https://github.com/tomchor/pymicra/blob/master/pymicra/micro/util.py) and this would be an elegant solution.
I'd like to ask a couple of things:
1 - is there a way to calculate density of dry air? I couldn't find one.
2 - if not, how hard would it be to implement it?
3 - Is this package still being maintained? Although I would very much like to implement this in my code, this is something I have to take into consideration.
Cheers
Hi so I was writing a code and I used atm.meta(data) and I am getting the error "AttributeError: module 'atmos' has no attribute 'meta'". Can anyone please help?
The dependency of atmos on cfunits can be removed by checking whether cfunits can be imported, and if it cannot, disabling unit handling functionality.
This would entail, in solve.py:
And also:
The purpose of this is to make installation easier for users that don't have udunits installed on their system to install atmos. But am I right in thinking that cfunits depends on having a system-installed udunits library available? And is there another package on pypi that would install udunits in some sort of wrapper, without needing a system installation of udunits?
I tried to install via this command in jupyter notebook in MacBook Pro m1:
conda install -c mcgibbon atmos
but the output is showing this: Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: /
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
Your python: python=3.8
If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.
Note: you may need to restart the kernel to use updated packages.
even pip install atmos
isn't working too.
If I write import atmos, it's not being imported too.
What should I do in this regard to install and run atmos?
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.