CMORPH | Python3 script for reading and ploting China Hourly
kandi X-RAY | CMORPH Summary
kandi X-RAY | CMORPH Summary
Python3 script for reading and ploting China Hourly Merged Precipitation Analysis(CMORPH) Data.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of CMORPH
CMORPH Key Features
CMORPH Examples and Code Snippets
Community Discussions
Trending Discussions on CMORPH
QUESTION
To speed up calculation of xarray packages, I tried to add numba guvectorize to functions, but there are several problems:
- If I write two functions:
read_pr
andday_clim
, input ofday_clim
is no longer xarray since guvectorize is set tofloat64[:], float64[:]
. Thus, groupby function does not work. I tried alsoxr.core.dataarray.DataArray[:], xr.core.dataarray.DataArray[:]
, but error popsNameError: name 'xr' is not defined
. - I would like to apply @guvectorize to
read_pr
, too. However, guvectorize needs type and shape declared at first, and the shape along each dimension should remain the same. For example,
ANSWER
Answered 2022-Feb-12 at 14:16Numba does not support the functions of the xarray module. Thus, you cannot use Numba to speed up the function read_pr
and day_clim
. If you want to use Numba for such function, you need to get somehow Numpy arrays from xarrays, and even if you could, there is no groupby
function in Numpy yet so this means you will need to rewrite this function, and even if you do that, I expect Numba not to be faster in this case (unless you write a very optimized implementation yourself).
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install CMORPH
You can use CMORPH like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page