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

Importing new landcover into WRF

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.

kyle_r

New member
I am having an issue with importing a new land cover dataset into WRF and was hoping I could get some pointers in doing this. I am wanting to use only the NLCD 2011 dataset as my new land cover. I have reclassified the NLCD landcover categories using ArcMap to align with the NLCD40 landcover category entries in LANDUSE.TBL and VEGPARM.TBL. I then converted the image to binary format using gdal_translate, which gave me one binary file with the naming system in the WRF manual (00001-ncols.00001-nrows). I have put the file in my geog folder and created an index file also (I've copied it below). It goes up to 99 because the NLCD40 Commercial/industrial landcover is labeled as 99 to use the urban canopy model. The new mminlu I have used is NLCD2011. When I go to run geogrid, I get the error "ERROR: MMINLU values differ among input fields. Based on reading LANDUSEF using entry 3 from GEOGRID.TBL mminlu = MODIFIED_IGBP_MODIS_NOAH but a previous GEOGRID.TBL entry resulted in mminlu being set to to NLCD2011". The GEOGRID.TBL entry is also pasted below (it is the third entry for LANDUSEF, so priority is 3). Do you know why it would tell me that my GEOGRID.TBL mminlu = MODIFIED_IGBP_MODIS_NOAH? I don't have that set in my index file and there isn't a place where it is specified in the GEOGRID.TBL entry.

index file:
type=categorical
category_min=1
category_max=99
projection=albers_nad83
dx=30.0
dy=30.0
known_x=1
known_y=104424
known_lat = 48.707394
known_lon = -130.232828
truelat1=29.5
truelat2=45.5
stdlon=-96.0
wordsize=1
missing_value=0.
filename_digits=6
tile_x=161190
tile_y=104424
tile_z=1
units="category"
description="NLCD 2011 with urban reclassified for SLUCM"
mminlu="NLCD2011"

GEOGRID.TBL entry:
===============================
name=LANDUSEF
priority=3
dest_type=categorical
z_dim_name=land_cat
interp_option = nearest_neighbor
abs_path = /group/sunf/Reed/geog/NLCD2011Reclass/
===============================

Thanks for your help,
Kyle
 
Hi Kyle,

Can you attach your full GEOGRID.TBL, the geogrid.log, and your namelist.wps file so that I can take a look at those?

You mentioned that you have a created binary file in your geog/ directory. Is this just one file that covers the full extent of the landcover?

Thanks!
 
Hi,

I have attached the three documents to this post. Yes, the binary file covers the entire CONUS. I used the gdal_translate command in the WRF manual (gdal_translate -of ENVI foo.tif data.bil) to create the binary file.

Kyle
 
Kyle,
Thanks for sending those. In your GEOGRID.TBL, you have these 2 lines for the "priority 3" LANDUSEF category:

Code:
interp_option = nearest_neighbor
abs_path =    /group/sunf/Reed/geog/NLCD2011Reclass/

Can you try to change those to:

Code:
interp_option = default:nearest_neighbor
abs_path =default:/group/sunf/Reed/geog/NLCD2011Reclass/

and let me know if that makes any difference.
 
Hi,

Unfortunately it didn't work. I copied the two lines directly from here to GEOGRID.TBL (copied below), and received the same message:
"Parsed 27 entries in GEOGRID.TBL
Processing domain 1 of 3
ERROR: MMINLU values differ among input fields. Based on reading LANDUSEF using entry 3 from GEOGRID.TBL mminlu = MODIFIED_IGBP_MODIS_NOAH but a previous GEOGRID.TBL entry resulted in mminlu being set to to NLCD2011"

The new GEOGRID.TBL entry is:
name=LANDUSEF
priority=3
dest_type=categorical
z_dim_name=land_cat
interp_option = default:nearest_neighbor
abs_path =default:/group/sunf/Reed/geog/NLCD2011Reclass/
 
Kyle,
If it's possible, can you send me your landuse file? I assume it will be too large to attach here. If so, then take a look at the home page for this forum:
http://forum.mmm.ucar.edu/
The top section provides instructions for uploading larger data to our cloud server. Please let me know when it's fully uploaded so that I can fetch it. Thanks.
 
Yes, I can do that. Yesterday, I copied the original GEOGRID.TBL, then removed the priority 1 and 2 entries for LANDUSEF, making my new landuse entry priority 1. I also added "dominant = LU_INDEX" to the it since that was on the original priority 1 entry. I was able to get geogrid to complete, but every LU_INDEX value in the domain was 1.0000. I wasn't sure how to read the binary file, so I will be interested in what it says.
The file has been uploaded as a.gz file (00001-161190.00001-104424.gz)
 
Kyle,
Thank you for sending that. It allowed me to test a few different things. I think I've determined that there does seem to be something wrong with the file. When using python scripts to try to plot it, read it, etc., I'm getting all kinds of errors, but haven't tracked down exactly why yet. I also seem to be getting values of zero at every index I try. However, upon doing some research, I found that one of my colleagues has actually already prepared the tiled NLCD2011 data, which you can download here: http://www2.mmm.ucar.edu/people/duda/files/nlcd2011_30m.tar.gz

I would recommend using that, instead, since we know that it should work. Just a few "FYI" pointers for the future, or if you still want to try to prepare these data yourself:
- He recommends that the data should be tiled, instead of using 1 large file. It is tough for the geogrid program to try to read in a 16 GB data file at one time.
- When renaming the tile(s), since the data have more than 99999 points in each direction (which you've realized and added the "filename_digits = 6" line to your index file), I believe that means that all the values in the name need to be 6 digits long. So, in other words, the file you have should be named : 000001-161190.000001-104424 (just adding an extra 0 to the 00001 parts).

One significant issue in trying to use the native NLCD 2011 data is the classification scheme used in the dataset. The NLCD 2011 data provides the categories described at https://www.mrlc.gov/data/legends/national-land-cover-database-2011-nlcd2011-legend while the Noah scheme in the WRF model only supports the land use classifications defined in the VEGPARM.TBL file. There are two options that should work to overcome this:
(1) to add a new entry to the VEGPARM.TBL table describing the native NLCD 2011 categories; or
(2) to remap the native NLCD 2011 categories to one of the sets defined in the VEGPARM.TBL. This approach may be the best, especially if you were to remap to the "NLCD40" set defined in the VEGPARM.TBL file. Remapping should be as simple as writing a small script to read the binary tiles of data and to remap the categories from native to NLCD40, one pixel at a time, before updating the 'index' file and running geogrid.exe.

Let me know if you have additional questions.
 
Top