# SMOKE BEIS Custom BELD5 with our domain

**URL:** <https://forum.cmascenter.org/t/smoke-beis-custom-beld5-with-our-domain/1991>\
**Category:** SMOKE\
**Created:** [December 21, 2020, 10:50pm UTC](https://forum.cmascenter.org/t/smoke-beis-custom-beld5-with-our-domain/1991 "2020-12-21T22:50:19Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiaoyu](https://avatars.discourse-cdn.com/v4/letter/x/b9e5f3/32.png) [@xiaoyu](https://forum.cmascenter.org/u/xiaoyu)\
**Post date:** [December 21, 2020, 10:50pm UTC](https://forum.cmascenter.org/t/smoke-beis-custom-beld5-with-our-domain/1991/1 "2020-12-21T22:50:19Z")

</div>

“Custom BELD5 input file over your modeling domain can be developed using new updated **Aggwndw** utility program in SMOKE that can optionally aggregate non-mass values with the setting of AGGREGATE\_EMIS\_YN = N”

May I ask if there are details on customizing BELD5 for biogenic emission?

I couldn’t find AGGREGATE\_EMIS\_YN = N in assign file. This option should add by ourself, right? If I have our domain, anything else I should do after define AGGREGATE\_EMIS\_YN and IOAPI\_GRIDNAME\_1?

Is there BELD5 reference?

Thanks in advance,  
Xiao

---

<div class="post-metadata">

**Author:** ![bbaek](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/bbaek/32/22_2.png) [@bbaek](https://forum.cmascenter.org/u/bbaek)\
**Post date:** [December 22, 2020, 3:29am UTC](https://forum.cmascenter.org/t/smoke-beis-custom-beld5-with-our-domain/1991/2 "2020-12-22T03:29:23Z")

</div>

@jbash. Can you provide any references or details on BELD5?

Regarding to AGGREGATE\_EMIS\_YN, you do not set this in your assign file but in your run script. You should create a simple c-shell script that can invoke aggwndn and set this flag AGGREGATE\_EMIS\_YN to N when you process BELD5 file.

---

<div class="post-metadata">

**Author:** ![xiaoyu](https://avatars.discourse-cdn.com/v4/letter/x/b9e5f3/32.png) [@xiaoyu](https://forum.cmascenter.org/u/xiaoyu)\
**Post date:** [December 22, 2020, 2:36pm UTC](https://forum.cmascenter.org/t/smoke-beis-custom-beld5-with-our-domain/1991/3 "2020-12-22T14:36:37Z")

</div>

Thank you so much for your help. I will give a try and may come back for more questions.

Happy Holidays and Best Regards,  
Xiao

---

<div class="post-metadata">

**Author:** ![xiaoyu](https://avatars.discourse-cdn.com/v4/letter/x/b9e5f3/32.png) [@xiaoyu](https://forum.cmascenter.org/u/xiaoyu)\
**Post date:** [January 7, 2021, 3:30am UTC](https://forum.cmascenter.org/t/smoke-beis-custom-beld5-with-our-domain/1991/4 "2021-01-07T03:30:34Z")

</div>

Dr. Baek,

Is ‘aggwndw’ only aggregating/extracting a window of emissions data from an input finer to an output coarse grid? Is possible from an input coarse to output finer grid? Under smoke v4.8, only have US12NC (e.g., BELD5.US12NC\_66X52.ncf). How about larger domain file (e.g., North America 12km)? Sorry, I am new to this knowledge. What D3 mean in ‘12.D3’? Is mean 1000m? I am not able to find reference.

GRISDDESC-  
! coords --line: name; type, P-alpha, P-beta, P-gamma, xcent, ycent  
‘LAM\_40N97W’  
2, 33.000, 45.000, -97.000, -97.000, 40.000  
’ ’ ! end coords. grids: name; xorig,yorig,xcell,ycell,ncols,nrows,nthik  
‘US12NC\_66X52’  
‘LAM\_40N97W’, 1128D3, -672D3, 12.D3, 12.D3, 66, 52, 1  
‘NA\_12KM’  
‘LAM\_40N97W’, -2952000, -2772000, 12000, 12000, 516, 444, 1

Many thanks,  
Xiao

---

<div class="post-metadata">

**Author:** ![cjcoats](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@cjcoats](https://forum.cmascenter.org/u/cjcoats)\
**Post date:** [January 7, 2021, 1:00pm UTC](https://forum.cmascenter.org/t/smoke-beis-custom-beld5-with-our-domain/1991/5 "2021-01-07T13:00:23Z")

</div>

For going from a coarse grid to a finer one, you need to interpolate; however, doing so will cause you to lose resolution in your input data: you won’t “see” geographic features smaller than twice the resolution of the coarser grid. Be aware, however, that emissions data does not use MKS units but instead has an additional implicit “per grid cell” for its units. You could use a combination of M3Tools programs _[m3cple](https://cjcoats.github.io/ioapi/M3CPLE.html)_ for the interpolation and _[m3combo](https://cjcoats.github.io/ioapi/M3COMBO.html)_ (with a trivial one-variable combination) for the re-scaling.

The `D` in the numbers for the GRIDDESC file indicates that the value is double precision and separates the mantissa from the exponent (so that D3 indicates that the fraction should be multiplied by 10^3=1000 and so can easily be read in kilometers instead of standard MKS meters). Normal “good practice” also has a decimal point in the fraction also.

Please be aware that this is a very sloppy GRIDDESC, where many of the parts that in fact should be double precision are not represented that way, and furthermore does not have the required “end-of-grids” marker. Far better would have been:

```
! coords --line: name; type, P-alpha, P-beta, P-gamma, xcent, ycent
‘LAM_40N97W’
2, 33.0D0, 45.0D0, -97.0D0, -97.0D0, 40.0D0
’ ’ ! end coords. grids: name; xorig,yorig,xcell,ycell,ncols,nrows,nthik
‘US12NC_66X52’
‘LAM_40N97W’, 1128.0D3, -672.0D3, 12.0D3, 12.D3, 66, 52, 1
‘NA_12KM’
‘LAM_40N97W’, -2952.0D3, -2772.0D3, 12.0D3, 12.0D3, 516, 444, 1
' ' ! end grids
```

---

<div class="post-metadata">

**Author:** ![eyth.alison](https://avatars.discourse-cdn.com/v4/letter/e/7ab992/32.png) [@eyth.alison](https://forum.cmascenter.org/u/eyth.alison)\
**Post date:** [January 7, 2021, 1:47pm UTC](https://forum.cmascenter.org/t/smoke-beis-custom-beld5-with-our-domain/1991/6 "2021-01-07T13:47:27Z")

</div>

For BELD5, you don’t want to interpolate. We have the input data available on a 1km domain.

Is your domain aligned with / on the same map projection as our standard grid? I think it is based on your griddesc.

Some tools were provided with SMOKE 4.8 to aggregate the BELD data to an aligned grid – check out the SMOKE release.

You should review the tools and send questions if you have them.

---

<div class="post-metadata">

**Author:** ![bbaek](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/bbaek/32/22_2.png) [@bbaek](https://forum.cmascenter.org/u/bbaek)\
**Post date:** [January 7, 2021, 2:25pm UTC](https://forum.cmascenter.org/t/smoke-beis-custom-beld5-with-our-domain/1991/7 "2021-01-07T14:25:30Z")

</div>

@xiaoyu. As stated in the SMOKE release note, “Latest BEISFAC and North America region BELD5 (1km x 1km) input files for BEIS v3.7 can be found from the CMAS Data Warehouse.”  
Check out the CMAS Data Warehouse to download the. NA BELD5 input file for you to develop your own domain within North American region.

---

<div class="post-metadata">

**Author:** ![xiaoyu](https://avatars.discourse-cdn.com/v4/letter/x/b9e5f3/32.png) [@xiaoyu](https://forum.cmascenter.org/u/xiaoyu)\
**Post date:** [January 7, 2021, 2:41pm UTC](https://forum.cmascenter.org/t/smoke-beis-custom-beld5-with-our-domain/1991/8 "2021-01-07T14:41:34Z")

</div>

Thank you, Ms. Eyth. I will review tools and send questions if any comes.

Best Regards,  
Xiao

---

<div class="post-metadata">

**Author:** ![xiaoyu](https://avatars.discourse-cdn.com/v4/letter/x/b9e5f3/32.png) [@xiaoyu](https://forum.cmascenter.org/u/xiaoyu)\
**Post date:** [January 7, 2021, 2:44pm UTC](https://forum.cmascenter.org/t/smoke-beis-custom-beld5-with-our-domain/1991/9 "2021-01-07T14:44:50Z")

</div>

Dr. Baek, thank you for the detail response regarding my questions. I will use the 1km BELD5.

Best Regards,  
Xiao

---

<div class="post-metadata">

**Author:** ![xiaoyu](https://avatars.discourse-cdn.com/v4/letter/x/b9e5f3/32.png) [@xiaoyu](https://forum.cmascenter.org/u/xiaoyu)\
**Post date:** [January 12, 2021, 5:33pm UTC](https://forum.cmascenter.org/t/smoke-beis-custom-beld5-with-our-domain/1991/10 "2021-01-12T17:33:21Z")

</div>

Hello, Ms. Eyth @eyth.alison and Dr. Baek @bbaek

Based on your recommendation, I test ‘aggwndw’ tool on our end. It works when input file format is _.ncf but not '_.ncf4’ which is from smoke v4.8 updated BELD5 (1km x 1km)([https://drive.google.com/drive/u/0/folders/1v3i0iH3lqW36oyN9aytfkczkX5hl-zF0](https://drive.google.com/drive/u/0/folders/1v3i0iH3lqW36oyN9aytfkczkX5hl-zF0)). Is aggwndw compatible with ncf4?

The log file, GRIDDESC, and run script are attached. Please let me know if you would like to have other complemented files.  
[error.txt](https://forum.cmascenter.org/uploads/short-url/k8p9oozvkwPeSdjF1oVezZJtTLt.txt) (2.7 KB)  
[run\_aggwndw.csh](https://forum.cmascenter.org/uploads/short-url/gfTM6WnbdaxaticgAJf1dZ3uOpq.csh) (848 Bytes)  
[GRIDDESC.txt](https://forum.cmascenter.org/uploads/short-url/gFHp6o2APUbskUQpkiXFBWT7KpV.txt) (343 Bytes)

Thanks in advance.  
Xiao

---

<div class="post-metadata">

**Author:** ![cjcoats](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@cjcoats](https://forum.cmascenter.org/u/cjcoats)\
**Post date:** [January 12, 2021, 6:11pm UTC](https://forum.cmascenter.org/t/smoke-beis-custom-beld5-with-our-domain/1991/11 "2021-01-12T18:11:06Z")

</div>

This is an HDF5-netCDF file, not the expected netCDF-classic.

You’ll need to do a nertCDF-4 based build of the _aggwndw_ program: First, build version-4.something netcdf-C with HDF5 enabled (which will probably need you to install a number of extra libraries, including those for HDF5) and do the command _nc-config --libs_ to find out what extra libraries you’ll have to add to all the _Makefile_s that follow; build netCDF-Fortran; add `-DIOAPI_NCF4=1` to the `DEFINEFLAGS` in the I/O API _Makefile_ and then recompile the I/O API (_make clean; make)_; add the extra libraries found above to the _Makefile_ for _aggwndw_ and re-build it. Then you should be able to run successfully.

---

<div class="post-metadata">

**Author:** ![xiaoyu](https://avatars.discourse-cdn.com/v4/letter/x/b9e5f3/32.png) [@xiaoyu](https://forum.cmascenter.org/u/xiaoyu)\
**Post date:** [January 13, 2021, 10:49pm UTC](https://forum.cmascenter.org/t/smoke-beis-custom-beld5-with-our-domain/1991/12 "2021-01-13T22:49:10Z")

</div>

Dr. Coats @cjcoats  
Thanks for your detailed guidance.

Xiao

---

<div class="post-metadata">

**Author:** ![bbaek](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/bbaek/32/22_2.png) [@bbaek](https://forum.cmascenter.org/u/bbaek)\
**Post date:** [January 13, 2021, 11:56pm UTC](https://forum.cmascenter.org/t/smoke-beis-custom-beld5-with-our-domain/1991/13 "2021-01-13T23:56:43Z")

</div>

Please check the data warehouse again. We have uploaded the regular IOAPI/NetCDF formatted BELD5 1km input file for your aggwndw program. We also included the run script as well. Good luck!

---

<div class="post-metadata">

**Author:** ![xiaoyu](https://avatars.discourse-cdn.com/v4/letter/x/b9e5f3/32.png) [@xiaoyu](https://forum.cmascenter.org/u/xiaoyu)\
**Post date:** [January 25, 2021, 7:58pm UTC](https://forum.cmascenter.org/t/smoke-beis-custom-beld5-with-our-domain/1991/14 "2021-01-25T19:58:47Z")

</div>

Dr. Baek,

Sorry about my late response. Thank you for helping us on processing BELD5 and providing all needed information and files.

Best Regards,  
Xiao

---

<div class="post-metadata">

**Author:** ![lexiewilson](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/lexiewilson/32/2018_2.png) [@lexiewilson](https://forum.cmascenter.org/u/lexiewilson)\
**Post date:** [November 9, 2021, 12:03am UTC](https://forum.cmascenter.org/t/smoke-beis-custom-beld5-with-our-domain/1991/15 "2021-11-09T00:03:22Z")

</div>

hi - I followed these scripts and successfully created a 4km BELD5 file for our domain. We also have a nested 1.3333km domain for our modeling demonstration. aggwndw throws this error when I try to make a 1.3km BELD5 file:

```auto
Checking input and output grids...
     ERROR: Output grid cell size is not an integer multiple of input grid cell size

     *** ERROR ABORT in subroutine AGGWNDW
     Input and output grids are not compatible

```

Do you have a tip for this type of grid? Or perhaps could EPA post the BELD5 tiles on the ftp and I can create my own gridded domain from there?

---

<div class="post-metadata">

**Author:** ![cjcoats](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@cjcoats](https://forum.cmascenter.org/u/cjcoats)\
**Post date:** [November 9, 2021, 12:17pm UTC](https://forum.cmascenter.org/t/smoke-beis-custom-beld5-with-our-domain/1991/16 "2021-11-09T12:17:04Z")

</div>

To know for sure, we’d need to see the grid-descriptions for the input and output grids.

However. _ **aggwndw** _ is used to create coarse-grid outputs from fine-grid inputs, and it looks as though you’re trying to do the reverse.

---

<div class="post-metadata">

**Author:** ![eyth.alison](https://avatars.discourse-cdn.com/v4/letter/e/7ab992/32.png) [@eyth.alison](https://forum.cmascenter.org/u/eyth.alison)\
**Post date:** [November 9, 2021, 1:08pm UTC](https://forum.cmascenter.org/t/smoke-beis-custom-beld5-with-our-domain/1991/17 "2021-11-09T13:08:14Z")

</div>

We have posted the original BELD5 data and some scripts here:

[https://gaftp.epa.gov/Air/emismod/2017/biogenics/](https://gaftp.epa.gov/Air/emismod/2017/biogenics/)

Have you tried making the 1.33km file from that?

---

<div class="post-metadata">

**Author:** ![lexiewilson](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/lexiewilson/32/2018_2.png) [@lexiewilson](https://forum.cmascenter.org/u/lexiewilson)\
**Post date:** [November 9, 2021, 3:55pm UTC](https://forum.cmascenter.org/t/smoke-beis-custom-beld5-with-our-domain/1991/18 "2021-11-09T15:55:22Z")

</div>

Yes, that is what I tried. Here is my script adapted from the sample script posted there;

```auto
source ../directory_definitions_4UDAQ_2017by_17.csh

# BELD5 1km file
setenv INFILE ${GE_DAT}/beis/BELD5_1US3_FIA6.1_2017CLD_Canada.ncf

# See SMOKE Users Guide for info on GRIDDESC file
setenv GRIDDESC ${GE_DAT}/gridding/GRIDDESC_udaq_v7.txt

# Must be set to N when aggregating land use percentages (BELD)
setenv AGGREGATE_EMIS_YN N

# Output grid name is IOAPI_GRIDNAME_1
# The definition of this output grid must be in the GRIDDESC file
setenv IOAPI_GRIDNAME_1 WF13UDAQ

setenv OUTFILE ${GE_DAT}/beis/beld5.aggwndw_v48.WF13UDAQ.ncf

setenv PROMPTFLAG N

# SMK_BIN is path to the aggwndw executable
$INSTALL_DIR/smoke4.8.1/Linux2_x86_64ifort/aggwndw

exit

```

I understand that the BELD5\_1US3\_FIA6.1\_2017CLD\_Canada.ncf is 1km resolution. My domain is 1.3km resolution, which is coarser than 1km, so the aggwndw tool should apply - correct?  
Here is my GRIDDESC:

```auto
! coords --2 lines: name; type, P-alpha, P-beta, P-gamma, xcent, ycent
'LAM_40N97W'
2, 33.0D0, 45.D0, -97.D0, -97.D0, 40.D0
' ' ! end coords
'WF13UDAQ' ! 2 lines: WF13UDAQ; xorig,yorig,xcell,ycell,ncols,nrows,nthik
'LAM_40N97W', -1332000.000, 80000.000, 1333.333333, 1333.333333, 108, 207, 1
' ' ! end grids.

```

I was able to window the BELD4.1 for this WF13UDAQ domain using the convert\_beld41\_feb2017\_epa\_12US1.csh script and these tiles: [https://gaftp.epa.gov/Air/emismod/2011/v3platform/beld4.1/](https://gaftp.epa.gov/Air/emismod/2011/v3platform/beld4.1/)  
I could try that approach again if the individual BELD5 tiles are posted somewhere?

---

<div class="post-metadata">

**Author:** ![bbaek](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/bbaek/32/22_2.png) [@bbaek](https://forum.cmascenter.org/u/bbaek)\
**Post date:** [November 9, 2021, 5:58pm UTC](https://forum.cmascenter.org/t/smoke-beis-custom-beld5-with-our-domain/1991/19 "2021-11-09T17:58:44Z")

</div>

Unfortunately, aggwndw can not aggregate 1kmx1km to 1.33kmx1.33km grid cell although it is coarser than 1km. It does not interpolate the cells but simple summing.

---

<div class="post-metadata">

**Author:** ![lexiewilson](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/lexiewilson/32/2018_2.png) [@lexiewilson](https://forum.cmascenter.org/u/lexiewilson)\
**Post date:** [November 9, 2021, 6:09pm UTC](https://forum.cmascenter.org/t/smoke-beis-custom-beld5-with-our-domain/1991/20 "2021-11-09T18:09:46Z")

</div>

Ok that makes sense. Can the individual BELD5 tiles be made available?

[Next page](https://forum.cmascenter.org/t/smoke-beis-custom-beld5-with-our-domain/1991.md?page=2)
