diff --git a/README.md b/README.md index 9b0f4d5c..c926e5c1 100644 --- a/README.md +++ b/README.md @@ -24,4 +24,16 @@ Despite the lack of external documentation, there are three types of internal do * ambhas * descartes * geopy -* metpy \ No newline at end of file +* metpy +* roipoly +* opencv-python +* srtm.py + +# Installation Instructions +1. Install the Anaconda or [Miniconda Python distribution](https://docs.conda.io/en/latest/miniconda.html). +2. Go to the GewitterGefahr top level directory. +3. Create a custom environment with all dependencies by running the following command: + `conda env create -f environment.yml` +4. Install gewittergefahr with `pip install .`. +5. Verify that GewitterGefahr is installed correctly by running pytest: `pytest`. All tests should pass, but you will see warnings. + diff --git a/environment.yml b/environment.yml new file mode 100644 index 00000000..52cb73ff --- /dev/null +++ b/environment.yml @@ -0,0 +1,31 @@ +name: gewitter +channels: + - conda-forge +dependencies: + - python=3.8 + - numpy=1.18.* + - scipy + - matplotlib + - xarray + - netcdf4 + - pyyaml + - pandas + - scikit-learn + - pytest + - pyproj + - jupyter + - dask + - distributed + - cartopy + - pip + - descartes + - metpy + - scikit-image + - shapely + - basemap + - pip: + - tensorflow + - keras + - roipoly + - opencv-python + - git+https://github.com/tkrajina/srtm.py.git diff --git a/gewittergefahr/gg_utils/geodetic_utils.py b/gewittergefahr/gg_utils/geodetic_utils.py index 67b4bb49..fc4a5905 100644 --- a/gewittergefahr/gg_utils/geodetic_utils.py +++ b/gewittergefahr/gg_utils/geodetic_utils.py @@ -4,7 +4,7 @@ import numpy import srtm import geopy -from geopy.distance import VincentyDistance +from geopy.distance import GeodesicDistance from gewittergefahr.gg_utils import longitude_conversion as lng_conversion from gewittergefahr.gg_utils import file_system_utils from gewittergefahr.gg_utils import error_checking @@ -308,7 +308,7 @@ def start_points_and_displacements_to_endpoints( for i in range(num_points): this_start_point_object = geopy.Point( start_latitudes_deg.flat[i], start_longitudes_deg.flat[i]) - this_end_point_object = VincentyDistance( + this_end_point_object = GeodesicDistance( meters=scalar_displacements_metres.flat[i]).destination( this_start_point_object, geodetic_bearings_deg.flat[i]) diff --git a/gewittergefahr/gg_utils/temporal_tracking.py b/gewittergefahr/gg_utils/temporal_tracking.py index df31367a..a4b3e427 100644 --- a/gewittergefahr/gg_utils/temporal_tracking.py +++ b/gewittergefahr/gg_utils/temporal_tracking.py @@ -4,7 +4,7 @@ from collections import OrderedDict import numpy import pandas -from geopy.distance import vincenty +from geopy.distance import geodesic from gewittergefahr.gg_utils import time_conversion from gewittergefahr.gg_utils import storm_tracking_utils as tracking_utils from gewittergefahr.gg_utils import error_checking @@ -2229,12 +2229,12 @@ def get_storm_velocities( this_end_latitude_deg - this_start_latitude_deg ) else: - these_east_displacements_metres[j] = vincenty( + these_east_displacements_metres[j] = geodesic( (this_start_latitude_deg, this_start_longitude_deg), (this_start_latitude_deg, this_end_longitude_deg) ).meters - these_north_displacements_metres[j] = vincenty( + these_north_displacements_metres[j] = geodesic( (this_start_latitude_deg, this_start_longitude_deg), (this_end_latitude_deg, this_start_longitude_deg) ).meters diff --git a/setup.py b/setup.py index bc5cf570..0785cd7e 100644 --- a/setup.py +++ b/setup.py @@ -40,6 +40,7 @@ PACKAGE_REQUIREMENTS = [ 'numpy', 'scipy', + 'roipoly', 'tensorflow', 'keras', 'scikit-learn', @@ -52,7 +53,8 @@ 'shapely', 'descartes', 'geopy', - 'metpy' + 'metpy', + 'python-srtm' ] if __name__ == '__main__':