# Run Gentpro script

**URL:** <https://forum.cmascenter.org/t/run-gentpro-script/2816>\
**Category:** SMOKE\
**Created:** [November 16, 2021, 7:19am UTC](https://forum.cmascenter.org/t/run-gentpro-script/2816 "2021-11-16T07:19:40Z")\
**Posts on this page:** 17\
**Page:** 2

<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:** [November 23, 2021, 6:51pm UTC](https://forum.cmascenter.org/t/run-gentpro-script/2816/21 "2021-11-23T18:51:55Z")

</div>

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.

---

<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 23, 2021, 8:08pm UTC](https://forum.cmascenter.org/t/run-gentpro-script/2816/22 "2021-11-23T20:08:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![wli31](https://avatars.discourse-cdn.com/v4/letter/w/f08c70/32.png) [@wli31](https://forum.cmascenter.org/u/wli31)\
**Post date:** [November 24, 2021, 1:27am UTC](https://forum.cmascenter.org/t/run-gentpro-script/2816/23 "2021-11-24T01:27:55Z")

</div>

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

Wei

---

<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 24, 2021, 8:33pm UTC](https://forum.cmascenter.org/t/run-gentpro-script/2816/24 "2021-11-24T20:33:02Z")

</div>

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](https://gaftp.epa.gov/Air/emismod/2017/ancillary_data/gentpro_scripts_2017platform.zip)

---

<div class="post-metadata">

**Author:** ![wli31](https://avatars.discourse-cdn.com/v4/letter/w/f08c70/32.png) [@wli31](https://forum.cmascenter.org/u/wli31)\
**Post date:** [November 25, 2021, 1:04am UTC](https://forum.cmascenter.org/t/run-gentpro-script/2816/25 "2021-11-25T01:04:41Z")

</div>

This solution works perfectly! Thanks very much.

Wei

---

<div class="post-metadata">

**Author:** ![garnerfor](https://avatars.discourse-cdn.com/v4/letter/g/ce73a5/32.png) [@garnerfor](https://forum.cmascenter.org/u/garnerfor)\
**Post date:** [November 8, 2022, 3:15pm UTC](https://forum.cmascenter.org/t/run-gentpro-script/2816/26 "2022-11-08T15:15:50Z")

</div>

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.[.](https://forpc.onl) [.](https://forpc.onl/youtube-vanced-for-pc/)

---

<div class="post-metadata">

**Author:** ![fazargoshasbi](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@fazargoshasbi](https://forum.cmascenter.org/u/fazargoshasbi)\
**Post date:** [December 22, 2023, 8:18am UTC](https://forum.cmascenter.org/t/run-gentpro-script/2816/27 "2023-12-22T08:18:54Z")

</div>

@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?

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/f/f0c7a05cdc0b6f5b794a91d7bda86a76176ef79c.png)

---

<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:** [December 22, 2023, 1:09pm UTC](https://forum.cmascenter.org/t/run-gentpro-script/2816/28 "2023-12-22T13:09:51Z")

</div>

What sector ae you trying to generated profiles for?

---

<div class="post-metadata">

**Author:** ![fazargoshasbi](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@fazargoshasbi](https://forum.cmascenter.org/u/fazargoshasbi)\
**Post date:** [December 22, 2023, 4:41pm UTC](https://forum.cmascenter.org/t/run-gentpro-script/2816/29 "2023-12-22T16:41:01Z")

</div>

@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.

---

<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:** [December 22, 2023, 5:20pm UTC](https://forum.cmascenter.org/t/run-gentpro-script/2816/30 "2023-12-22T17:20:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![fazargoshasbi](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@fazargoshasbi](https://forum.cmascenter.org/u/fazargoshasbi)\
**Post date:** [December 22, 2023, 7:26pm UTC](https://forum.cmascenter.org/t/run-gentpro-script/2816/31 "2023-12-22T19:26:44Z")

</div>

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](https://forum.cmascenter.org/uploads/short-url/43i4AX6XpegUkZpvLk6CKnonrxV.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

```

---

<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:** [December 22, 2023, 7:43pm UTC](https://forum.cmascenter.org/t/run-gentpro-script/2816/32 "2023-12-22T19:43:48Z")

</div>

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](https://gaftp.epa.gov/Air/emismod/2017/ancillary_data/ge_dat_for_2017gb_temporal_29jun2020.zip)

---

<div class="post-metadata">

**Author:** ![fazargoshasbi](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@fazargoshasbi](https://forum.cmascenter.org/u/fazargoshasbi)\
**Post date:** [December 23, 2023, 9:11pm UTC](https://forum.cmascenter.org/t/run-gentpro-script/2816/33 "2023-12-23T21:11:15Z")

</div>

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

---

<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:** [January 3, 2024, 2:06am UTC](https://forum.cmascenter.org/t/run-gentpro-script/2816/34 "2024-01-03T02:06:56Z")

</div>

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](https://gaftp.epa.gov/air/emismod/2018/ancillary_data/ge_dat_for_2018gc_temporal_11oct2021.zip)

---

<div class="post-metadata">

**Author:** ![fazargoshasbi](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@fazargoshasbi](https://forum.cmascenter.org/u/fazargoshasbi)\
**Post date:** [January 3, 2024, 4:15am UTC](https://forum.cmascenter.org/t/run-gentpro-script/2816/35 "2024-01-03T04:15:52Z")

</div>

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.

---

<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:** [January 3, 2024, 12:59pm UTC](https://forum.cmascenter.org/t/run-gentpro-script/2816/36 "2024-01-03T12:59:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jamesnozyz](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jamesnozyz](https://forum.cmascenter.org/u/jamesnozyz)\
**Post date:** [January 9, 2024, 1:53pm UTC](https://forum.cmascenter.org/t/run-gentpro-script/2816/37 "2024-01-09T13:53:15Z")

</div>

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

[Previous page](https://forum.cmascenter.org/t/run-gentpro-script/2816.md?page=1)
