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

a landuse problem in geogrid

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.

Jinlong Ma

New member
Dear users of wrf
I wanted to use the new landuse to replace the default one in order to stimulate the metrology of the domain in China. The grid size is 200x130 in WRF and 197x127 in CMAQ. I used modis-mcd12 2016 landuse data to change the default setting in WPS, but it didn't work well. The picture below are the landuse_index,lai12m and landmask in file, I didn't know what happened to it.


Several steps I took to modify the landuse type in WPS. I will list them below.
First, I downloaded the modis-mcd12 landuse data from the NASA website and then used ArcGIS to process the data.
Second, I used GDAL to change the ASCII file into binary format and modified the file name 00001-xxxxx.00001-xxxxx.
Third, I wrote a index file and added arguments (landmask_water= mcd12q1:17, interp_option = mcd12q1:nearest_neighbor,rel_path = mcd12q1:test_modis/). After that, I modified arguments in the namelist.wps.
I will attach these files mentioned above to this post.
I guess there is a problem in my landuse binary file, but I don't know how to figure out it.
I will appreciate it a lot for your advice.


  • attachment.7z
    2.7 MB · Views: 79
Thanks very much for attaching your input files. Having taken a quick look at your 00001-00201.00001-00131 file, it looks like four bytes are being used to represent each value (the size of the file is 201 * 131 * 4 bytes), and the bytes look like they may be in little-endian order.

In your index file, could you try changing "wordsize=1" to "wordize=4", and could you also add "endian=little"?

With these changes, I'm able to get a better representation of the land use index field, but it looks like there may be two problems:
(1) The dataset doesn't cover the entire domain defined in your namelist.wps file, and
(2) there appears to be a positional shift in the LANDMASK field towards the eastern part of the domain, which may be due to a map projection issue or to an inaccurate specification of the grid cell size for the MCD12Q1 data.
Dear mgduda
It works!!! Your advice is really helpful. I'd like to express my appreciation for it. I just studied the WRF model a few months ago, so I was not familiar with it. How do you check up the binary file (eg.00001-00201.00001-00131 file), used utilities or methods? could you recommend them to me? It is so good for me to learn from you.