GIS4WRF / gis4wrf

QGIS toolkit 🧰 for pre- and post-processing 🔨, visualizing 🔍, and running simulations 💻 in the Weather Research and Forecasting (WRF) model 🌀
https://gis4wrf.github.io
MIT License
166 stars 36 forks source link

Cannot open WRF netCDF datasets on macOS #72

Closed dmey closed 6 years ago

dmey commented 6 years ago

On macOS, when opening a WRF netCDF dataset the following error is raised:

An error has occurred while executing Python code: 

TypeError: astype() got an unexpected keyword argument 'copy' 
Traceback (most recent call last):
  File "/Users/User/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/plugin/ui/widget_view.py", line 215, in on_variable_selected
    self.replace_variable_layer()
  File "/Users/User/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/plugin/ui/widget_view.py", line 255, in replace_variable_layer
    dataset.path, variable.name, extra_dim_index, interp_level, interp_vert_name)
  File "/Users/User/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/core/transforms/wrf_netcdf_to_gdal.py", line 255, in convert_wrf_nc_var_to_gdal_dataset
    band.WriteArray(data.astype(np_dtype, copy=False))
TypeError: astype() got an unexpected keyword argument 'copy'

Python version: 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 03:03:55) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] 
QGIS version: 3.2.2-Bonn Bonn, exported 

Python Path:
/Applications/QGIS3.app/Contents/MacOS/../Resources/python
/Users/User/Library/Application Support/QGIS/QGIS3/profiles/default/python
/Users/User/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins
/Applications/QGIS3.app/Contents/MacOS/../Resources/python/plugins
/Library/Frameworks/Python.framework/Versions/3.6/lib/python36.zip
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
/Users/User/Library/Application Support/QGIS/QGIS3/profiles/default/python
/Users/User/Library/Application Support/gis4wrf/python/lib/python3.6/site-packages
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/IPython/extensions