Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

(RESOLVED) Writing issue with NLCD 30 m data to a file in the geogrid binary format

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.


New member
Recently, I have been trying to use NLCD 30 m data for WRF. Now they only provide the NCLD data for the entire US. I can either put the entire NLCD data or crop the area which I am interested in. But for both methods, I have encountered some difficulties and need help.

For putting the entire big chunk of data, the data has a very high resolution. With this resolution, the data has 10^5 pixels in both directions and need 6 digits to represent pixel numbers. The problem is that geogrid.exe only reads the file of geogrid binary format with a filename that only has 5 digits. Is that possible that I can go around with this and make the geogrid.exe to read filename with 6 digits?

For cropping area, I don't have a good tool for now. The default tool provided by the website is not free and needs a license. Do you happen to know another way to do this?
If you're using a recent release of the WPS (perhaps v4.0 or later?), there is a keyword that you can add to the 'index' file for your dataset that will enable you to use six digits in filenames: filename_digits . Adding
filename_digits = 6
to your 'index' file should be all that's needed.

Unfortunately, I don't know of any utilities for cropping datasets. The easiest approach may be to just prepare the dataset for the entire US. If you split the dataset into tiles, that would eliminate the need to read in the entire dataset in geogrid when setting up a geographically small domain -- the geogrid program will read in just the tiles from the dataset that are needed to cover your WRF domain.