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

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

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 on it to see whether statistics are reported for this date&time, 2015334:160000 (or whether there is some “gap” in the file).

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

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.

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?

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

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.

1 Like

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

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)

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

2 Likes

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!).