geogrid error

178 views
Skip to first unread message

Aarti Soni

unread,
Jul 19, 2023, 8:07:40 AM7/19/23
to wrf-hydro_users
Hello everyone,

I am a new user of WRF-Hydro and getting errors while processing the geogrid file (error image attached below). I am using 30s DEM downloaded from https://www.hydrosheds.org/hydrosheds-core-downloads  

As my domain resolution is 27000m, I have selected regridding (nest) factor 270 and the Number of routing cells to define stream 100
I am not getting Where am I making a mistake? 
I would appreciate it if anyone can help me out.

Thank you


Kevin

unread,
Jul 19, 2023, 11:18:22 AM7/19/23
to wrf-hydro_users, Aarti Soni
Aarti,

Can you post a screenshot or copy/paste of the tool messages? Also, can you indicate which WRF-Hydro GIS Pre-processor you are using (ArcGIS or Open-source)?

I also want to note that using a nest factor of 270 is extremely high. We typically suggest nest factors <=20. A nest factor of 270 results in 72,900 routing grid cells for every land surface model cell. I think you will not get much benefit from this configuration and should consider higher resolutions for your LSM if possible.

Thanks,

Kevin

Aarti Soni

unread,
Jul 20, 2023, 1:09:19 AM7/20/23
to wrf-hydro_users, Kevin, Aarti Soni
Hi Kevin,

Thanks for your reply. I forgot to attach the screenshot.
PFA

Aarti
error.jpg

Aarti Soni

unread,
Jul 20, 2023, 7:34:51 AM7/20/23
to wrf-hydro_users, Aarti Soni, Kevin
I am using ArcGIS. I have just modified the resolution at 9km and still I am getting the same error.

Thanks
Aarti

Kevin

unread,
Jul 20, 2023, 10:45:44 AM7/20/23
to wrf-hydro_users, Aarti Soni, Kevin
Aarti,

Thank you for the screenshot, but I cannot see the error messages. Could you copy the "Messages" portion or the full tool output to a text file and send it to me so that I can examine where the error occurred?

Thank you,

Kevin

Aarti Soni

unread,
Jul 21, 2023, 1:18:43 AM7/21/23
to wrf-hydro_users, Kevin, Aarti Soni
Hi Kevin,
The attached txt file shows an error while processing the 9000m geogrid file. I am making a mistake in calculation of the regridding nest factor and the number of routing grid cells to define stream. Kindly help in this regard.
PFA

Thanks
routing_grid_cell_36thr.zip.log

Kevin

unread,
Jul 21, 2023, 11:55:17 AM7/21/23
to wrf-hydro_users, Aarti Soni, Kevin
Aarti,

It looks like you lack the sufficient license level to run these tools. I am not sure why it is trying to find an Image Server license unless you are running these tools using ArcGIS Server. If you have access to ArcGIS Desktop or ArcGIS Pro (preferred), I suggest running these tools in that environment. Alternatively, we have an open-source command-line GIS Pre-processor you can explore, here: https://github.com/NCAR/wrf_hydro_gis_preprocessor

As far as selecting the routing resolution and stream definition threshold, these will be up to you and your desired configuration. Your latest tool messages indicate you are selecting a nest factor of 36 against a 9000m LSM resolution, which results in a 250m routing resolution. This seems fine, although maybe a little coarse for a small domain. The stream definition threshold (number of cells to define a stream) is a bit high. Using a value of 250 at a routing resolution of 250m yields a channel below every 15.625 square kilometers. I would check the resulting stream network density against known stream locations in your region to see if this is appropriate or too sparse to replicate channel locations in your region of interest. Using a lower threshold results in a denser stream network, and using a higher threshold results in a more sparse stream network.

Thank you,

Kevin

Aarti Soni

unread,
Jul 24, 2023, 7:53:56 AM7/24/23
to wrf-hydro_users, Kevin, Aarti Soni
Hi Kevin,

Thanks for the reply.
I have downloaded the test case (croton_lambert) and it ran successfully (see attachment) in the same ArcGIS. If the problem is with ArcGIS then how the test case ran successfully?
I have tried with 1000m resolution for my data file, but still, it is showing the same error. I am not getting where I am making mistakes. 

Thanks for your help
NHD30_thrhld32.zip.log

Aarti Soni

unread,
Jul 24, 2023, 8:35:56 AM7/24/23
to wrf-hydro_users, Aarti Soni, Kevin
Kevin,
Could you please check the files I have created in WRF-WPS?
Please find the attached file below.

Thanks

namelist.wps
geo_em.d01.nc

Kevin Sampson

unread,
Jul 24, 2023, 12:04:05 PM7/24/23
to Aarti Soni, wrf-hydro_users
Aarti,

What do you want me to check in the files you sent? The geogrid file you provided (geo_em.d01.nc) is from our Croton test case. The namelist.wps file you provided specifies 2 domains, one with grid resolution of 1000.0m with a grid dimensions (799x499) and a nested domain with resolution 333.333m and grid dimensions (120x99). The only suggestion I have with this setup is that it will be slightly easier if you choose a nest ratio (parent_grid_ratio) that yields a whole number.

I have never seen this Image Server error, so I am not sure what is causing it. My colleague found this article that describes the Image Server error you are seeing and how to potentially fix it by turning off the parallel processing factor. You may be able to set this at the tool level or you may have to set it at the system level in the ArcMap preferences or options.


I think that the smaller domains may be working in the WRF-Hydro ArcGIS Pre-processor because they can run on one core. Perhaps it is the internal parallel processing in ArcGIS that is causing the issue. You can call Esri Support with this error information and see what they can suggest. 

Thanks,

Kevin
Kevin Sampson, GISP
Associate Scientist
National Center for Atmospheric Research
Boulder, Colorado

Aarti Soni

unread,
Jul 31, 2023, 7:03:36 AM7/31/23
to wrf-hydro_users, Kevin, wrf-hydro_users, Aarti Soni
Hello Kevin,

In my previous email, by mistake, I sent you the geogrid file (geo_em.d01.nc) of the test case. I have modified the namelist and created a new geogrid file and still, I am getting the same error, even after turning off the parallel processing factor.

At the same time, I managed to get it to work with ArcGIS Pro. In ArcGIS Pro, again I am getting an error in the second (export grid from geogrid file) and the third step (Process GEOGRID File). Please see the screenshots. 
Is there any video or user guide for working with GIS pre-processing in ArcPro?
I need to solve this issue, kindly help. 

Thank you. 

process_geogrid_error.png
export_grid_error.png

varsha premachandran

unread,
Jul 31, 2023, 11:45:29 PM7/31/23
to wrf-hydro_users, Aarti Soni, Kevin, wrf-hydro_users, Aarti Soni
Hello
I am also having the same issue. Kindly suggest a solution.

Thank you

Kevin

unread,
Aug 2, 2023, 2:07:09 PM8/2/23
to wrf-hydro_users, Aarti Soni, Kevin, wrf-hydro_users, Aarti Soni
Aarti,

Did you modify the wrf_hydro_functions.py script? The error message you displayed indicates that the script cannot find functions in wrf_hydro_functions.py. The "Process Geogrid File" tool cannot find 'sa_functions' and the "Export grid from GEOGRID file" tool cannot find the "subset_ncVar" function. These functions should both be there. I would re-download the WRF-Hydro ArcGIS Pre-processing tools from GitHub (the current master version) and refresh ArcGIS Pro, then re-try. I have not experienced either of these errors in ArcGIS pro, and would not expect them unless the scripts have been modified or you are using an older version of the GIS Pre-processing scripts.

Kevin

varsha premachandran

unread,
Aug 4, 2023, 4:42:41 PM8/4/23
to wrf-hyd...@ucar.edu
Hello
    I tried with the edited version that you have sent. Now It shows an error in the third step.
image.png

--
You received this message because you are subscribed to a topic in the Google Groups "wrf-hydro_users" group.
To unsubscribe from this topic, visit https://groups.google.com/a/ucar.edu/d/topic/wrf-hydro_users/sUzZ20MeOS0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wrf-hydro_use...@ucar.edu.
To view this discussion on the web visit https://groups.google.com/a/ucar.edu/d/msgid/wrf-hydro_users/497eb034-480c-4128-b5cc-70b1dc7c2fa8n%40ucar.edu.

Kevin

unread,
Aug 4, 2023, 4:48:35 PM8/4/23
to wrf-hydro_users, varsha premachandran
Aarti,

The error is occurring when trying to execute the Fill tool, which is one of the Spatial Analyst Hydrology tools. The error is a very general error and it is indicating an issue with your input raster dataset. Have you tried to run the Fill tool on your input DEM? Give that a try to make sure this tool is working properly in your ArcGIS Pro software. If you get this issue running the Fill tool, then you can contact Esri, since there appears to be an error causing the tool to fail. I suspect an licensing issue related to Spatial Analyst. If that is the case, you can try the open-source WRF-Hydro GIS Pre-processing tools.

Thanks,

Kevin

To unsubscribe from this group and all its topics, send an email to wrf-hydro_users+unsubscribe@ucar.edu.

varsha premachandran

unread,
Aug 7, 2023, 11:58:48 AM8/7/23
to Kevin, wrf-hydro_users
hello 

I have tried that, but again getting errors in the processing geogrid step. The error has been attached in this mail. Please help me to rectify the error.

Thanks

To unsubscribe from this group and all its topics, send an email to wrf-hydro_use...@ucar.edu.
step 4 error.png

Kevin

unread,
Aug 7, 2023, 12:04:10 PM8/7/23
to wrf-hydro_users, varsha premachandran, wrf-hydro_users, Kevin
Just to clarify, you tried to run the ArcGIS Pro "Fill" tool within the Spatial Analyst > Hydrology" toolset and it completed without error on your input DEM ("hyd_as_dem_30s.tif")?

The error message you sent most recently appears to be happening in a different (later) portion of the script. It appears to be during the lake pre-processing. Have you tried without lakes to see if the script will complete? I would like to test this domain on my end. Can you package up and share with me the inputs? This includes:
Once I have those, I can test your exact configuration to see if the issue is reproduced in my ArcGIS Pro environment.

Thank you,

Kevin

To unsubscribe from this group and all its topics, send an email to wrf-hydro_users+unsubscribe@ucar.edu.

Aarti Soni

unread,
Aug 16, 2023, 2:41:16 AM8/16/23
to wrf-hydro_users, Kevin, Aarti Soni, wrf-hydro_users
Hi Kevin,
Thank you for all your suggestions and help.
There was some issue related to updates. After the update, it works properly.

I have a question regarding the outputs. In the CSV file, I gave six station details which create 6 sub-basins (screenshot attached) and 6 forecast points.
Why the forecast point for the 6th basin is coming out of the basin boundary (screenshot attached)?
Could you please see

Thank you
basin_mask.jpg
forecast_point.jpg

Kevin

unread,
Aug 16, 2023, 11:26:33 AM8/16/23
to wrf-hydro_users, Aarti Soni, Kevin, wrf-hydro_users
Aarti,

This result is very strange indeed. Typically, the forecast point (coordinates come from the input CSV file) will be snapped to the cell with the highest flow accumulation with a snapping tolerance (default is 3 cells). Then the basin is delineated from that (downstream) point. It is very strange that your forecast point for basin 6 seems to have snapped upstream rather than downstream. However, it is difficult to tell where the stream channels are in your image. As long as this forecast point is on the correct channel in your model domain, I think this is okay because you got a nice big basin delineation as the result. You can always try moving this point slightly, by adjusting its coordinates in the CSV file, to produce a better result. You can read Section 8.2 in the WRF-Hydro GIS Pre-processing documentation for more information on this iterative process.

Thanks,

Kevin

Reply all
Reply to author
Forward
0 new messages