Giter Site home page Giter Site logo

atmos's People

Contributors

alfontal avatar mcgibbon avatar sunt05 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

atmos's Issues

Atmos.meta

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?

Installation on Debian 12 Bookworm

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

calculate should suggest variables it is missing when it can't calculate a quantity

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.

Add tag to current version

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!

Adiabatic lapse rate too low

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?

image

Edit: found a simple work around, not using atmos, but it would still be interesting to know what's happening here.

CI issue

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?

Cannot use atmos in anaconda3 running python 2.7

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?

Provide more precise definition of RH

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.

Calculating dry air density

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

atm-meta

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?

make unit handling dependencies optional

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:

  • putting the cfunits import in a try: except ImportError block
  • raising an exception whenever a _units parameter is given when cfunits is not available, which indicates that cfunits is required for unit handling
  • only executing lines that call cfunits when cfunits is available

And also:

  • modifying the tests module so that unit-dependent tests don't execute if cfunits is not installed

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?

installation issue in Jupyter notebook

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:

  • atmos -> python[version='2.6.|2.7.|3.3.|3.4.']

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.