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

Handle archives when downloading met data #114

Closed buseyet closed 5 years ago

buseyet commented 5 years ago

When I run the GIS4WRF Amsterdam Tutorial for 1 day and 6 hours (from July 15, 2018, at 12:00 to July 16, 2018, 18:00), I get a Python Error:

RuntimeError: /path/to/file/gis4wrf/datasets/met/ds083.3/Analysis/201807151200-201807161800/gdas1.fnl0p25.2018071512-2018071618.f00.grib2.spasub.yetisti348231.tar is a grib file, but no raster dataset was successfully identified.

It creates a tar file because the file is large.

I use macOS 10.13.6

Is there a limitation of time or area to use GIS4WRF?

Because I need to run for a year later on.

dmey commented 5 years ago

We currently do not handle this case -- that is, when met data are downloaded as archive.

This is definately somethig that we will look into implementing in the next couple of releses but I cannot give you definite date at the moment.

If this is a blocking issue for you at the moment, I would suggest configuring the domain in GIS4WRF so you can get the extent of you domain and dowload the met data manually from NCAR RDA (you can set the extent there too so you won't have to download data for the whole globe). After you have downloaded the data, uncompress them and move all your grib files under gis4wrf/datasets/met/ds083.3/Analysis/<START_DATE>-<END_DATE>/ where - is the name of the folder in format YYYYMMDDHHMM-YYYYMMDDHHMM e.g. 201807151200-201807161800 for the data downloaded in the tutorial.

Having said that, we would also welcome any contributions to the project. If can start by looking at the Development notes or at these two functions resposible to your specific question to familiarise yourself with the code:

https://github.com/GIS4WRF/gis4wrf/blob/4d1dd4e608eaca9004f5767728a91b37cffbe279/gis4wrf/core/downloaders/met.py#L147-L161

and

https://github.com/GIS4WRF/gis4wrf/blob/4d1dd4e608eaca9004f5767728a91b37cffbe279/gis4wrf/core/downloaders/util.py#L14-L37

pulsinger commented 5 years ago

I've got to same runtime error as above. When trying to run a new custom domain (e.g. in Germany), the meteo data (from NCAR, ds.083.3) are downloaded succesufully for the selected domain and time range selected. However they remain in .tar in the specific folder - and are not being extracted. Hence, the metgrid can't locate and map the data automatically the files and no VTables are generated.

Here is the error: RuntimeError: C:\Users**\Documents\gis4wrf\datasets\met\ds083.3\Analysis\201806010000-201806080000\gdas1.fnl0p25.2018060100-2018060800.f00.grib2.spasub.**349000.tar is a grib file, but no raster dataset was successfully identified

The data from NCAR are actually there but the whole process stops because of the above. Data are just for 1 week.

There is an option to add the meteo data manualy for the domain, however it requires the proper VTable ... which is being not generated in the previous step.

buseyet commented 5 years ago

The above solution works. Download the data from NCAR RDA website, put it the unziped version of it in the file met/ds.083.3/analysis file with the name -, then in the model choose that and click "use dataset selection from list".

pulsinger commented 5 years ago

It worked when I unziped the data, save the project as GIS4WRF project, quit QGIS and started it again. Then data were visibile again and I could run the model.

letmaik commented 5 years ago

This issue is fixed and will be part of the next release.