Xportfrac with USGS28


I am trying to generate Xportfrac for a new domain. The WRF data we obtained seems to have used 28 land use categories. Therefore, I used USGS 24 land-use type, #28 as lake, and #25-#27 are unassigned. I added these to both gridcro2d_lu_types and captureclass_fractions files.

Even with these changes, I got the following error. I would like to know,

  1. if the changes I made make sense or not
  2. is it even possible to use anything but USGS 24 or 40 to generate xportfracs?
  3. since it is not possible for us to get the wrf data fixed, is there any other I can solve this issue?

Thanks a lot.

We have been using MODIS and NLCD in recent years and not the USGS28

I see. Does this mean I won’t be able to generate transport fractions using the data I have? Or anything else can be done? any lead will help.

Thanks a lot.

Is your grid over the U.S. or another region? What is the spatial resolution?

These are our domains that are mainly focused on Canada. However, 9 and 3km domains intersect with the US.

Try using the EPA-provided original captureclass_fractions file without any changes/additions

  • In the gridcro2d_lu_types file (BELD4TOCAPTURE), start with gridcro2d_lu_types.USGS24.csv (I am assuming he has this from our package), and then for the other four LU types, add to that file:


Hi Alison,
Thanks for the reply. I tried what you suggested and still getting the same error.

Could this relate to some issue with a software compilation? I am using ioapi3.2.

Also, what does the LU_PCT_YN setting stands for?

Thanks again.
log_xportfrac_scinet.txt (5.9 KB)

The program is crashing when it attempts to create the output file:
Illegal data type 0 for variable Urban
netCDF error number -36 processing file “OUTFILE”
NetCDF: Invalid argument
“Urban” is supposed to be a variable in the output netCDF file. So, it could be related to compilation or something on the IOAPI / netCDF end, or maybe something in the source code doesn’t work on other systems.

Regarding LU_PCT_YN (Land use percent Y/N), that should be set to N if the values in captureclass_fractions.txt are fractional and sum to 1, and set to Y if the values in captureclass_fractions.txt are percentage basis and sum to 100 (%). The EPA files/scripts are set up with LU_PCT_YN=N and fractions which sum to 1.

1 Like

I still have this issue. Wondering if there is a way that I can create an xportfrac file for my domain based on the xportfrac.12US1.GRIDCRO2D? some sort of mapping. Is there anything you can suggest?


Is your domain contained by the 12US1 domain? What is the grid resolution?

It looks like our 9km domain falls within the 12US1: I may be wrong. I looked at the xportfrac.12US1.GRIDCRO2D file and the following are what I am seeing.

I have both 9km and 3km domains that contain parts of the US.

It’s probably not ideal to use a 12km land use to map to 9km and 3km.

What version of the executables are you using? Have you downloaded from EPA’s web site, SMOKE web site or self-compiled?

What is your computing environment?

I am using the SMOKE from the EPA website which did not require a compilation.

I am using Linux2_x86_64ifort in ubuntu 20.04.

We suggest a test that involves using our data instead of your data – to see if the program is broken on your computer or if it’s just not working with your inputs.

Try running the afdust_xportfrac/gen_afdust_tfrac.12US1.GRIDCRO2D.csh script and other inputs from this package:


The 12US1 GRIDCRO2D referenced by that script is available here:


Please let us know if this works for you.

thanks for the suggestion. will give this a try and get back to you.

Hi Alison,

Thanks to your suggestion I think I figured out the issue. The scripts worked with the 12US1 data.

I then compared the GRIDCRO input from you and to mine. The issue is that my GRIDCRO file does not contain the land fraction inputs. I generated these GRIDCRO files using the CMAQ/mcip scripts (run_mcip.csh). These are in entries in my GRIDCRO file.

The MCIP also outputs a LUFRAC_CRO file that contains the land-use info.

I wonder how I can generate a GRIDCRO file that is similar to what you provided. Would it work if I just combine the two files GRICRO and LUFRACCRO files that I have?

Thanks a lot.

I combined the two mcip outputs and created a new gridcro file with land use fractions. However, received an error related to the file format.

Previously I have tried using MCIP 4.1 and our WRF data was not compatible with that version. Is there a way I can somehow fix the gen_afdust_tfrac in order to read data from both GRID_CRO and LUCFRAC_CRO files?

Any clue will help.


Build all your netCDF libraries the way that is recommended for the I/O API – see https://cjcoats.github.io/ioapi/AVAIL.html#ncf4:

–disable-netcdf4 --disable-dap

or else build netCDF-4-enabled libraries libnetcdf.a, libnetcdff.a, libioapi.a, and * m3tools * program m3cple, and use that m3cple to copy the files to the “classic” format.

Thanks for your reply. I used matlab to combine the two files (GRID_CRO and LUFRAC_CRO) and that is why it is hard to convert it back to the classic format.

What I want to do here is to simply merge the above-mentioned 2 files into 1 file that can be used in the gen_frac algorithm. Following are the challenges I have,

  1. LUCFRAC file is in a larger domain than GRID_CRO : This I fixed using the m3cple tool

  2. LUCFRAC file is a 3D file that needs to be converted into 2D arrays for each land use category. This is where I am stuck.

Thanks a lot and really appreciate your help figuring out this.

LUCFRAC file is a 3D file that needs to be converted into 2D arrays for each land use category. This is where I am stuck.
You can use M3Tools program m3xtract to extract single-layer files like you need.

1 Like