Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geogrid.exe fails due to geog directory named "_con" #43

Closed
conorsy opened this issue Dec 3, 2019 · 9 comments
Closed

geogrid.exe fails due to geog directory named "_con" #43

conorsy opened this issue Dec 3, 2019 · 9 comments
Labels
question Further information is requested

Comments

@conorsy
Copy link

conorsy commented Dec 3, 2019

Describe the bug
geogrid.exe is looking for orography data in DATA\geog/orogwd_1deg/con/index. However, windows does not allow any directory to be named "con". When geog data are unpacked, this directory gets named "_con", and cannot be renamed to "con". Hence, geogrid.exe fails.

To Reproduce
Steps to reproduce the behavior:
Run geogrid.exe following standard test case on https://gis4wrf.github.io/tutorials/wrf-cmake/simulate-the-2018-european-heat-wave-with-wrf-cmake/#download-geographical-data

Expected behavior
Code is actually behaving as expected. The problem is the path geogrid.exe uses to search for orography data, and the inability of Windows to name a directory "con".

System information (please complete the following information):

  • Windows 10 pro
  • Using downloaded binary wps-cmake-4.1.0-basic_nesting-serial-x64-windows-release.zip

Additional context
The code runs, so it's not really a bug, but geogrid.exe won't work without the orog data, so it's not really a feature request either...

@letmaik
Copy link

letmaik commented Dec 3, 2019

Did you download the geographical data via gis4wrf? It specifically handles the "con" case during extraction on Windows.

@dmey
Copy link

dmey commented Dec 3, 2019

@conorsy we do take care of this in out sister project GIS4WRF automatically (here) but we have not documented how to do this manually in the tutorial -- thanks for pointing this out! 👍

In essence after unarchiving geog data folder, you are left with a directory named _con as you described. As a workaround, you can rename the folder con on windows by using the command prompt and the following syntax:

move <ABSOLUTE_PATH_TO_FOLDER>_con \\?\<ABSOLUTE_PATH_TO_FOLDER>con

where <ABSOLUTE_PATH_TO_FOLDER> is the PATH to the parent directory of _con/con . So, in your case, this would be something like:

move C:\DATA\geog\orogwd_1deg\_con \\?\C:\DATA\geog\orogwd_1deg\con

To later remove the folder -- you can then use the command prompt again with the following:

rd /q /s \\?\<ABSOLUTE_PATH_TO_FOLDER>con

I will try to document this in the tutorial but if manage, would would also appreciate contributions -- The page to amend is at https://github.com/GIS4WRF/gis4wrf.github.io/blob/dmey/tutorials/docs/tutorials/wrf-cmake/simulate-the-2018-european-heat-wave-with-wrf-cmake.md and you can directly edit it on GitHub and create a PR or manually fork it and send us a PR if you fancy.

@dmey dmey added the question Further information is requested label Dec 3, 2019
@letmaik
Copy link

letmaik commented Dec 3, 2019

@dmey The tutorial should be fixed. It shouldn't advise people to manually download and unzip data but instead use the GUI in gis4wrf, same as what's advised for met data.

@dmey
Copy link

dmey commented Dec 3, 2019

@letmaik the tutorial was originally meant to be used by users not wishing to use GIS4WRF. There is another tutorial for GIS4WRF only at https://gis4wrf.github.io/tutorials/. We can change this but I think it would be an extra burden for people to install and set up QGIS and GIS4WRF if the purpose is to simply run WRF simulations. Let me know what you think but I would simply make a note about this in the current tutorial.

@dmey
Copy link

dmey commented Dec 3, 2019

@conorsy one other thing, since this is really a limitation on Windows due to the current naming used it may be worth raising the concern with the WRF Team directly by opening an issue on https://github.com/wrf-model/WRF or https://github.com/wrf-model/WPS and linking it to this one.

@conorsy
Copy link
Author

conorsy commented Dec 3, 2019

Wow, thanks both for your speedy replies! I can confirm that the command-line renaming worked on my Windows 10 Pro. I'll see if I can amend the tutorial page accordingly, and will raise an issue on the wrf-model/WPS page.

I am interested in using WRF binaries on Windows for teaching purposes. I'll be teaching the students how to do data analysis with python/xarray/cartopy, so am much happier not having to get them to install QGIS and GISWRF.

All the best.

@conorsy
Copy link
Author

conorsy commented Dec 3, 2019

Hi again,

I got the reply below from @mgduda in WRF:

It seems like simply renaming the con sub-directories in the GEOGRID.TBL file to _con might allow the WPS to handle the renaming that Windows performs:

===============================
name = CON
        priority = 1
        dest_type = continuous
        masked=water
        fill_missing=0.
        interp_option = default:average_4pt
        interp_option =  lowres:wt_average_4pt
        interp_option = 10m:average_4pt
        interp_option = 20m:average_4pt
        interp_option = 30m:average_4pt
        interp_option = 1deg:average_4pt
        interp_option = 2deg:average_4pt
        rel_path = default:orogwd_10m/_con/
        rel_path =  lowres:orogwd_1deg/_con/
        rel_path = 10m:orogwd_10m/_con/
        rel_path = 20m:orogwd_20m/_con/
        rel_path = 30m:orogwd_30m/_con/
        rel_path = 1deg:orogwd_1deg/_con/
        rel_path = 2deg:orogwd_2deg/_con/
===============================

I think we'd be disinclined to make this change in the repository, but it might be another option for Windows users.

So, if you (WRF-CMake) could use a different GEOGRID.TBL when building the binaries for Windows, then that would solve it!

(I'm not sure how high a priority this is, though...)

@conorsy conorsy reopened this Dec 3, 2019
@letmaik
Copy link

letmaik commented Dec 3, 2019

@conorsy Renaming to _con is done by the decompression software, and there is no standard for this. Different software can use different alternative names, e.g. con_. Some software may decide to simply fail during decompression. The only real fix in my opinion is to change this in the dataset.

@conorsy
Copy link
Author

conorsy commented Dec 3, 2019

Fair point. Thanks again for the workaround.

@conorsy conorsy closed this as completed Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Development

No branches or pull requests

3 participants