dgilford / tcpypi Goto Github PK
View Code? Open in Web Editor NEWtcpyPI, aka "pyPI": Tropical Cyclone Potential Intensity Calculations in Python
License: MIT License
tcpyPI, aka "pyPI": Tropical Cyclone Potential Intensity Calculations in Python
License: MIT License
Hi @dgilford
I started the installation of tcpypi it is successfully installed after that, I type
$python setup.py install
its shoi]wing
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tcpypi 1.3.4 requires numpy==1.19.5, but you have numpy 1.22.3 which is incompatible.
Give me the solution for this.
Thanks!
@dgilford
I have successfully run the sample python file with my data
python run_sample.py**
**Beginning PI computations...
...PI computation complete and saved
Performing PI analyses...
...PI analyses complete and saved
PyPI sample run finished!**
After completing this I have tried to plot the VMAX variable in the out.nc but it showed the error like.
Warning: value for primary undef attribute "missing_value" not found
Cannot contour grid - all undefined values.
Can you please solve this.
Congrats on releasing this amazing package!
It looks like xarray is used for the examples, but your package itself (the contents of the pypi
folder) doesn't ever import xarray.
https://github.com/dgilford/pyPI/search?q=xarray
So technically xarray is not a dependency.
If you were interested in building an xarray compatibility layer in pyPI, it would be pretty straightforward to wrap your functions using xarray.apply_ufunc
. That way you could send xarray DataArrays directly in and out of pyPI.
We do something similar in our fastjmd95 package, which implements an ocean equation of state using numba: https://github.com/xgcm/fastjmd95/tree/master/fastjmd95
after successfully running the ..Sample PI with my data
.PI computation complete and saved
Performing PI analyses...
...PI analyses complete and saved
pyPI sample run finished!
all the output data show no value please how do i fix this
i attached my sample data
testpi.zip
I'm trying to use pi() to get the VMAX. According to the comments the arguments P, TC, and R should all be one-dimensional arrays,
But utilities.t_ctok (TC) ,R * 0.001
makes TC, R look like int. I don't know how to use pi (). Can you give me an example data of P,TC,R?
Thanks a lot!
Currently setup.py shows:
install_requires=[
"xarray==2022.3.0",
"numba==0.55.1",
"numpy==1.22.3",
],
Unfortunately this will most certainly conflict with existing environments. For example #44. A more sensible option would be to specify compatible versions using ">=" instead of "==".
Hi!
from setup.py, python_requires shows >=3.7
However, the xarray version 2022.3.0 and numpy 1.22 can only work on >=3.8.
When running run_sample.py on python 3.7 with:
netcdf4 1.5.8 pypi_0 pypi
numba 0.55.1 pypi_0 pypi
numpy 1.21.6 pypi_0 pypi
xarray 0.20.2 pypi_0 pypi
...PI computation complete and saved
Performing PI analyses...
Traceback (most recent call last):
File "run_sample.py", line 148, in <module>
ds2 = run_sample_analyses(ds,_mdrF,CKCD=0.9)
File "run_sample.py", line 73, in run_sample_analyses
basins = pickle.load( open( _mdrF, "rb" ) )
AttributeError: Can't get attribute 'PandasIndexAdapter' on <module 'xarray.core.indexing' from '/Users/arreyes/miniconda3/envs/mytcpypi/lib/python3.7/site-packages/xarray/core/indexing.py'>
The error occurs because the pickled file was saved with an unknown version of pickle and they are not supposed to be compatible (see e.g. pydata/xarray#5642) a better Idea could be to redistribute the file as netcdf or hdf5.
I'm trying to install tcpypi, but when I type "pip install tcpypi", I get the following error:
Building wheel for llvmlite (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/groups/oneillm/Laurel/miniconda3/envs/workenv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1hum5keb/llvmlite_30d4375db3ee4b6d950f7cbfd970364a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1hum5keb/llvmlite_30d4375db3ee4b6d950f7cbfd970364a/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-fwoeenty
cwd: /tmp/pip-install-1hum5keb/llvmlite_30d4375db3ee4b6d950f7cbfd970364a/
Complete output (26 lines):
running bdist_wheel
/home/groups/oneillm/Laurel/miniconda3/envs/workenv/bin/python /tmp/pip-install-1hum5keb/llvmlite_30d4375db3ee4b6d950f7cbfd970364a/ffi/build.py
LLVM version... Traceback (most recent call last):
File "/tmp/pip-install-1hum5keb/llvmlite_30d4375db3ee4b6d950f7cbfd970364a/ffi/build.py", line 105, in main_posix
out = subprocess.check_output([llvm_config, '--version'])
File "/home/groups/oneillm/Laurel/miniconda3/envs/workenv/lib/python3.9/subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/home/groups/oneillm/Laurel/miniconda3/envs/workenv/lib/python3.9/subprocess.py", line 505, in run
with Popen(*popenargs, **kwargs) as process:
File "/home/groups/oneillm/Laurel/miniconda3/envs/workenv/lib/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/home/groups/oneillm/Laurel/miniconda3/envs/workenv/lib/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/pip-install-1hum5keb/llvmlite_30d4375db3ee4b6d950f7cbfd970364a/ffi/build.py", line 191, in <module>
main()
File "/tmp/pip-install-1hum5keb/llvmlite_30d4375db3ee4b6d950f7cbfd970364a/ffi/build.py", line 181, in main
main_posix('linux', '.so')
File "/tmp/pip-install-1hum5keb/llvmlite_30d4375db3ee4b6d950f7cbfd970364a/ffi/build.py", line 107, in main_posix
raise RuntimeError("%s failed executing, please point LLVM_CONFIG "
RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
error: command '/home/groups/oneillm/Laurel/miniconda3/envs/workenv/bin/python' failed with exit code 1
----------------------------------------
ERROR: Failed building wheel for llvmlite
Running setup.py clean for llvmlite
Failed to build llvmlite
Installing collected packages: llvmlite, xarray, numba, tcpypi
Attempting uninstall: llvmlite
Found existing installation: llvmlite 0.38.0
Uninstalling llvmlite-0.38.0:
Successfully uninstalled llvmlite-0.38.0
Running setup.py install for llvmlite ... error
ERROR: Command errored out with exit status 1:
command: /home/groups/oneillm/Laurel/miniconda3/envs/workenv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1hum5keb/llvmlite_30d4375db3ee4b6d950f7cbfd970364a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1hum5keb/llvmlite_30d4375db3ee4b6d950f7cbfd970364a/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-fkaw76ne/install-record.txt --single-version-externally-managed --compile --install-headers /home/groups/oneillm/Laurel/miniconda3/envs/workenv/include/python3.9/llvmlite
cwd: /tmp/pip-install-1hum5keb/llvmlite_30d4375db3ee4b6d950f7cbfd970364a/
Complete output (29 lines):
running install
running build
got version from file /tmp/pip-install-1hum5keb/llvmlite_30d4375db3ee4b6d950f7cbfd970364a/llvmlite/_version.py {'version': '0.34.0', 'full': 'c5889c9e98c6b19d5d85ebdd982d64a03931f8e2'}
running build_ext
/home/groups/oneillm/Laurel/miniconda3/envs/workenv/bin/python /tmp/pip-install-1hum5keb/llvmlite_30d4375db3ee4b6d950f7cbfd970364a/ffi/build.py
LLVM version... Traceback (most recent call last):
File "/tmp/pip-install-1hum5keb/llvmlite_30d4375db3ee4b6d950f7cbfd970364a/ffi/build.py", line 105, in main_posix
out = subprocess.check_output([llvm_config, '--version'])
File "/home/groups/oneillm/Laurel/miniconda3/envs/workenv/lib/python3.9/subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/home/groups/oneillm/Laurel/miniconda3/envs/workenv/lib/python3.9/subprocess.py", line 505, in run
with Popen(*popenargs, **kwargs) as process:
File "/home/groups/oneillm/Laurel/miniconda3/envs/workenv/lib/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/home/groups/oneillm/Laurel/miniconda3/envs/workenv/lib/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/pip-install-1hum5keb/llvmlite_30d4375db3ee4b6d950f7cbfd970364a/ffi/build.py", line 191, in <module>
main()
File "/tmp/pip-install-1hum5keb/llvmlite_30d4375db3ee4b6d950f7cbfd970364a/ffi/build.py", line 181, in main
main_posix('linux', '.so')
File "/tmp/pip-install-1hum5keb/llvmlite_30d4375db3ee4b6d950f7cbfd970364a/ffi/build.py", line 107, in main_posix
raise RuntimeError("%s failed executing, please point LLVM_CONFIG "
RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
error: command '/home/groups/oneillm/Laurel/miniconda3/envs/workenv/bin/python' failed with exit code 1
----------------------------------------
Rolling back uninstall of llvmlite
Moving to /home/groups/oneillm/Laurel/miniconda3/envs/workenv/lib/python3.9/site-packages/llvmlite
from /home/groups/oneillm/Laurel/miniconda3/envs/workenv/lib/python3.9/site-packages/~lvmlite
Moving to /home/groups/oneillm/Laurel/miniconda3/envs/workenv/lib/python3.9/site-packages/llvmlite-0.38.0-py3.9.egg-info
from /home/groups/oneillm/Laurel/miniconda3/envs/workenv/lib/python3.9/site-packages/~lvmlite-0.38.0-py3.9.egg-info
ERROR: Command errored out with exit status 1: /home/groups/oneillm/Laurel/miniconda3/envs/workenv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1hum5keb/llvmlite_30d4375db3ee4b6d950f7cbfd970364a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1hum5keb/llvmlite_30d4375db3ee4b6d950f7cbfd970364a/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-fkaw76ne/install-record.txt --single-version-externally-managed --compile --install-headers /home/groups/oneillm/Laurel/miniconda3/envs/workenv/include/python3.9/llvmlite Check the logs for full command output.
What might I do to fix this? Is there some other thing that I need to install? Or a module that I need?
Thanks!
I'm using the sample_data.nc
file you provide with the source code for validation but there are some small issues.
The time coordinates (month variable) are not specified in a standard way. For instance this variable does not have a calendar, and the units (Month Number) are not recognized by udunits.
Would it be possible to
In the run_sample.py
you're passing q
from the sample_data.nc
file without conversion (here). The netcdf attributes in the file suggest that q
is specific humidity while the tcpyPI documentation on states that a mixing ratio is required. Should there be a conversion applied?
Hi @dgilford I just found out about this package via your post to the TC list! I notice that the versions of xarray, numba, and numpy are set to exactly 0.15.1, 0.48.0, and 1.18.1 respectively. I am just rolling out a new Python 3.8 environment for my department and would love to include this package, but this new environment uses 0.16.2, 0.52.0 and 1.19.5. Are there any test scripts/notebooks that could be run to see if tcpyPI will work ok with these updated libraries?
Thanks, Kevin
Performing PI analyses...
Traceback (most recent call last):
File "/home/wamashudu/Videos/Potnetail intensity/tcpyPI-master/run_sample.py", line 148, in
ds2 = run_sample_analyses(ds,_mdrF,CKCD=0.9)
File "/home/wamashudu/Videos/Potnetail intensity/tcpyPI-master/run_sample.py", line 73, in run_sample_analyses
basins = pickle.load( open( _mdrF, "rb" ) )
AttributeError: Can't get attribute 'PandasIndexAdapter' on <module 'xarray.core.indexing' from '/home/wamashudu/anaconda3/lib/python3.9/site-packages/xarray/core/indexing.py'>
Why could outflow temperature level be 0 hPa given that upper level pressure bound equals to 50 hPa?
Nice package! I see that it's called tcpypi on pip, presumably because PyPI is already a package on pip. Given that the Python world is so familiar with PyPI as being a package repository, wouldn't it make sense to choose a different name for this project? tcpyPI seems not to be used for any other packages that I can see...
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.