Skip to content

Commit 06bfd6c

Browse files
authored
Merge pull request #34 from quishqa/quishqa/prep_pypi
Update setup.py install_requires
2 parents e5153a6 + 53ad4ad commit 06bfd6c

File tree

3 files changed

+28
-16
lines changed

3 files changed

+28
-16
lines changed

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
numpy==1.26.4
22
bottleneck==1.3.8
33
xarray==2024.2.0
4+
geopandas==0.14.3
45
netcdf4==1.6.5
56
dask==2024.2.1
67
hdbscan==0.8.33

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
author="Mario Gavidia-Calderón",
1111
author_email="mario.calderon@iag.usp.br",
1212
packages=find_packages(),
13-
setup_requires=["numpy"],
14-
install_requires=["numpy"],
13+
install_requires=["xarray", "pyproj", "osmnx", "pseudonetcdf", "geopandas"],
1514
long_description=long_description,
1615
long_description_content_type="text/markdown",
1716
license="MIT",

siem/point.py

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import pandas as pd
1717
import geopandas as gpd
1818
import xarray as xr
19-
from netCDF4 import Dataset
2019
from siem.proxy import create_wrf_grid, configure_grid_spatial
2120
import pyproj
2221

@@ -101,22 +100,35 @@ def retrive_proj_from(geogrid_path: str):
101100
a = 6370000.0
102101
b = 6370000.0
103102

104-
lcc = pyproj.Proj(proj='lcc', lat_1=geo_ds.TRUELAT1, lat_2=geo_ds.TRUELAT2,
105-
lat_0=geo_ds.MOAD_CEN_LAT, lon_0=geo_ds.STAND_LON,
106-
a=a, b=b)
107-
merc = pyproj.Proj(proj='merc', lon_0=geo_ds.STAND_LON, lat_ts=geo_ds.TRUELAT1,
108-
a=a, b=b)
109-
stere = pyproj.Proj(proj='stere', lat_0=geo_ds.TRUELAT1, lon_0=geo_ds.STAND_LON,
110-
lat_ts=geo_ds.TRUELAT1, a=a, b=b)
111-
latlon = pyproj.Proj(proj='longlat', lon_0=geo_ds.STAND_LON, a=a, b=b)
103+
lcc = pyproj.Proj(
104+
proj="lcc",
105+
lat_1=geo_ds.TRUELAT1,
106+
lat_2=geo_ds.TRUELAT2,
107+
lat_0=geo_ds.MOAD_CEN_LAT,
108+
lon_0=geo_ds.STAND_LON,
109+
a=a,
110+
b=b,
111+
)
112+
merc = pyproj.Proj(
113+
proj="merc", lon_0=geo_ds.STAND_LON, lat_ts=geo_ds.TRUELAT1, a=a, b=b
114+
)
115+
stere = pyproj.Proj(
116+
proj="stere",
117+
lat_0=geo_ds.TRUELAT1,
118+
lon_0=geo_ds.STAND_LON,
119+
lat_ts=geo_ds.TRUELAT1,
120+
a=a,
121+
b=b,
122+
)
123+
latlon = pyproj.Proj(proj="longlat", lon_0=geo_ds.STAND_LON, a=a, b=b)
112124

113125
proj_codes = {
114-
1: lcc, # lambert
115-
2: stere, # polar
116-
3: merc, # merc
117-
6: latlon # latlon
126+
1: lcc, # lambert
127+
2: stere, # polar
128+
3: merc, # merc
129+
6: latlon, # latlon
118130
}
119-
131+
120132
wrf_proj = proj_codes[geo_ds.MAP_PROJ]
121133
wrf_crs = pyproj.CRS.from_proj4(str(wrf_proj))
122134
return wrf_crs

0 commit comments

Comments
 (0)