Source Too many arguments: is not csh!

When using

nonpoint/Annual_np_oilgas_12US1_2017gb_17j_TestCase.csh

We found the following system error:

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 retrocompatiblecsh) 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
#!/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:
if ( $#argv == 3 ) then

1 Like

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/

They come from the SMOKE-TestCase provided from here SMOKE-TestCase:

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