# Source Too many arguments: is not csh!

**URL:** <https://forum.cmascenter.org/t/source-too-many-arguments-is-not-csh/3679>\
**Category:** SMOKE\
**Created:** [November 2, 2022, 12:31pm UTC](https://forum.cmascenter.org/t/source-too-many-arguments-is-not-csh/3679 "2022-11-02T12:31:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SolL](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@SolL](https://forum.cmascenter.org/u/SolL)\
**Post date:** [November 2, 2022, 12:31pm UTC](https://forum.cmascenter.org/t/source-too-many-arguments-is-not-csh/3679/1 "2022-11-02T12:31:57Z")

</div>

When using

`nonpoint/Annual_np_oilgas_12US1_2017gb_17j_TestCase.csh`

We found the following system error:

```auto
smoke4.7/scripts/run/source set_months_v4.csh -m 7 0
source: Too many arguments.

```

Which stopped the execution. After too many search, we found that:

- `csh`: does not accept to ‘source’ a file with arguments: `suorce [file] [arguments]`
- `tcsh`: (enhanced retrocompatible`csh`) does accept arguments when sourcing  
We found that in most linux environments, users tend to link `tcsh` as `csh`

At the same time, we need to modify some scripts:

- At line #1 of `smoke4.7/scripts/log_analyzer/log_analyzer.py`, `smoke4.7/scripts/run/path_parser.py`, `smoke4.7/scripts/annual_report/annual_report_v2.py` we needed to update python call as

```auto
#!/usr/bin/env python3

```

- On line # 30 of `smoke4.7/scripts/run/set_months_v4.csh`, erroneous syntax on providing arguments: it is being provided as `$#` (`sh/bash`) and to be 100% `csh` should be `$#argv` [web](https://www.unix.com/shell-programming-and-scripting/42713-read-number-arguments-c-shell.html):

```auto
if ( $#argv == 3 ) then

```

---

<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 2, 2022, 12:55pm UTC](https://forum.cmascenter.org/t/source-too-many-arguments-is-not-csh/3679/2 "2022-11-02T12:55:07Z")

</div>

Can you clarify where the nonpoint script came from? Was it part of the EPA installation package or part of the EPA 2017 platform posted here:

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

---

<div class="post-metadata">

**Author:** ![SolL](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@SolL](https://forum.cmascenter.org/u/SolL)\
**Post date:** [November 2, 2022, 1:52pm UTC](https://forum.cmascenter.org/t/source-too-many-arguments-is-not-csh/3679/3 "2022-11-02T13:52:14Z")

</div>

They come from the SMOKE-TestCase provided from here [SMOKE-TestCase](https://github.com/CEMPD/SMOKE-TestCase/):

```auto
git clone https://github.com/CEMPD/SMOKE-TestCase.git

```
