Code Monkey home page Code Monkey logo

gis4wrf's Introduction

GIS4WRF

Build and Tests Documentation Article DOI Software DOI
CI docs DOI DOI

GIS4WRF is a free and open source QGIS plug-in to help researchers and practitioners with their Advanced Research Weather Research and Forecasting modelling workflows. GIS4WRF can be used to pre-process input data, run simulations, and visualize or post-process results. We offer MPI-enabled pre-built binary distributions for Windows, macOS and Linux through WRF-CMake. For information on how to install GIS4WRF, or check out the main documentation and tutorials, please refer to the GIS4WRF website.

Configure, run and visualize a WRF simulation in GIS4WRF

Citing

If you use GIS4WRF in a published work, please cite both the paper (https://doi.org/10.1016/j.envsoft.2018.10.018), and the specific version of GIS4WRF you are using (https://doi.org/10.5281/zenodo.1288569).

Example

Meyer, D., & Riechert, M. (2019). Open source QGIS toolkit for the Advanced Research WRF
modelling system. Environmental Modelling & Software, 112, 166–178.
https://doi.org/10.1016/j.envsoft.2018.10.018

Meyer, D., & Riechert, M. (2018). The GIS4WRF Plugin. Zenodo.
https://doi.org/10.5281/zenodo.1288569

Contributing

If you would like to contribute to the GIS4WRF project, clone this repository, make your changes, and create a pull request with a clear description of your changes. If your changes are merged, you will appear as one of our Contributors.

Versioning

This project uses semantic versioning.

Copyright and licence

Copyright 2018 D. Meyer and M. Riechert. Licensed under MIT.

gis4wrf's People

Contributors

bakamotokatas avatar dmey avatar letmaik avatar mjroth avatar xaviercll avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gis4wrf's Issues

Combined vector/contour plot

Is your feature request related to a problem? Please describe.
GIS4WRF offers the possibility to show contour plots of WRF parameters in a WRF layer, but vector plots are not supported yet (e.g. wind vectors made from e.g. U10 and V10)
Describe the solution you'd like
I propose to add a feature to show vector plots. Preferably combined with an underlying contour plot. Example: wind speed vectors with wind speed mangitude as underlying contour field. Extra add-on would be to colour the vectors with the wind speed magnitude.

Create derived parameters

For analysis, it would be nice to create derived parameters. Example: wind speed magnitude, created from 2D fields U10 and V10, or 3D fields U and V.

Namelist.input parser ignores run_* parameters

The following namelist.input parameters do not appear as a namelist option and cannot be added manually as they are ignored.

run_days
run time in days
Type: int
Example: 0

run_hours
run time in hours *note: if it is more than 1 day, you may use both run_days and run_hours or just run_hours. e.g. if the total run length is 36 hrs, you may set run_days = 1, and run_hours = 12, or run_days = 0, and run_hours = 36
Type: int
Example: 0

run_minutes
run time in minutes
Type: int
Example: 0

run_seconds
run time in seconds
Type: int
Example: 0

No restart files can be selected for visualization

Describe the bug
In tab "Run"/WRF "Visualize output only wrfout, wrfinput, wrfbdy can be selected, but not wrfrst,
To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Run
  2. Click on WRF/"Visualize output '

Expected behavior
Ädd wrfrst

WRF tutorial Amsterdam does not run on 8 cores

Describe the bug
The WRF tutorial does not run on 8 cores, 4 cores, neither. 2 cores is OK

Expected behavior
Mention on the page that it only runs with 2 cores as the tutorial domain is too small to be paralellized.

Operating System Information (please complete the following information):
Windows 10

WRF namelist fields history_interval, frames_per_outfile, e_vert are always overridden to a default

Describe the bug
Editing the following namelist.input fields is not possible currently as they always get overridden to a default value:

  • time_control: history_interval, frames_per_outfile
  • domains: e_vert

There are more fields that get overridden, but those are derived directly from the domain and met data and it doesn't make sense to change them (e.g. interval_seconds or dx).

To Reproduce
Steps to reproduce the behavior:

  1. Create a GIS4WRF project
  2. Open the WRF namelist editor
  3. Edit one of the mentioned fields
  4. Open the editor again and observe that they have been overridden

Expected behavior
The fields above should be inserted initially, but once they exist the user should be able to change them.

Technical note: See project.py:update_wrf_namelist() and project_to_wrf_namelist.py.

Do not overwrite namelist configuration when starting ungrib

Describe the bug
There is a possibility to change/save the namelist.wps configuration file. However, after starting ungrib, the namelist.wps is 'overwritten'by the default values (saved changes are lost).

To Reproduce
Steps to reproduce the behavior:

  1. Go to Run
  2. Click on 'Open configuration.', make changes and "Save"
  3. Click on 'Run Ungrib'
  4. Check content of namelist.wps to see that changes made earlier are lost

Expected behavior
Changes should not be overwritten

Operating System Information (please complete the following information):

  • Windows 10

Visualize ungrib data

Is your feature request related to a problem? Please describe.
I was unable to find a possibility to visualize binary data produced by ungrib. When selecting "Visualize output" in Run/WPS tab, only geo_em / met_em files can be selected.
Describe the solution you'd like
Visualize binary data from ungrib

Create/Open Projects when `PATH` to WPS/WRF is not set

At the moment we do not handle cases where the PATH to WPS/WRF has not been set and the user creates/open a GIS4WRF project. I think that we should still allow users to open existing projects even if the PATH to WPS/WRF has not been set. The question is really if we want to limit access to Data and Run sub tab as those depends on the table files found in WPS.

Support for Python 3.5 (Ubuntu 16.x)

Currently we support GIS4WRF for Python version 3.6 and above. If we want to support Ubuntu 16.x, we need to add Python support from version 3.5 as this is the version that ships with APT (see: https://packages.ubuntu.com/xenial/python3). Given that for all the other versions of Ubuntu, Python 3.6 is the default version on APT, the question is whether we think that there is enough demand for Ubuntu 16.x to justify the work.

I note that 16.4 and 18.4 are both long-term support (LTS) releases, released on 2016-04-21 and 2018-04-26 respectively.

Add a slider for vertical levels

Currently a vertical level can be selected by entering a level number. Is it possible to add a slider (similar to the time slider) for the vertical levels?

Can not visualize the results

When i try to visualize the results it gives me this error:
I am using QGIS3.2 on Ubuntu 18.4
Thanks

`An error has occurred while executing Python code:

TypeError: Value is not an int or float type:
Traceback (most recent call last):
File "/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/plugin/ui/widget_view.py", line 209, in on_variable_selected
self.replace_variable_layer()
File "/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/plugin/ui/widget_view.py", line 249, in replace_variable_layer
dataset.path, variable.name, extra_dim_index, interp_level, interp_vert_name)
File "/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/core/transforms/wrf_netcdf_to_gdal.py", line 154, in convert_wrf_nc_var_to_gdal_dataset
geo_transform = get_geo_transform(ds, crs)
File "/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/core/transforms/wrf_netcdf_to_gdal.py", line 418, in get_geo_transform
lower_left_u = LonLat(lon=lons_u[t,0,0], lat=lats_u[t,0,0])
File "/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/core/crs.py", line 23, in init
super().init(lon, lat)
File "/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/core/crs.py", line 11, in init
self.x = as_float(x)
File "/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/core/util.py", line 43, in as_float
raise TypeError('Value is not an int or float type: {}'.format(type(val)))
TypeError: Value is not an int or float type:

Python version: 3.6.5 (default, Apr 1 2018, 05:46:30) [GCC 7.3.0]
QGIS version: 3.2.2-Bonn Bonn, 2684216

Python Path:
/usr/share/qgis/python
/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python
/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python36.zip
/usr/lib/python3.6
/usr/lib/python3.6/lib-dynload
/home/suleiman/.local/lib/python3.6/site-packages
/usr/local/lib/python3.6/dist-packages
/usr/lib/python3/dist-packages
/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python
/home/suleiman/.local/share/gis4wrf/python/local/lib/python3.6/dist-packages
/home/suleiman/.local/share/gis4wrf/python/lib/python3/dist-packages
/home/suleiman/.local/share/gis4wrf/python/lib/python3.6/dist-packages

Thanks!!

Feedback wanted: Add support for remote WRF programs execution

GIS4WRF allows to run WPS and WRF binaries on local systems. The tool could be enhanced by allowing for remote execution of the wrf program.

In order to offer such support, we first need to understand which platform and job management system is most commonly used by the community.

Please add your specific requirements to this thread so that we can have a better idea of your specific requirements.

Add geographical dataset name

In Datasets > Geo we currently display the dataset name followed by the dataset filename. We should add the dataset name and swap the order to dataset name: dataset label-- e.g. varsso: varsso.tar.bz2 -> Variance of sub-grid-scale orogoraphy: varsso.

'Import from namelist' button not working

'Import from namelist' button is currently unimplemented -- this feature was part of a legacy component that was mistakenly added when moving to the public release. We should decide if we want to support this feature or deprecate it and remove it with our next release.

Offer possibility to change pixel values in WRF netcdf data

Is your feature request related to a problem? Please describe.
We sometimes notice that geographical data is not everywhere correct (landuse in south-west NL shows glacier, which in fact is an area with a lot of green-houses).
Describe the solution you'd like
Offer the possibility to change data in WRF netcdf files, like the geo_em file. Pick a pixel (or select pixels with a polygon tool), change its value(s) and write the file

GIS4WRF not supported on Debian 9.4

After installing all dependencies, I get an error while trying to load the plugin:

SyntaxError: invalid syntax
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 337, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "/home/luis/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/init.py", line 24, in classFactory
from gis4wrf.plugin.plugin import QGISPlugin
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 665, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/luis/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/plugin/plugin.py", line 14, in
from gis4wrf.core import (
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 665, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/luis/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/core/init.py", line 8, in
from gis4wrf.core.downloaders.met import *
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 665, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/luis/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/core/downloaders/met.py", line 22
response = requests_retry_session().get(f'https://rda.ucar.edu/apps/metadata/{dataset_name}', auth=auth)
^
SyntaxError: invalid syntax

Versão do Python: 3.5.3 (default, Jan 19 2017, 14:11:04) [GCC 6.3.0 20170118]
Versão do QGIS: 3.2.0-Bonn Bonn, bc43194

Diretório do Python:
/usr/share/qgis/python
/home/luis/.local/share/QGIS/QGIS3/profiles/default/python
/home/luis/.local/share/QGIS/QGIS3/profiles/default/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python35.zip
/usr/lib/python3.5
/usr/lib/python3.5/plat-x86_64-linux-gnu
/usr/lib/python3.5/lib-dynload
/home/luis/.local/lib/python3.5/site-packages
/usr/local/lib/python3.5/dist-packages
/usr/lib/python3/dist-packages
/home/luis/.local/share/QGIS/QGIS3/profiles/default/python
/home/luis/.local/share/QGIS/QGIS3/profiles/default/python/plugins/Beeline/libs
/home/luis/.local/share/QGIS/QGIS3/profiles/default/python/plugins/shapetools/ext-libs
/home/luis/.local/share/gis4wrf/python/local/lib/python3.5/dist-packages
/home/luis/.local/share/gis4wrf/python/lib/python3/dist-packages
/home/luis/.local/share/gis4wrf/python/lib/python3.5/dist-packages

Create multiple layers for different parameters not possible

Describe the bug
It is not possible to generate multiple WRF layers in QGIS

To Reproduce
Select Layer/Add Layer/Add WRF NetCDF layer
Click on a WRF netCDF file

Existing WRF layer is replaced by the new dataset, instead of added.

Expected behavior
I would expect to see another layer that can be clicked on/off.

Further, it is not possible to create layers based on the same dataset (e.g. create layers for multiple parameters from the wrfout file)

Operating System Information (please complete the following information):
Windows 10

Allow the user to use met data from other sites different than rda.ucar.edu

Right now a user only has one option to download met data within GIS4WRF. The only option needs an account. This is very limited.

The idea is to allow the user to download the met data the way they want and give them the responsability to provide the necessary information to GIS4WRF to 'discover' these datasets:

  • dataset folder location
  • dataset folder name (format)
  • individual files name (format)
  • ...

This is more flexible than adding datasets or new sites to GIS4WRF via code and gives the user the ability to download a bunch of files in an automated way instead of having to select one by one the potential possibilities from a dataset from rda.ucar.edu.

Create WPS and WRF pre-built binaries for macOS

We do not yet ship WPS and WRF pre-built binaries for macOS. We can look into including pre-built WPS and WRF v4 binaries for macOS if there is enough demand. Let me know -- add your comments below.

The contours in the graph do not change when moving the time slider

Describe the bug
When changing the colors in "Symbology" to "Paletted/unique values" and a color ramp (e.g viridis), the colors don't change when moving the time slider. To me it seems a bug, but it could also be related to my basic experience with QGIS ;)

Operating System Information (please complete the following information):
Windows 10

LU_INDEX data cannot be displayed

While all other data of geo_em.d0x.nc files open in the Map canvas without a problem, the LU_INDEX results in an error:

Traceback (most recent call last):
File "C:/Users/Ilias/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\gis4wrf\plugin\ui\widget_view.py", line 209, in on_variable_selected
self.replace_variable_layer()
File "C:/Users/Ilias/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\gis4wrf\plugin\ui\widget_view.py", line 249, in replace_variable_layer
dataset.path, variable.name, extra_dim_index, interp_level, interp_vert_name)
File "C:/Users/Ilias/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\gis4wrf\core\transforms\wrf_netcdf_to_gdal.py", line 244, in convert_wrf_nc_var_to_gdal_dataset
''').format(name=subdataset_name, band=band_idx, rows=rows, cols=cols)}, 'vrt_sources')
File "C:\OSGEO4~1\apps\Python36\lib\site-packages\osgeo\gdal.py", line 1475, in SetMetadata
return _gdal.MajorObject_SetMetadata(self, *args)
RuntimeError: `HDF5:"C:/Users/Ilias/Desktop/test/geo_em.d02.nc"://LU_INDEX' does not exist in the file system, and is not recognized as a supported dataset name.

  • OS: Windows 10
  • QGIS 3.2.2

GIS4WRF not available on QGIS 2.x

Hi all,
I'd like to test the GIS4WRF plugin on my Ubuntu (Kubuntu) 18.04 LTS running QGIS 2.18.17, however GIS4WRF does not seem to show up on the list of available plugins...
Any idea on what would be the cause of this issue?
Genito

`Add Dataset to List` button cannot handle 'con' on Windows

On Windows, folders with name 'con' are reserved and have to be handled specially. We currently do not handle this when we try to access it with the Add Dataset to List button. When clicking on Add Dataset to List the following exception is thrown:

An error has occurred while executing Python code: 

ValueError: path is on mount '\\\\.\\con', start on mount 'C:' 
Traceback (most recent call last):
  File "C:/Users/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\gis4wrf\plugin\ui\widget_datasets.py", line 346, in on_add_geog_dataset_button_clicked
    rel_path = os.path.relpath(path, self.options.geog_dir)
  File "C:\PROGRA~1\QGIS3~1.2\apps\Python36\lib\ntpath.py", line 585, in relpath
    path_drive, start_drive))
ValueError: path is on mount '\\\\.\\con', start on mount 'C:'


Python version: 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] 
QGIS version: 3.2.2-Bonn Bonn, 26842169e9 

Python Path:
C:/PROGRA~1/QGIS3~1.2/apps/qgis/./python
C:/Users/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA~1/QGIS3~1.2/apps/qgis/./python/plugins
C:\Program Files\QGIS 3.2\bin\python36.zip
C:\PROGRA~1\QGIS3~1.2\apps\Python36\DLLs
C:\PROGRA~1\QGIS3~1.2\apps\Python36\lib
C:\Program Files\QGIS 3.2\bin
C:\PROGRA~1\QGIS3~1.2\apps\Python36
C:\PROGRA~1\QGIS3~1.2\apps\Python36\lib\site-packages
C:\PROGRA~1\QGIS3~1.2\apps\Python36\lib\site-packages\win32
C:\PROGRA~1\QGIS3~1.2\apps\Python36\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS3~1.2\apps\Python36\lib\site-packages\Pythonwin
C:/Users/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:\Users\User\AppData\Local\gis4wrf\python
C:\Users\User\AppData\Local\gis4wrf\python\lib\site-packages

Bug gis4wrf in ubuntu 18.04

Hello world,
I' m using extensions Gis4wrf, the problem it isthat the extension cannot be used because of thiserror that I send to you in attachment.
Thank you very much of your assistance and forinformation I use qgis 3.2 in ubuntu 18.04.
Cordially,
qgis_problem

Cannot open WRF namelist or run WRF: 'nml_path' is not defined

Describe the bug
When clicking on Open Configuration in Simulation > Run the following exception is raised. The same applies when clicking on Prepare Only, Run Real, or Run WRF.

An error has occurred while executing Python code: 

NameError: name 'nml_path' is not defined 
Traceback (most recent call last):
  File "/Users/User/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/plugin/ui/widget_run.py", line 116, in on_open_namelist_wrf_clicked
    self.project.update_wrf_namelist()
  File "/Users/User/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/core/project.py", line 380, in update_wrf_namelist
    logger.debug(f'{nml_path}: size of {group_name}/{var_name} as expected, skipping patch')
NameError: name 'nml_path' is not defined


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

Visualization Error with newer versions of netCDF4-python

When i try to visualize the results it gives me this error:
I am using QGIS3.2 on Ubuntu 18.4
Thanks


TypeError: Value is not an int or float type: 
Traceback (most recent call last):
  File "/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/plugin/ui/widget_view.py", line 209, in on_variable_selected
    self.replace_variable_layer()
  File "/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/plugin/ui/widget_view.py", line 249, in replace_variable_layer
    dataset.path, variable.name, extra_dim_index, interp_level, interp_vert_name)
  File "/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/core/transforms/wrf_netcdf_to_gdal.py", line 154, in convert_wrf_nc_var_to_gdal_dataset
    geo_transform = get_geo_transform(ds, crs)
  File "/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/core/transforms/wrf_netcdf_to_gdal.py", line 418, in get_geo_transform
    lower_left_u = LonLat(lon=lons_u[t,0,0], lat=lats_u[t,0,0])
  File "/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/core/crs.py", line 23, in __init__
    super().__init__(lon, lat)
  File "/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/core/crs.py", line 11, in __init__
    self.x = as_float(x)
  File "/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/core/util.py", line 43, in as_float
    raise TypeError('Value is not an int or float type: {}'.format(type(val)))
TypeError: Value is not an int or float type: 


Python version: 3.6.5 (default, Apr  1 2018, 05:46:30) [GCC 7.3.0] 
QGIS version: 3.2.2-Bonn Bonn, 2684216 

Python Path:
/usr/share/qgis/python
/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python
/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python36.zip
/usr/lib/python3.6
/usr/lib/python3.6/lib-dynload
/home/suleiman/.local/lib/python3.6/site-packages
/usr/local/lib/python3.6/dist-packages
/usr/lib/python3/dist-packages
/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python
/home/suleiman/.local/share/gis4wrf/python/local/lib/python3.6/dist-packages
/home/suleiman/.local/share/gis4wrf/python/lib/python3/dist-packages
/home/suleiman/.local/share/gis4wrf/python/lib/python3.6/dist-packages`

Thanks!!

Cannot open WRF netCDF datasets on macOS

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

Geographic data selection sometimes not fully restored when loading project

Describe the bug
When loading an existing project then in certain cases the geographic data selection input fields are only partly filled in even though all fields had been filled in before.

To Reproduce
Steps to reproduce the behavior:

  1. Follow tutorial instructions
  2. Close/re-open QGIS
  3. Load the tutorial project
  4. Observe "Selection" input fields may be partly empty.

The JSON project file has all information correct, so this is just a UI issue. It doesn't seem to happen all the time.

Screenshots
image

Operating System Information (please complete the following information):
Windows 10

Cannot rerun WPS/WRF if output file is open or has been viewed Windows

The typcal locking of files on Windows... Rerunning WPS/WRF after a file has been opened and closed results in PermissionError on Windows:

PermissionError: [WinError 32] The process cannot access the file because it is being used by another process

This is really a driver (GDAL) problem but we should handle it in some way.

'Export to namelist' button raises error

Une erreur est survenue lors de l'éxécution du code Python:

AttributeError: 'Project' object has no attribute 'export_namelists'
Traceback (most recent call last):
File "C:/Users/th137147/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\gis4wrf\plugin\ui\widget_domains.py", line 282, in on_export_geogrid_namelist_button_clicked
self.project.export_namelists(folder)
AttributeError: 'Project' object has no attribute 'export_namelists'

Version de Python : 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)]
Version de QGIS : 3.2.0-Bonn Bonn, bc43194061

Chemin Python :
C:/PROGRA1/QGIS31.2/apps/qgis/./python
C:/Users/th137147/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/th137147/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA1/QGIS31.2/apps/qgis/./python/plugins
C:\Program Files\QGIS 3.2\bin\python36.zip
C:\PROGRA1\QGIS31.2\apps\Python36\DLLs
C:\PROGRA1\QGIS31.2\apps\Python36\lib
C:\Program Files\QGIS 3.2\bin
C:\PROGRA1\QGIS31.2\apps\Python36
C:\PROGRA1\QGIS31.2\apps\Python36\lib\site-packages
C:\PROGRA1\QGIS31.2\apps\Python36\lib\site-packages\win32
C:\PROGRA1\QGIS31.2\apps\Python36\lib\site-packages\win32\lib
C:\PROGRA1\QGIS31.2\apps\Python36\lib\site-packages\Pythonwin
C:/Users/th137147/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:\Users\th137147\AppData\Local\gis4wrf\python
C:\Users\th137147\AppData\Local\gis4wrf\python\lib\site-packages
C:/Users/th137147/Documents/gis4wrf

Cannot connect to RDA server through proxy

@kikocorreoso reported an issue when connecting to the RDA server through proxy (moved from #23):

requests.exceptions.SSLError: HTTPSConnectionPool(host='rda.ucar.edu', port=443): Max retries exceeded with url: /apps/metadata/ds083.3 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:749)'),)) 
Traceback (most recent call last):
  File "D:\QGIS\apps\Python36\lib\site-packages\urllib3\connectionpool.py", line 595, in urlopen
    self._prepare_proxy(conn)
  File "D:\QGIS\apps\Python36\lib\site-packages\urllib3\connectionpool.py", line 816, in _prepare_proxy
    conn.connect()
  File "D:\QGIS\apps\Python36\lib\site-packages\urllib3\connection.py", line 326, in connect
    ssl_context=context)
  File "D:\QGIS\apps\Python36\lib\site-packages\urllib3\util\ssl_.py", line 329, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "D:\QGIS\apps\Python36\lib\ssl.py", line 401, in wrap_socket
    _context=self, _session=session)
  File "D:\QGIS\apps\Python36\lib\ssl.py", line 808, in __init__
    self.do_handshake()
  File "D:\QGIS\apps\Python36\lib\ssl.py", line 1061, in do_handshake
    self._sslobj.do_handshake()
  File "D:\QGIS\apps\Python36\lib\ssl.py", line 683, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:749)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\QGIS\apps\Python36\lib\site-packages\requests\adapters.py", line 440, in send
    timeout=timeout
  File "D:\QGIS\apps\Python36\lib\site-packages\urllib3\connectionpool.py", line 668, in urlopen
    **response_kw)
  File "D:\QGIS\apps\Python36\lib\site-packages\urllib3\connectionpool.py", line 668, in urlopen
    **response_kw)
  File "D:\QGIS\apps\Python36\lib\site-packages\urllib3\connectionpool.py", line 668, in urlopen
    **response_kw)
  File "D:\QGIS\apps\Python36\lib\site-packages\urllib3\connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "D:\QGIS\apps\Python36\lib\site-packages\urllib3\util\retry.py", line 388, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='rda.ucar.edu', port=443): Max retries exceeded with url: /apps/metadata/ds083.3 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:749)'),))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:/Users/U406328/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\gis4wrf\plugin\ui\widget_met.py", line 126, in on_dataset_changed
    self.products = get_met_products(dataset_name, auth)
  File "C:/Users/U406328/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\gis4wrf\core\downloaders\met.py", line 22, in get_met_products
    response = requests_retry_session().get(f'https://rda.ucar.edu/apps/metadata/{dataset_name}', auth=auth)
  File "D:\QGIS\apps\Python36\lib\site-packages\requests\sessions.py", line 521, in get
    return self.request('GET', url, **kwargs)
  File "D:\QGIS\apps\Python36\lib\site-packages\requests\sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "D:\QGIS\apps\Python36\lib\site-packages\requests\sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "D:\QGIS\apps\Python36\lib\site-packages\requests\adapters.py", line 506, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='rda.ucar.edu', port=443): Max retries exceeded with url: /apps/metadata/ds083.3 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:749)'),))


Python version: 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] 
QGIS version: 3.2.0-Bonn Bonn, bc43194061

Enable isoline plots

Is your feature request related to a problem? Please describe.
Contour plots are supported by GIS4WRF, but isolines not.
Describe the solution you'd like
I propose to add a feature to plot isolines. Example: pressure isolines. Here is an example (combined with coloured wind speed vectors):

image

Offer clear geo dataset groups

Is your feature request related to a problem? Please describe.
In geographical data, it is not clear which DataSet groups contain all essential data for running geogrid.
Describe the solution you'd like
Only specify datasets (e.g. lowres, default) that contain geographical data to run geogrid

Cannot open WPS configuration file: 'ascii' codec can't decode byte 0xe2 in position 200

On macOS, when clicking on Open Configuration under Simulation > Run > WPS the following exception is raised:

An error has occurred while executing Python code: 

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 200: ordinal not in range(128) 
Traceback (most recent call last):
  File "/Users/User/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/plugin/ui/widget_run.py", line 111, in on_open_namelist_wps_clicked
    get_namelist_schema('wps'))
  File "/Users/User/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/core/readers/namelist.py", line 54, in get_namelist_schema
    schema = yaml.load(f)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/yaml/__init__.py", line 70, in load
    loader = Loader(stream)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/yaml/loader.py", line 34, in __init__
    Reader.__init__(self, stream)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/yaml/reader.py", line 85, in __init__
    self.determine_encoding()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/yaml/reader.py", line 124, in determine_encoding
    self.update_raw()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/yaml/reader.py", line 178, in update_raw
    data = self.stream.read(size)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 200: ordinal not in range(128)


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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.