|
1 | | -CSU_RadarTools README |
2 | | ---------------------- |
| 1 | +# CSU_RadarTools |
| 2 | + |
3 | 3 | Python tools for polarimetric radar retrievals. |
4 | 4 |
|
5 | | -This codebase was developed at Colorado State University by numerous people, |
6 | | -including Brenda Dolan, Brody Fuchs, Kyle Wiens, Rob Cifelli, Larry Carey, Timothy Lang, |
7 | | -and others. |
| 5 | +This codebase was developed at Colorado State University by numerous people, including Brenda Dolan, Brody Fuchs, Kyle Wiens, Rob Cifelli, Larry Carey, Timothy Lang, and others. |
8 | 6 |
|
9 | 7 | Currently, fuzzy-logic-based hydrometeor identification, blended rainfall, |
10 | | -DSD retrievals, and liquid/ice mass calculations are supported. There is also an |
11 | | -algorithm that uses a finite impulse response (FIR) filter to process differential phase |
12 | | -and calculate specific differential phase. |
| 8 | +DSD retrievals, and liquid/ice mass calculations are supported. |
| 9 | +There is also an algorithm that uses a finite impulse response (FIR) filter to process differential phase and calculate specific differential phase. |
13 | 10 | Finally, there are some tools to do rudimentary QC on the data. |
14 | 11 |
|
15 | | -These are supplied as standalone functions that take polarimetric radar data |
16 | | -as arguments. Scalars and arrays are supported as function inputs. The main exception |
17 | | -is `csu_kdp.calc_kdp_bringi()` which requires individual rays, sweeps, or volumes of |
18 | | -radar data. |
19 | | - |
20 | | -CSU_RadarTools Installation |
21 | | ---------------------------- |
22 | | -To install: |
23 | | -`python setup.py install` |
24 | | -(you may need to have sudo privileges, depending on your setup) |
25 | | - |
26 | | -There is a parameter in the setup.py file called `USE_CYTHON`. By default it is set to `True`. |
27 | | -This will cause the program to compile using Cython to speed up the KDP other routines. |
28 | | -This enables the widest cross-platform support. However, if you are able to compile programs |
29 | | -using `f2py`, you may want to try `USE_CYTHON = False` in setup.py. This will provide a modest |
30 | | -performance improvement. Under Windows, `f2py` will be difficult to get working, but we've been |
31 | | -successful using it under Mac and Linux. |
32 | | - |
33 | | -<b>Note: If you have previously installed `csu_radartools` you may have to completely remove it |
34 | | -from its installation location to get the latest version to work right, since the KDP |
35 | | -routines have been substantially altered.</b> |
| 12 | +These are supplied as standalone functions that take polarimetric radar data as arguments. |
| 13 | +Scalars and arrays are supported as function inputs. The main exception is `csu_kdp.calc_kdp_bringi()` which requires individual rays, sweeps, or volumes of radar data. |
| 14 | + |
| 15 | + |
| 16 | +## CSU_RadarTools Installation |
| 17 | + |
| 18 | +If using Anaconda/Miniconda, CSU_RadarTools can be installed from `conda-forge` (in progress) with: |
36 | 19 |
|
37 | | -To access, use the following in your analysis code: |
38 | 20 | ``` |
39 | | -from csu_radartools import (csu_fhc, csu_liquid_ice_mass, csu_blended_rain, csu_dsd, |
40 | | - csu_kdp, csu_misc, fundamentals) |
| 21 | +conda install -c defaults -c conda-forge csu_radartools |
| 22 | +``` |
| 23 | + |
| 24 | +We suggest you do so in a dedicated conda environment (e.g. shared with PyART and/or your other radar data manipulation tools) to avoid any chance of contaiminating your `base` environment. |
| 25 | + |
| 26 | +Alternatively, if not using Anaconda/Miniconda, you can install CSU_Radartools using `pip` (or `pip3`, if `pip` does not point to your Python 3 install on your system): |
| 27 | + |
| 28 | +``` |
| 29 | +pip install csu_radartools |
| 30 | +``` |
| 31 | + |
| 32 | +Again, we suggest using a proper `virtualenv`/`venv` for your radar analysis stack, *particularly* if using your system Python install. |
| 33 | +If are using your system Python or one installed for all users, you may need to have sudo privileges, depending on your setup. |
| 34 | + |
| 35 | +By default, if the `CSURT_F2PY` environment variable is not set (or set to a case-insensitive match for {`0`, `false`, `no`}, the package will be compiled using Cython to speed up KDP and other routines. |
| 36 | +This enables the widest cross-platform support. |
| 37 | +However, if you are able to compile programs using `f2py`, you may want to try setting `CSU_F2PY` to any non-falsy value (e.g. `1`). |
| 38 | +This should provide a modest performance improvement. |
| 39 | +Under Windows, `f2py` will be difficult to get working, but we've been successful using it under Mac and Linux. |
| 40 | + |
| 41 | +*Note:* If you have previously installed `CSU_Radartools` you may have to completely remove it |
| 42 | +from its installation location to get the latest version to work right, since the KDP |
| 43 | +routines have been substantially altered. |
| 44 | + |
| 45 | +To easily access all of the tools, you can use the following in your analysis code: |
| 46 | + |
| 47 | +```python |
| 48 | +from csu_radartools import (csu_fhc, csu_liquid_ice_mass, csu_blended_rain, |
| 49 | + csu_dsd, csu_kdp, csu_misc, fundamentals) |
41 | 50 | ``` |
42 | 51 |
|
43 | | -For help information do help on individual modules. There is also a demonstration IPython notebook in the notebooks directory that covers all the modules. |
| 52 | +For help information do help on individual modules. |
| 53 | +There is also a demonstration IPython notebook in the notebooks directory that covers all the modules. |
44 | 54 |
|
45 | | -CSU_RadarTools is known to work under Python 2.7 and 3.4. Other Python versions are untested. |
| 55 | +CSU_RadarTools is known to work under Python 2.7 and 3.4-3.7. |
| 56 | +Other Python versions are untested. |
| 57 | +Although we still fully support Python 2.7 at this time, we strongly recommend you move to Python >=3.6 as soon as practicable, given the Python 2 end of life date in less than a year, and the fact that many other scientific packages have dropped it already. |
| 58 | +For more information, please see e.g. [the Python 3 Statement](https://python3statement.org/). |
46 | 59 |
|
47 | | -Latest release of CSU_RadarTools (v1.2): |
| 60 | +Latest release of CSU_RadarTools (v1.3): |
48 | 61 | [](https://zenodo.org/badge/latestdoi/31606116) |
0 commit comments