# How to use inlineto2d tool

**URL:** <https://forum.cmascenter.org/t/how-to-use-inlineto2d-tool/1919>\
**Category:** SMOKE\
**Created:** [November 19, 2020, 2:22pm UTC](https://forum.cmascenter.org/t/how-to-use-inlineto2d-tool/1919 "2020-11-19T14:22:46Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![qluo](https://avatars.discourse-cdn.com/v4/letter/q/90ced4/32.png) [@qluo](https://forum.cmascenter.org/u/qluo)\
**Post date:** [November 19, 2020, 2:22pm UTC](https://forum.cmascenter.org/t/how-to-use-inlineto2d-tool/1919/1 "2020-11-19T14:22:46Z")

</div>

Hi,

I am working on EGU emissions so would like to visualize the inline emission files. I searched the forum and found there was a tool called inlineto2d that had the function. However, I only found its description but not how to use it in the user manual. Would you please explain a little bit about how to run it?

Thanks,  
Qian

---

<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 19, 2020, 2:43pm UTC](https://forum.cmascenter.org/t/how-to-use-inlineto2d-tool/1919/2 "2020-11-19T14:43:57Z")

</div>

inlineto2d is one of SMOKE utility tools. Check out your SMOKE executables directory ($SMK\_BIN). Here is the details.  
[https://www.cmascenter.org/smoke/documentation/4.8/html/ch05s03s07.html](https://www.cmascenter.org/smoke/documentation/4.8/html/ch05s03s07.html)

---

<div class="post-metadata">

**Author:** ![qluo](https://avatars.discourse-cdn.com/v4/letter/q/90ced4/32.png) [@qluo](https://forum.cmascenter.org/u/qluo)\
**Post date:** [November 19, 2020, 5:25pm UTC](https://forum.cmascenter.org/t/how-to-use-inlineto2d-tool/1919/3 "2020-11-19T17:25:41Z")

</div>

Hi BH,

Thanks for your prompt reply. Yes, I can find the executable under the directory 2016platform/smoke4.7/Linux2\_x86\_64ifort. But there is no run script for it. How should I define the input files for it?

Thanks,  
Qian

---

<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 30, 2020, 3:46pm UTC](https://forum.cmascenter.org/t/how-to-use-inlineto2d-tool/1919/4 "2020-11-30T15:46:21Z")

</div>

You should create your own simple c-shell script to execute the tool. Define the input and output files names (setenv INFILE,…)

---

<div class="post-metadata">

**Author:** ![qluo](https://avatars.discourse-cdn.com/v4/letter/q/90ced4/32.png) [@qluo](https://forum.cmascenter.org/u/qluo)\
**Post date:** [November 30, 2020, 11:22pm UTC](https://forum.cmascenter.org/t/how-to-use-inlineto2d-tool/1919/6 "2020-11-30T23:22:31Z")

</div>

Hi BH,

I was able to run inlineto2d after following your guidance. The script I used to run it is:

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

However, I met another error:

![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/1X/76350b2c51325025dbcfc445ebd21cffa1c6d228.png)

Is inln\_mole\_ptegu\_xxxxxxxx.ncf the right inline file to process?

Thanks,  
Qian

---

<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 1, 2020, 2:18am UTC](https://forum.cmascenter.org/t/how-to-use-inlineto2d-tool/1919/7 "2020-12-01T02:18:10Z")

</div>

Please set PROMPTFLAG to Y. (setnev PROMPTFLAG Y)

---

<div class="post-metadata">

**Author:** ![qluo](https://avatars.discourse-cdn.com/v4/letter/q/90ced4/32.png) [@qluo](https://forum.cmascenter.org/u/qluo)\
**Post date:** [December 1, 2020, 3:18am UTC](https://forum.cmascenter.org/t/how-to-use-inlineto2d-tool/1919/8 "2020-12-01T03:18:00Z")

</div>

After setting it, the same error still remains.

![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/1X/eba3688c184c3944cf122c38878d3266dffb3f49.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:** [December 1, 2020, 3:37am UTC](https://forum.cmascenter.org/t/how-to-use-inlineto2d-tool/1919/9 "2020-12-01T03:37:09Z")

</div>

I am sorry. You need to set the PROMPTFLAG to N to bypass the prompt commands.

---

<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 1, 2020, 3:41am UTC](https://forum.cmascenter.org/t/how-to-use-inlineto2d-tool/1919/10 "2020-12-01T03:41:08Z")

</div>

## Here is one example run script for inlineto2d:

#!/bin/csh -f

setenv LOGFILE LOCAL/logs/inlineto2d.{SOURCE}.log  
setenv INLN OUTPUT/sginlnts\_l.{SOURCE}.20050710.1.us12-nc.nctox.ncf  
setenv STACK\_GROUPS OUTPUT/stack\_groups\_out.{SOURCE}.us12-nc.nctox.ncf  
setenv OUTFILE LOCAL/output/output.{SOURCE}.ncf

setenv PROMPTFLAG N

rm $LOGFILE  
$SMK\_BIN/inlineto2d\_v2

---

<div class="post-metadata">

**Author:** ![qluo](https://avatars.discourse-cdn.com/v4/letter/q/90ced4/32.png) [@qluo](https://forum.cmascenter.org/u/qluo)\
**Post date:** [December 1, 2020, 5:02am UTC](https://forum.cmascenter.org/t/how-to-use-inlineto2d-tool/1919/11 "2020-12-01T05:02:46Z")

</div>

Thanks for the example script, BH. I did pass the previous error by setting PROMPTFLAG to N. However, it gave me another error:  
 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/1X/1747fe1f21a2eb7a8f7506eddfef1beba7a46bde.png)  
It seems inlineto2d needs another input file G\_GRIDPATH but I do not know what it refers to.

Qian

---

<div class="post-metadata">

**Author:** ![qluo](https://avatars.discourse-cdn.com/v4/letter/q/90ced4/32.png) [@qluo](https://forum.cmascenter.org/u/qluo)\
**Post date:** [December 2, 2020, 5:08am UTC](https://forum.cmascenter.org/t/how-to-use-inlineto2d-tool/1919/12 "2020-12-02T05:08:26Z")

</div>

Hi BH,

Thanks for the instructions you provided. This issue has been solved by adding GRIDDESC. G\_GRIDPATH, and IOAPI\_GRIDNAME\_1 to the environment.

Qian

---

<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 2, 2020, 12:53pm UTC](https://forum.cmascenter.org/t/how-to-use-inlineto2d-tool/1919/13 "2020-12-02T12:53:01Z")

</div>

Glad to hear you were able to successfully run the tool. Best of luck!

---

<div class="post-metadata">

**Author:** ![Iqbal](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@Iqbal](https://forum.cmascenter.org/u/Iqbal)\
**Post date:** [April 13, 2021, 9:10pm UTC](https://forum.cmascenter.org/t/how-to-use-inlineto2d-tool/1919/14 "2021-04-13T21:10:39Z")

</div>

Hello @qluo

I am having similar issues. How did you add GRIDDESC. G\_GRIDPATH, and IOAPI\_GRIDNAME\_1 to the environment?.

Would you please share you script?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![qluo](https://avatars.discourse-cdn.com/v4/letter/q/90ced4/32.png) [@qluo](https://forum.cmascenter.org/u/qluo)\
**Post date:** [April 13, 2021, 10:06pm UTC](https://forum.cmascenter.org/t/how-to-use-inlineto2d-tool/1919/15 "2021-04-13T22:06:00Z")

</div>

Here is the script I used. [run\_inlineto2d.csh](https://forum.cmascenter.org/uploads/short-url/sPYYtdEdGPwgOuLBtJhD6hcBEzp.csh) (829 Bytes) Hope it helps.

Qian

---

<div class="post-metadata">

**Author:** ![Iqbal](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@Iqbal](https://forum.cmascenter.org/u/Iqbal)\
**Post date:** [April 14, 2021, 3:42pm UTC](https://forum.cmascenter.org/t/how-to-use-inlineto2d-tool/1919/16 "2021-04-14T15:42:36Z")

</div>

Hello @qluo Thank you so much. It helps a lot.

Hi @lizadams and @Ryan I am trying to find out IOAPI\_GRIDNAME\_1 from the [May1st\_Annual\_ptegu\_onetime\_summer\_12US2\_2028fh1\_16j.csh.txt](https://forum.cmascenter.org/uploads/short-url/iBbvYia0SjXiQtTr5GyAKtSGzwA.txt) (7.5 KB) [May1st\_Annual\_ptegu\_daily\_summer\_12US2\_2028fh1\_16j.csh.txt](https://forum.cmascenter.org/uploads/short-url/vXI16STLT3R8bxfHxEQ1xwebc0t.txt) (7.5 KB) [directory\_definitions\_12US2.TXT](https://forum.cmascenter.org/uploads/short-url/r0LnM66OwzKItFhlEdn0QWoDcTi.TXT) (3.9 KB) files I used for ptegu sector run. These files are the EPA 2016v1 SMOKE files.

I understand the 12US2 grid is used for the ‘ptegu’ sector. But I can’t find the cell numbers.

I saw from the inlineto2d script I have to use something like this:

setenv IOAPI\_GRIDNAME\_1 _12US1\_459X299_ ,

What is the grid name and cell numbers for the EPA 2016v1 SMOKE Run for the ‘ptegu’ and ‘ptnonipm’ sector?

Thank you

---

<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 14, 2021, 5:18pm UTC](https://forum.cmascenter.org/t/how-to-use-inlineto2d-tool/1919/17 "2021-04-14T17:18:08Z")

</div>

You need to look into the GRIDDESC file under the ancillary data to find the 12US2 grid. You can see in the file names they are for 12US2.

I believe it’s just called 12US2, but you can cross check with the GRIDDESC.

---

<div class="post-metadata">

**Author:** ![Iqbal](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@Iqbal](https://forum.cmascenter.org/u/Iqbal)\
**Post date:** [April 14, 2021, 6:16pm UTC](https://forum.cmascenter.org/t/how-to-use-inlineto2d-tool/1919/18 "2021-04-14T18:16:26Z")

</div>

Hello @eyth.alison

I couldn’t find out the name from ancillary data. I looked at the file [griddesc\_lambertonly\_18jan2019\_v7.txt](https://forum.cmascenter.org/uploads/short-url/mh3haQ0odUdeIvlQrsCvFb2lOZE.txt) (11.8 KB) .

Am I looking at the right file?

However, I just used 12US2 and ran the inlineto2d tool and the run is successful.
