# Error with AG sector -- creating GENTPRO files for 2015?

**URL:** <https://forum.cmascenter.org/t/error-with-ag-sector-creating-gentpro-files-for-2015/2309>\
**Category:** SMOKE\
**Created:** [May 3, 2021, 7:14pm UTC](https://forum.cmascenter.org/t/error-with-ag-sector-creating-gentpro-files-for-2015/2309 "2021-05-03T19:14:50Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![asmontgomery](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@asmontgomery](https://forum.cmascenter.org/u/asmontgomery)\
**Post date:** [May 3, 2021, 7:14pm UTC](https://forum.cmascenter.org/t/error-with-ag-sector-creating-gentpro-files-for-2015/2309/1 "2021-05-03T19:14:50Z")

</div>

Hello,

I’m trying to create spin up emissions for December 2015 using SMOKE 2016 beta platform. I’m trying to run the AG script, but I have been running into issues.

I tried recreating the ATPRO\_HOURLY\_NCF using the ncl script included in the platform (create\_gentpro\_file\_for\_custom\_year.ncl), however, whenever I run the AG script in the nonpoint sector, I get the error warning in this file stating that I have the wrong dates.

logfile: /SMOKE.EMF/2016\_beta/2016ff\_16j/intermed/ag/logs/temporal\_ag\_dec\_2016ff\_16j\_20151201.log

```
     PROCTPRO: TREF type "MET-BASED " active reference count= 1109520

 File "ATPRO_MONTHLY" opened for input on unit: 92
 /projects/b1045/SMOKE.EMF/2016_beta/ge_dat/temporal/amptpro_general_2011platform_tpro_monthly_6nov2014_30nov2018_nf_v9

 PROCTPRO/CSVPROF : file "ATPRO_MONTHLY" processed: 292 active data-rows 12 fields

 File "ATPRO_WEEKLY" opened for input on unit: 92
 /projects/b1045/SMOKE.EMF/2016_beta/ge_dat/temporal/amptpro_general_2011platform_tpro_weekly_6nov2014_09sep2016_v2

 PROCTPRO/CSVPROF : file "ATPRO_WEEKLY" processed: 1 active data-rows 7 fields

 File "ATPRO_HOURLY" opened for input on unit: 92
 /projects/b1045/SMOKE.EMF/2016_beta/ge_dat/temporal/amptpro_general_2011platform_tpro_hourly_6nov2014_24jul2017_v5

 PROCTPRO/CSVPROF : file "ATPRO_HOURLY" processed: 2 active data-rows 24 fields
 Value for HOURLY_TPROF_BASE: 'MONTH'
 Value for HOURLY_TPROF_BASE: 'MONTH'
  
 "ATPRO_HOURLY_NCF" opened as OLD:READ-ONLY   
 File name "/projects/b1045/SMOKE.EMF/2016_beta/ge_dat/temporal/Gentpro_TPRO_HOUR_HOURLY_BASH_NH3.agNH3_bash_2015j_12US2_smk37.ncf"
 File type GRDDED3 
 Execution ID "????????????????"
 Grid name ""
 Dimensions: 3108 rows, 1 cols, 1 lays, 5 vbles
 NetCDF ID: 131072 opened as READONLY            
 Starting date and time 2014365:000000 (0:00:00 Dec. 31, 2014)
 Timestep 010000 (1:00:00 hh:mm:ss)
 Maximum current record number 8840
 
 >>--->> WARNING in subroutine RDTFLAG
 Time step not available in file ATPRO_HOURLY_NCF for variable COUNTIES
 M3WARN: DTBUF 16:00:00 Nov 30, 2015 (2015334:160000)
 
 *** ERROR ABORT in subroutine PROCTPRO
 Could not READ3("TPRO_HOUR","COUNTIES",...)
 Date and time 16:00:00 Nov 30, 2015 (2015334:160000)

```

Could someone help me out with this error?  
Thanks!  
Anastasia

---

<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:** [May 3, 2021, 7:23pm UTC](https://forum.cmascenter.org/t/error-with-ag-sector-creating-gentpro-files-for-2015/2309/2 "2021-05-03T19:23:27Z")

</div>

It looks like this file potentially has hourly timesteps from 2014365:000000 through  
2016002:0700. A quick check would to be to run M3Tools program [_m3stat_](https://cjcoats.github.io/ioapi/M3STAT.html) on it to see whether statistics are reported for this date&time, 2015334:160000 (or whether there is some “gap” in the file).

---

<div class="post-metadata">

**Author:** ![asmontgomery](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@asmontgomery](https://forum.cmascenter.org/u/asmontgomery)\
**Post date:** [May 3, 2021, 7:32pm UTC](https://forum.cmascenter.org/t/error-with-ag-sector-creating-gentpro-files-for-2015/2309/3 "2021-05-03T19:32:31Z")

</div>

Thank you for your quick reply!

So when I ran m3stat on this file, this is the output:

```
 m3stat
                                                                 
 This program uses the EPA-AREAL/MCNC-EnvPgms/BAMS Models-3      
 I/O Applications Programming Interface, [I/O API] which is      
 built on top of the netCDF I/O library (Copyright 1993, 1996    
 University Corporation for Atmospheric Research/Unidata         
 Program) and the PVM parallel-programming library (from         
 Oak Ridge National Laboratory). Copyright (C) 1992-2002 MCNC   
 and Carlie J. Coats, Jr., and 2003-2006 Baron Advanced          
 Meteorological Systems, LLC and released under the GNU LGPL     
 License, version 2.1. See URL                                  
                                                                 
     http://www.baronams.com/products/ioapi/LGPL.txt             
                                                                 
 for conditions of use.                                          
                                                                 
 Library release tag: $JDate: 2010068 $                          
                                                                 
 $Id: @(#) ioapi library version 3.1 $
 Version with PARMS3.EXT/PARAMETER::MXVARS3= 2048
 netCDF version 4.6.1 of Oct 23 2018 10:59:04 $
  
  
 Missing environment variable EXECUTION_ID
  
 Program M3STAT to compute statistics of selected variables 
 from a user-specified GRIDDED, BOUNDARY, CUSTOM, IDDATA, or 
 SPARSE-MATRIX Models-3 file.
 You need to have assigned a logical name to the physical 
 file name of the input file, and optionally the report file
 according to Models-3 conventions, using the operation 
 "setenv <lname> <pname>".
  
 You will have the choice of either the default analysis, 
 which computes statistics for the variables in the file, or
 customized analysis in which you select lists of variables
 to be analyzed, and the thresholds to be applied to each.
  
 USAGE: m3stat [INFILE [REPORTFILE]] [DEFAULT]
 (and then answer the prompts).
  
 Program copyright (C) 1992-2002 MCNC and Carlie J. Coats, Jr.
 and (C) 2002-2010 Baron Advanced Meteorological Systems, LLC
 Released under Version 2 of the GNU General Public License.
 See enclosed GPL.txt, or URL
 http://www.gnu.org/copyleft/gpl.html
  
 Comments and questions are welcome and can be sent to
  
     Carlie J. Coats, Jr. coats@baronams.com
     Baron Advanced Meteorological Systems, LLC.
     1021 Main Campus Drive, Suite 300
     Raleigh, NC 27606
  
 See URL http://www.baronams.com/products/ioapi/AA.html#tools
  
 Program version: 
 $Id:: m3stat.f 966 2011-05-26 14:24:01Z coats@borel $
  
 
 Value for PROMPTFLAG not defined;returning default: TRUE
 Enter logical name for INPUT FILE [INFILE] >>in
 Value for IOAPI_CHECK_HEADERS not defined;returning default: FALSE
  
 "in" opened as OLD:READ-ONLY   
 File name "/projects/b1045/SMOKE.EMF/2016_beta/ge_dat/temporal/Gentpro_TPRO_HOUR_HOURLY_BASH_NH3.agNH3_bash_2015j_12US2_smk37.ncf"
 File type GRDDED3 
 Execution ID "????????????????"
 Grid name ""
 Dimensions: 3108 rows, 1 cols, 1 lays, 5 vbles
 NetCDF ID: 65536 opened as READONLY            
 Starting date and time 2014365:000000 (0:00:00 Dec. 31, 2014)
 Timestep 010000 (1:00:00 hh:mm:ss)
 Maximum current record number 8840
 Value for PROMPTFLAG not defined;returning default: TRUE
 Enter logical name for REPORT FILE, or "NONE" [REPORT] >>out

 File "out" opened for output on unit: 99
 /projects/b1045/SMOKE.EMF/2016_beta/ge_dat/temporal/out.txt

 Value for PROMPTFLAG not defined;returning default: TRUE
 Do you want the default analysis? (Y/N) [Y] >>Y
 Returning value TRUE for query:
 "Do you want the default analysis?"
  
 The list of variables in file "in" is:
  
 COUNTIES (n/a): County FIPS code       
 HRLSRC (n/a): Hourly total by source 
 DAYTOT (n/a): Daily total by source  
 MONTOT (n/a): Monthly total by source
 ANNTOT (n/a): Annual total by source 
  
 Value for PROMPTFLAG not defined;returning default: TRUE
 Enter starting date (YYYYDDD) for run [2014365] >>
 Using default 2014365
 Enter starting time (HHMMSS) for run [0] >>
 Using default 0
 Enter duration (HHMMSS) for run [88400000] >>
 Using default 88400000
 
 >>--->> WARNING in subroutine RDTFLAG
 Time step not available in file in for variable COUNTIES
 M3WARN: DTBUF 0:00:00 Dec. 31, 2014
 
 *** ERROR ABORT in subroutine M3STAT:STATGRID
 Read failure: file in variable COUNTIES
 Date and time 0:00:00 Dec. 31, 2014 (2014365:000000)

```

Maybe I used m3stat wrong

---

<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:** [May 3, 2021, 7:38pm UTC](https://forum.cmascenter.org/t/error-with-ag-sector-creating-gentpro-files-for-2015/2309/4 "2021-05-03T19:38:04Z")

</div>

> [@asmontgomery](#):
>
> `ATPRO_HOURLY_NCF`

Looks like your ATPRO\_HOURLY\_NCF does not cover your modeling period. You may need to generate new ATPRO\_HOURLY\_NCF that includes your modeling period using Gentpro utility program in SMOKE.

---

<div class="post-metadata">

**Author:** ![asmontgomery](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@asmontgomery](https://forum.cmascenter.org/u/asmontgomery)\
**Post date:** [May 3, 2021, 7:39pm UTC](https://forum.cmascenter.org/t/error-with-ag-sector-creating-gentpro-files-for-2015/2309/5 "2021-05-03T19:39:05Z")

</div>

Hello, I tried using the “create\_gentpro\_file\_for\_custom\_year.ncl” to do that – is there a different tool in SMOKE that I should use?

---

<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:** [May 3, 2021, 7:51pm UTC](https://forum.cmascenter.org/t/error-with-ag-sector-creating-gentpro-files-for-2015/2309/6 "2021-05-03T19:51:11Z")

</div>

Yes, it is called “Gentpro”. Check out the details from the user’s guide.  
[https://www.cmascenter.org/smoke/documentation/4.8.1/html/ch05s03s05.html](https://www.cmascenter.org/smoke/documentation/4.8.1/html/ch05s03s05.html)

---

<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:** [May 3, 2021, 7:56pm UTC](https://forum.cmascenter.org/t/error-with-ag-sector-creating-gentpro-files-for-2015/2309/7 "2021-05-03T19:56:52Z")

</div>

For ag and most other sectors, we use the December 2016 emissions for the December 2015 spinup period.

You don’t need to rerun the tool for the spinup period.

---

<div class="post-metadata">

**Author:** ![asmontgomery](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@asmontgomery](https://forum.cmascenter.org/u/asmontgomery)\
**Post date:** [May 3, 2021, 8:15pm UTC](https://forum.cmascenter.org/t/error-with-ag-sector-creating-gentpro-files-for-2015/2309/8 "2021-05-03T20:15:23Z")

</div>

Then in that case, I’ll just run dec 2016 and shift the files! Thank you all.

---

<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:** [May 3, 2021, 8:18pm UTC](https://forum.cmascenter.org/t/error-with-ag-sector-creating-gentpro-files-for-2015/2309/9 "2021-05-03T20:18:49Z")

</div>

No, I don’t think you used it wrong – it is saying that requested data isn’t there, which is in agreement with what your PROCTPRO was saying. You have a bad file for the run you want.

By the way, another alternative would have been to use the command  
_ncdump -TFLAG/projects/b1045/SMOKE.EMF/2016\_beta/ge\_dat/temporal/Gentpro\_TPRO\_HOUR\_HOURLY\_BASH\_NH3.agNH3\_bash\_2015j\_12US2\_smk37.ncf_

to see what data is available: for dates&times that are missing, there will be a pair  
`-,-`  
in that output; for dates&times that are available, there will be a pair with that date&time, such as  
`2015001,00000`  
(for midnight on Jan. 1, 2015)

---

<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:** [May 3, 2021, 8:33pm UTC](https://forum.cmascenter.org/t/error-with-ag-sector-creating-gentpro-files-for-2015/2309/10 "2021-05-03T20:33:00Z")

</div>

Sounds good. We are adding some information on spinup period emissions to our top level READMEs for our recent platforms.

---

<div class="post-metadata">

**Author:** ![asmontgomery](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@asmontgomery](https://forum.cmascenter.org/u/asmontgomery)\
**Post date:** [May 3, 2021, 8:38pm UTC](https://forum.cmascenter.org/t/error-with-ag-sector-creating-gentpro-files-for-2015/2309/11 "2021-05-03T20:38:52Z")

</div>

> [@cjcoats](#):
>
> ncdump -TFLAG/projects/b1045/SMOKE.EMF/2016\_beta/ge\_dat/temporal/Gentpro\_TPRO\_HOUR\_HOURLY\_BASH\_NH3.agNH3\_bash\_2015j\_12US2\_smk37.ncf

You’re right – the time steps were not shifted with the “create\_gentpro\_file\_for\_custom\_year.ncl” scripts and retained the original information, which was what I was suspecting as well because the base year was 2016 and the offset was -1.

So the real answer must be with @bbaek in which I must use GENTPRO to create this 2015 file.

However, since these are spin-up emissions, I will proceed by creating Dec. 2016 and m3tshifting files (which hopefully will work!).
