Run Gentpro script

I don’t believe that Gentpro has not been updated to support latest TREF format yet. It generates the updated TPRO files but not the TREF yet unless I am mistaken. Since you are generating the county-specific temporal profiles for RWC sources, you can still use the same TREF (no need to update with the TREF output file from Gentrpo), The original TREF should work fine with the newly generated TPRO files you generated. Let me know whether this fixes the issue with Temproal or not.

We think we have a fix for this issue, but not until tomorrow. Will follow up then…

Thanks for providing the solution, but unfortunately the original TREF file still gave the same error.

Wei

We have posted a new package for using Gentpro including a README that should help address the issues you have been having – please let us know how it goes:

https://gaftp.epa.gov/Air/emismod/2017/ancillary_data/gentpro_scripts_2017platform.zip

This solution works perfectly! Thanks very much.

Wei

it shouldn’t be a problem with the surrogate as SMOKE will subset it as long as it is aligned with the grid you are running.. .

@eyth.alison I am trying to generate GENTRO for my domain using the script in the 2017 platform. However, I am getting memory allocation error. I tried up to 5 nodes for my job submission. However, I am still getting the error. what should I do?

What sector ae you trying to generated profiles for?

@eyth.alison I am trying to generate for ‘ag’.
I updated my srgdesc, griddesc, usa_340_nofill, and the run script. It starts working but after closing met file the program cashes with memory allocation error.

Can you share more information on the configuration of the run for Gentpro and which version of Gentpro you are using?

Sure @eyth.alison,
I used gentpro_v37 and gentpro execution programs. Both of them return memory allocation error
The updated fields in the run_gentpro_ag.csh are following:
run_gentpro_ag_D01.csh (4.5 KB)

setenv GRID bc_d01 # grid name for filename labeling
setenv IOAPI_GRIDNAME_1 bc_d01 # grid name as listed in GRIDDESC
setenv SRGDESC $GE_DAT/D01/SRGDESC.txt
setenv GRIDDESC $GE_DAT/D01/GRIDDESC

The GRIDDESC file content are following:

’ ’
‘LamCon-UTSTAND’
2 30.000 45.000 -97.000 -97.000 49.000
’ ’
‘bc_d01’
‘LamCon-UTSTAND’ -2183500.000 -23500.000 9000.000 9000.000 64 64 1
’ ’
The content of USA_340_NOFILL.txt are following

#GRID bc_d01 -2183500.000000 -23500.000000 9000.000000 9000.000000 64 64 1 LAMBERT meters 30.000000 45.000000 -97.000000 -97.000000 49.000000
#SRGDESC=340,NLCD Land

#SURROGATE REGION = USA
#SURROGATE CODE = 340
#SURROGATE NAME = NLCD Land
#DATA SHAPEFILE = cb_2017_us_county_500k
#DATA ATTRIBUTE = geoid
#WEIGHT SHAPEFILE = CONUS_AK_NLCD_2011_500m_WGS
#WEIGHT ATTRIBUTE =
#WEIGHT FUNCTION =
#FILTER FUNCTION = gridcode!=11

#USER = forood
#COMPUTER SYSTEM = linux
#DATE = Fri Nov 17 23:40:57 PST 2023
340 41007 15 1 0.0172018322 ! 37147338.32209244 2159498936.0192423
340 41007 15 2 0.0026292615 ! 5677887.469389709 2159498936.0192423
340 41007 16 1 0.0078291965 ! 16907141.61036089 2159498936.0192423
340 41007 17 1 0.0041706262 ! 9006462.760075198 2159498936.0192423
340 41007 18 1 0.0050774043 ! 10964649.144491615 2159498936.0192423
340 41007 19 1 0.0069609339 ! 15032129.368583437 2159498936.0192423
340 53001 59 1 0.0101404609 ! 50969618.74942645 5026361138.19285
340 53001 59 2 0.0062034338 ! 31180698.776145194 5026361138.19285
340 53001 59 3 0.0016985143 ! 8537346.464113828 5026361138.19285
340 53001 60 1 0.0161150379 ! 81000000.00000003 5026361138.19285
340 53001 60 2 0.0161150379 ! 81000000 5026361138.19285
340 53001 60 3 0.0065107097 ! 32725178.257366795 5026361138.19285
340 53001 61 1 0.0161150379 ! 80999999.99999999 5026361138.19285
340 53001 61 2 0.0161150379 ! 80999999.99999997 5026361138.19285
340 53001 61 3 0.0026680765 ! 13410716.141306577 5026361138.19285
340 53001 62 1 0.0161150379 ! 80999999.99999997 5026361138.19285
340 53001 62 2 0.0148679202 ! 74731536.38036141 5026361138.19285
340 53001 62 3 0.0000725610 ! 364717.6448850135 5026361138.19285
340 53001 63 1 0.0161150379 ! 80999999.99999999 5026361138.19285
340 53001 63 2 0.0111034280 ! 55809839.122581586 5026361138.19285
340 53001 64 1 0.0161150379 ! 81000000.00000001 5026361138.19285
340 53001 64 2 0.0073093907 ! 36739637.25736301 5026361138.19285
340 53007 43 10 0.0000485840 ! 372292.5875659467 7662868925.78185
340 53007 43 11 0.0036804073 ! 28202478.685164288 7662868925.78185
340 53007 43 12 0.0049896080 ! 38234712.03162671 7662868925.78185
340 53007 43 13 0.0002631976 ! 2016848.7666415996 7662868925.78185
340 53007 43 14 0.0000025536 ! 19567.60462576387 7662868925.78185
340 53007 43 15 0.0004550728 ! 3487163.093920218 7662868925.78185
340 53007 43 16 0.0000005424 ! 4156.537586667033 7662868925.78185
340 53007 44 9 0.0031873750 ! 24424436.49513896 7662868925.78185
340 53007 44 10 0.0082068639 ! 62888122.440406725 7662868925.78185
340 53007 44 11 0.0105374561 ! 80747145.22960825 7662868925.78185
340 53007 44 12 0.0105374436 ! 80747048.95070256 7662868925.78185
340 53007 44 13 0.0093168926 ! 71394126.48183903 7662868925.78185
340 53007 44 14 0.0081487869 ! 62443085.73899022 7662868925.78185
340 53007 44 15 0.0104919997 ! 80398818.29658404 7662868925.78185
340 53007 44 16 0.0067515038 ! 51735888.91305679 7662868925.78185
340 53007 44 17 0.0018123093 ! 13887488.701259894 7662868925.78185
340 53007 45 8 0.0012618006 ! 9669012.831463555 7662868925.78185
340 53007 45 9 0.0094842803 ! 72676796.70304814 7662868925.78185
340 53007 45 10 0.0104569899 ! 80130542.95494595 7662868925.78185
340 53007 45 11 0.0105374523 ! 80747115.86810963 7662868925.78185
340 53007 45 12 0.0105157546 ! 80580849.07856709 7662868925.78185

The following is the log file of my run:

 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: 2005333 $                          
                                                                 
 $Id: @(#) ioapi library version 3.0 $
 Version with PARMS3.EXT/PARAMETER::MXVARS3=50000
 netCDF version "3.6.2" of Dec  5 2008 11:55:27 $
  
  
 Missing environment variable EXECUTION_ID
 SMOKE ---------------
 Copyright (c)2004 Environmental Modeling for Policy Development
 All rights reserved

 Program GENTPRO, Version  
 Online documentation 
     http://www.cep.unc.edu/empd/products/smoke                 
  
 No program description is available for GENTPRO         
  
 You will need to enter the logical names for the input and
 output files (and to have set them prior to program start,
 using "setenv <logicalname> <pathname>").
  
 You may use END_OF-FILE (control-D) to quit the program
 during logical-name entry. Default responses are given in
 brackets [LIKE THIS] and can be accepted by hitting the
 <RETURN> key.
  
 Value for PROMPTFLAG:  N returning FALSE
 Returning default value TRUE for query:
 "Continue with program?"
 Value for PROMPTFLAG:  N returning FALSE

 File "COSTCY" opened for input on unit:  98
 /scratch/l/lminet/fazar37/models/SMOKE/smoke481/BC_US_data/gentpro/ge_dat/costcy_for_2017platform_20aug2020_v1.txt


 File "SRGDESC" opened for input on unit:  97
 /scratch/l/lminet/fazar37/models/SMOKE/smoke481/BC_US_data/gentpro/ge_dat/D01/SRGDESC.txt


 File "METLIST" opened for input on unit:  96
 metlist_2018_bc_d01.txt


 File "TREF_IN" opened for input on unit:  95
 /scratch/l/lminet/fazar37/models/SMOKE/smoke481/BC_US_data/gentpro/ge_dat/amptref_general_2011platform_tref_6nov2014_14may2015_v6

 Value for SMK_MAXWARNING not defined; returning default:  100
 Value for SCC_LIST:  '2805002000,2805003100,2805007100,2805007300'
 Value for SRG_LIST:  '340'
 Value for TPRO_OUTPUT:  'HOURLY'
 Value for PROFILE_METHOD:  'BASH_NH3'
 Value for TEMP_VAR:  'TEMPG'
 Value for AERO_RESISTANCE_VAR:  'RADYNI'
 NOTE: Aerodynamic resistance variable (RADYNI) is chosen for "BASH_NH3" profile method

 File "TREF_OUT" opened for output on unit:  94
 /scratch/l/lminet/fazar37/models/SMOKE/smoke481/BC_US_data/gentpro/Gentpro_TREF_HOURLY_BASH_NH3.agNH3_bash_2018_bc_d01.txt

 Value for OUTZONE not defined; returning default:  0
 Value for SRG_COUNTRY not defined; returning defaultval ':  'USA'

 File "TMP_SRG_FILE" opened for output on unit:  93
 TMP_COMBINED_SRG.txt


 File "TMP_SRG" opened for input on unit:  92
 /scratch/l/lminet/fazar37/models/SMOKE/smoke481/BC_US_data/gentpro/ge_dat//D01/USA_340_NOFILL.txt


 File "TMP_SRG_FILE" opened for input on unit:  93
 TMP_COMBINED_SRG.txt

 NOTE: Grid settings initialized using BC_D01           in  
      surrogates file.
 NOTE: Input surrogates are MODELS3 format.
 Value for GRIDDESC:  '/scratch/l/lminet/fazar37/models/SMOKE/smoke481/BC_US_data/gentpro/ge_dat/D01/GRIDDESC'

 File "GRIDDESC" opened for input on unit:  92
 /scratch/l/lminet/fazar37/models/SMOKE/smoke481/BC_US_data/gentpro/ge_dat/D01/GRIDDESC

 Value for IOAPI_GRIDNAME_1:  'bc_d01'

 File "GRIDDESC" opened for input on unit:  92
 /scratch/l/lminet/fazar37/models/SMOKE/smoke481/BC_US_data/gentpro/ge_dat/D01/GRIDDESC

 Processing gridding surrogate(s)...
 WARNING: Some surrogates renormalized when total of surrogates by county were  
      greater than 1.
 NOTE: A list of surrogates used in the modeling
 Surrogate ID ::     340
 Value for SMK_DEFAULT_TZONE not defined; returning default:  5
 Reading state and county names and time zones...
 NOTE: Population data read from country/state/county file for year     2000
 NOTE: No population data will be read from country/state/county file.
 NOTE: No population data will be read from country/state/county file.
 NOTE: No population data will be read from country/state/county file.
 NOTE: No population data will be read from country/state/county file.
 NOTE: No population data will be read from country/state/county file.
 NOTE: No population data will be read from country/state/county file.
 Value for STDATE:  2018032
 Value for STTIME not defined; returning default:  0
 Value for ENDATE:  2018042
 Value for ENDTIME not defined; returning default:  230000
 Reading Temporal x-ref input file
 Processing Temporal x-ref input file..........
 Checking meteorology files...
 Value for IOAPI_CHECK_HEADERS not defined;returning default:   FALSE
  
 "METFILE" opened as OLD:READ-ONLY   
 File name "/scratch/l/lminet/fazar37/models/CMAQ/OfflineCMAQ/CMAQ_BC5/data/BC_D01/mcip/bc_d01/METCRO2D_bc_d01_9km.nc"
 File type GRDDED3 
 Execution ID "mcip"
 Grid name "bc_d01_CROSS"
 Dimensions: 64 rows, 64 cols, 1 lays, 35 vbles
 NetCDF ID:        10  opened as READONLY            
 Starting date and time  2018031:010000 (1:00:00   Jan. 31, 2018)
 Timestep                          010000 (1:00:00 hh:mm:ss)
 Maximum current record number       480
 Closing file METFILE

Thank you for this information. We note that this is not typically a memory intensive program.

Unfortunately, we can’t provide much more troubleshooting right now due to folks being out for the holidays.

If your domain is over the U.S., you could use the temporal profiles provided with the 2017 platform:

https://gaftp.epa.gov/Air/emismod/2017/ancillary_data/ge_dat_for_2017gb_temporal_29jun2020.zip

Thanks for providing the alternative solution. Based on the manual, gentpro program requires annual MCIP output, which in my case I didn’t provide. Since my project has only specific time period (which is only selected months of the year that I can provide the MCIP output), is there any way that I can utilize gentpro?

Thanks

It looks like you have a single met file for the 20-day period. We don’t know if Gentpro can read all met data from one file. But a larger issue is that Gentpro is designed to run with met. data from an entire year and it appears you do not have that. Instead of running Gentpro, you could consider using the RWC and ag profiles from the corresponding 12US1 annual case for 2018, such as the Gentpro outputs from the 2018 package: https://gaftp.epa.gov/air/emismod/2018/ancillary_data/ge_dat_for_2018gc_temporal_11oct2021.zip

Thanks @eyth.alison
I think the error I am getting from Gentpro is due to unavailability of the whole year met files. For RWC, I was able to use Gentpro outputs and the model is working fine. However, for ag, the model cannot process the Gentpro output from 12US1 domain since my domain is totally different than 12US1.

Yes, that makes sense although I’m surprised that you got it to work for RWC without a full year of met data. If your domain is over the continental US you may still be able to use the pregenerated files.

Otherwise, not sure how to help further – you may be able to derive some regular diurnal profiles from the pregenerated data they just won’t be as specific.

Can you attach your full Gentpro log so we can help determine which input might be causing a problem?