hydroframe / Subsetting

Subsetting inputs for ParFlow to run in sub-continental watershed
2 stars 3 forks source link

protected gdal imports to work with gdal from conda/pip #26

Closed vineetbansal closed 3 years ago

vineetbansal commented 3 years ago

Instead of using gdal from conda, we're using gdal 3.2.1 installed from gdal sources (using the --with-python autoconf flag) in a virtualenv on Verde @ Princeton. This enables us to have a single install for both python/non-python use. It looks like in this version, the package namespace used is simply osgeo, also mentioned in:

https://pypi.org/project/GDAL/

The code at one place was also using osgeo directly, so I'm not sure if the older imports need to be supported. But this change works in our case (and some simple subsetting scripts seem to work great!)