# ECCAD Global gridded inventory processing

**URL:** <https://forum.cmascenter.org/t/eccad-global-gridded-inventory-processing/2273>\
**Category:** SMOKE\
**Created:** [April 19, 2021, 7:04pm UTC](https://forum.cmascenter.org/t/eccad-global-gridded-inventory-processing/2273 "2021-04-19T19:04:01Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![ykaore](https://avatars.discourse-cdn.com/v4/letter/y/ce73a5/32.png) [@ykaore](https://forum.cmascenter.org/u/ykaore)\
**Post date:** [April 19, 2021, 7:04pm UTC](https://forum.cmascenter.org/t/eccad-global-gridded-inventory-processing/2273/1 "2021-04-19T19:04:01Z")

</div>

Hi all,  
I’m trying to use SMOKE version 4.7 to process data from CAMS inventory ([ECCAD – Emissions of atmospheric Compounds and Compilation of Ancillary Data](https://eccad.aeris-data.fr/#DatasetPlace:CAMS-GLOB-OCE%24DOI)), which has a resolution of 0.5 x 0.5 degree. For that, I created a new gridmask since the one available in the SMOKE directory (for EDGAR) has a resolution of 0.1 x 0.1 degree. To check if the new gridmask was okay, I used the m3xtract program that successfully read the file.

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/f/f88fc3043ad028956789ba7ed346425ff067f2ce.png)

However, I’m still struggling what maybe be wrong since I’m having this error in grdmat program (I’m attaching the log).  
 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/3/302b2edf409bda812436b6c08b977257543ae596.png)

Can someone help me? Thanks in advance. [grdmat.oceanic.vitoria.RMGV.txt](https://forum.cmascenter.org/uploads/short-url/f3ch0YljwfkQnL6F4nsV4vDflRl.txt) (9.0 KB)

---

<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:** [April 20, 2021, 3:02pm UTC](https://forum.cmascenter.org/t/eccad-global-gridded-inventory-processing/2273/2 "2021-04-20T15:02:33Z")

</div>

Noting that we haven’t processed this specific dataset, we notice that the grid information from the m3xtract of the grid mask and the met in grdmat show two grids with different dimensions and different names. The grid mask is called “LATLON\_ECCAD0.5” and is 360 x 720, the met is called “RMGV\_CROSS” and is 160 x 160. To fully debug the issue, the GRIDDESC file that defines both of these grids would be needed.

However, something you should be able to do is to load your grid mask file into VERDI or another tool that can visualize netCDF files. You can plot the GEOCODE variable with country boundaries to see if it is in the place you expected. I suspect that your coordinates are off and therefore the grids are found not to intersect.

---

<div class="post-metadata">

**Author:** ![ykaore](https://avatars.discourse-cdn.com/v4/letter/y/ce73a5/32.png) [@ykaore](https://forum.cmascenter.org/u/ykaore)\
**Post date:** [April 20, 2021, 3:58pm UTC](https://forum.cmascenter.org/t/eccad-global-gridded-inventory-processing/2273/3 "2021-04-20T15:58:06Z")

</div>

Hi @eyth.alison,  
Thanks for your response.  
I’ve trying to process this dataset in the same way that I did with EDGAR, since both are global gridded data. So, I basically replaced the input emissions data, and created a new grid mask because of the coarser resolution of ECCAD data. I guess that is why the GRIDDESC names are different.  
I plotted the grid masks on VERDI for both, EDGAR (from yours repository), and the one that I created.  
These are them:

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/d/d5b2a47a79cd064d693a1a27b8d6e0458bdc7b96.png)  
 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/c/c3064107f710d3d5a9e92fa7e81f1ea60a926ce9.png)

In fact, my data does not have the coast lines plotted, that can be an issue. I guee I have to remake the grid mask, any tips for do that?

---

<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:** [April 20, 2021, 4:47pm UTC](https://forum.cmascenter.org/t/eccad-global-gridded-inventory-processing/2273/4 "2021-04-20T16:47:45Z")

</div>

Can you share your GRIDDESC with the two grids?

---

<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:** [April 20, 2021, 4:52pm UTC](https://forum.cmascenter.org/t/eccad-global-gridded-inventory-processing/2273/5 "2021-04-20T16:52:43Z")

</div>

The output modeling domain through SMOKE do not have to be same as input domain (CAMS 0.5x0.5 grid cells) but GRIDMASK (GEOCODE and TIMEZONE) domain have to be matched with your new CAMS domain. You can define any output domain using SMOKE GRIDDESC input file. I would suggest for you to check the output domain from GRIDDESC and the MCIP domain. They have to be matched for Grdmat to generate the spatial gridding matrix.

---

<div class="post-metadata">

**Author:** ![ykaore](https://avatars.discourse-cdn.com/v4/letter/y/ce73a5/32.png) [@ykaore](https://forum.cmascenter.org/u/ykaore)\
**Post date:** [April 23, 2021, 6:37pm UTC](https://forum.cmascenter.org/t/eccad-global-gridded-inventory-processing/2273/6 "2021-04-23T18:37:41Z")

</div>

After some manipulation, I was able to let both files (grid mask and emissions ECCAD) with same header and readable by M3XTRACT program. I appreciated the help, despite now I’m having a Segmentation fault, which stops during the temporal processing.

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/1/17be44be739b5f3618b72246a38b70019f9bc515.png)  
 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/c/c61510df89aef8f3a805cc8fda48cc9f4caf1dc9.png)

I’m attanching all logs, in case someone can give me some tips.  
[grdmat.oceanic.vitoria.RMGV.txt](https://forum.cmascenter.org/uploads/short-url/Yct5kjIvkXRYJloyDGZzimiqgC.txt) (8.0 KB)  
[smkinven.oceanic.vitoria.txt](https://forum.cmascenter.org/uploads/short-url/96Pv58EVs44c3bldFOSaiXeFFO6.txt) (8.6 KB) [spcmat.oceanic.vitoria.CB06r3-AE7.txt](https://forum.cmascenter.org/uploads/short-url/hFWzLQRG8xIny3yr8mhBYEO4OuK.txt) (7.8 KB)  
[temporal.oceanic.vitoria.2019304.txt](https://forum.cmascenter.org/uploads/short-url/69lZzgFF1MBkFhPU944iMwRhLhU.txt) (10.4 KB)

---

<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:** [April 23, 2021, 6:53pm UTC](https://forum.cmascenter.org/t/eccad-global-gridded-inventory-processing/2273/7 "2021-04-23T18:53:23Z")

</div>

Looks like memory issue. It may require more RAM memory? You may set stacksize to unlimited in your run script for Temporal program to see whether that helps or not.

> set stacksize unlimited

---

<div class="post-metadata">

**Author:** ![ykaore](https://avatars.discourse-cdn.com/v4/letter/y/ce73a5/32.png) [@ykaore](https://forum.cmascenter.org/u/ykaore)\
**Post date:** [April 23, 2021, 7:11pm UTC](https://forum.cmascenter.org/t/eccad-global-gridded-inventory-processing/2273/8 "2021-04-23T19:11:15Z")

</div>

It was already setup with this configuration

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/f/f4ba7169803afaefb1cfe4dae222143f624ffd1f.png)  
I also already tried to write it in terminal, but the segmentation faults still appeared.  
 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/6/64ee46194e5d79dee748d6546ac1547f0aaf3ed1.png)  
which, the export file is:  
module load gcc/7.3.0  
export SMK\_HOME=/opt/wrf\_cmaq/smoke/4.7  
export BIN=Linux2\_x86\_64gfort  
export FC=gfortran  
export IOAPIDIR=/opt/wrf\_cmaq/ioapi  
export LD\_LIBRARY\_PATH=/opt/openmpi/3.1.0/lib:/opt/wrf\_cmaq/cmaq/libraries\_7.3/netcdf/lib:/opt/wrf\_cmaq/cmaq/libraries\_7.3/ioapi/ioapi:$LD\_LIBRARY\_PATH

---

<div class="post-metadata">

**Author:** ![lizadams](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@lizadams](https://forum.cmascenter.org/u/lizadams)\
**Post date:** [April 23, 2021, 7:29pm UTC](https://forum.cmascenter.org/t/eccad-global-gridded-inventory-processing/2273/9 "2021-04-23T19:29:44Z")

</div>

I use the following command in my .cshrc

limit stacksize unlimited

Verify that this is activated by using the limit command:

> limit

You should see the following output:

cputime unlimited  
filesize unlimited  
datasize unlimited  
stacksize unlimited  
coredumpsize 0 kbytes  
memoryuse unlimited  
vmemoryuse unlimited  
descriptors 1024  
memorylocked 64 kbytes  
maxproc 4096  
maxlocks unlimited  
maxsignal 31158  
maxmessage 819200  
maxnice 0  
maxrtprio 0  
maxrttime unlimited

---

<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:** [April 23, 2021, 7:29pm UTC](https://forum.cmascenter.org/t/eccad-global-gridded-inventory-processing/2273/10 "2021-04-23T19:29:50Z")

</div>

Set it on your current teminal won’t work. You need to add that command into your run script.

---

<div class="post-metadata">

**Author:** ![ykaore](https://avatars.discourse-cdn.com/v4/letter/y/ce73a5/32.png) [@ykaore](https://forum.cmascenter.org/u/ykaore)\
**Post date:** [April 23, 2021, 9:38pm UTC](https://forum.cmascenter.org/t/eccad-global-gridded-inventory-processing/2273/11 "2021-04-23T21:38:51Z")

</div>

I would say that the problem is not related to a memory issue, since I was able to run successfully EDGAR inventory (which has a higher resolution than ECCAD) for the same area.

Then, I looked into the inventory stored in the $INVOPD directory, and the TZONES had strange values. However, I dont know from where they came from, since the grid mask did not have these values.  
The left is the ECCAD inventory, and in the right the EDGAR.

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/c/cbd1da644dd50af13221e213de340dc7a90123d1.png) ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/1/124201484b7f0ae241e1a86973a548283e6a2d5a.png)

EDGAR grid mask

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/8/828d82c16f718d13967964d730cab24932abcf01.png)

My grid mask

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/3/34d57220acdc9ee874b5289476915ec42dcd3105.png)

---

<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:** [April 23, 2021, 9:55pm UTC](https://forum.cmascenter.org/t/eccad-global-gridded-inventory-processing/2273/12 "2021-04-23T21:55:49Z")

</div>

You are right. Looks like you need to set the default TZONES value (like 0) for non-country area like ocean? To me, some random values got assigned to those cells that do not intersect with county boundaries.

---

<div class="post-metadata">

**Author:** ![ykaore](https://avatars.discourse-cdn.com/v4/letter/y/ce73a5/32.png) [@ykaore](https://forum.cmascenter.org/u/ykaore)\
**Post date:** [April 23, 2021, 10:11pm UTC](https://forum.cmascenter.org/t/eccad-global-gridded-inventory-processing/2273/13 "2021-04-23T22:11:55Z")

</div>

Yes, this inventory that I’m trying to use has only emissions of CH2Br2, CH3I, CHBr3, DMS, assigned to the ocean, exclusively. Thanks for helping BH, Liz and Alison.

---

<div class="post-metadata">

**Author:** ![ernesto.pinoc](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/ernesto.pinoc/32/43_2.png) [@ernesto.pinoc](https://forum.cmascenter.org/u/ernesto.pinoc)\
**Post date:** [April 29, 2021, 2:12pm UTC](https://forum.cmascenter.org/t/eccad-global-gridded-inventory-processing/2273/14 "2021-04-29T14:12:15Z")

</div>

Hi. I worked with CAMs dataset and used as an Input in SMOKE. I regridded the CAMS-OCEAN from 0.5 to 0.1 and then, I used some preprocessing steps to get the desired file format as input in SMOKE. If you send me an email (ernesto.pino@pucvl.) I can send you the details. I can´t post here now because it is part of a manuscript not yet published.

---

<div class="post-metadata">

**Author:** ![ykaore](https://avatars.discourse-cdn.com/v4/letter/y/ce73a5/32.png) [@ykaore](https://forum.cmascenter.org/u/ykaore)\
**Post date:** [April 29, 2021, 8:33pm UTC](https://forum.cmascenter.org/t/eccad-global-gridded-inventory-processing/2273/15 "2021-04-29T20:33:16Z")

</div>

Sure. I will send you an email. Thanks for helping.
