# Bad environment-list "NPCOL\_NPROW" in combine script

**URL:** <https://forum.cmascenter.org/t/bad-environment-list-npcol-nprow-in-combine-script/2012>\
**Category:** Post-processing\
**Created:** [January 17, 2021, 3:56pm UTC](https://forum.cmascenter.org/t/bad-environment-list-npcol-nprow-in-combine-script/2012 "2021-01-17T15:56:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ckuo6](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ckuo6](https://forum.cmascenter.org/u/ckuo6)\
**Post date:** [January 17, 2021, 3:56pm UTC](https://forum.cmascenter.org/t/bad-environment-list-npcol-nprow-in-combine-script/2012/1 "2021-01-17T15:56:46Z")

</div>

I ran CMAQ on NCAR Cheyenne.  
I would like to execute combine script for CMAQ results.

In run script, I set  
select=4:ncpus=8:mpiprocs=8  
which are 4 nodes, 8 cores per node, 8 mpi processes per node  
Reference  
[https://www2.cisl.ucar.edu/resources/computational-systems/cheyenne/running-jobs/submitting-jobs-pbs](https://www2.cisl.ucar.edu/resources/computational-systems/cheyenne/running-jobs/submitting-jobs-pbs)  
and:

if ( $PROC == serial ) then  
setenv NPCOL\_NPROW “1 1”; set NPROCS = 1 # single processor setting  
else  
@ NPCOL = 4; @ NPROW = 8  
@ NPROCS = $NPCOL \* $NPROW  
setenv NPCOL\_NPROW “$NPCOL $NPROW”;  
endif

The CMAQ results is good, but when I tried to combine the results of different days, the following errors occurred:

```
 Missing environment variable EXECUTION_ID

```

API Started  
Value for IOAPI\_ISPH not defined; returning defaultval ': ‘20’  
Value for IOAPI\_ISPH not defined; returning defaultval ': ‘20’  
_WARNING_ IOAPI\_ISPH not set in script, using 20 (WRF-ARW sphere)  
“MODPDATA:PN\_SETUP”: Version  
Id: modpdata.F90 437 2016-11-28 16:37:14Z coats   
Value for NPCOL\_NPROW not defined; returning defaultval ': ’ ’  
Value for NPCOL\_NPROW not defined; returning defaultval ': ’ ’

```
 *** ERROR ABORT in subroutine MODPDATA:PN_SETUP
 Bad environment-list "NPCOL_NPROW"

```

I set select=4:ncpus=8:mpiprocs=8 in combine script as well.  
I tried to search for similar issues, but there are no related posts.

---

<div class="post-metadata">

**Author:** ![hogrefe.christian](https://avatars.discourse-cdn.com/v4/letter/h/74df32/32.png) [@hogrefe.christian](https://forum.cmascenter.org/u/hogrefe.christian)\
**Post date:** [January 17, 2021, 6:14pm UTC](https://forum.cmascenter.org/t/bad-environment-list-npcol-nprow-in-combine-script/2012/2 "2021-01-17T18:14:58Z")

</div>

None of the postprocessing programs in the ‘POST’ directory, including ‘combine’, are set up for parallel computing. Could you please try running ‘combine’ based on the sample run script provided with the code, i.e. without adding “select=4:ncpus=8:mpiprocs=8” to see if this solves your problem? If this still fails, please post your complete ‘combine’ run script and log file.

---

<div class="post-metadata">

**Author:** ![ckuo6](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ckuo6](https://forum.cmascenter.org/u/ckuo6)\
**Post date:** [January 17, 2021, 7:26pm UTC](https://forum.cmascenter.org/t/bad-environment-list-npcol-nprow-in-combine-script/2012/3 "2021-01-17T19:26:56Z")

</div>

I tried to delete “select=4:ncpus=8:mpiprocs=8” but the machine does not accept a job without specified nodes and cores. I attached the run script, combine script, and combine log file here.  
Meanwhile, I wrote a checkfilesize script to confirm CMAQ results and activate combine script, so it is unparalleled.

[run\_201601\_R225.csh](https://forum.cmascenter.org/uploads/short-url/vms5Aqwgjjw5kLrcvxswaXEvCCS.csh) (35.6 KB)  
[C\_201601\_225.o5951713.txt](https://forum.cmascenter.org/uploads/short-url/utn5H9HbWWBrCJfyjhyWXKPKH64.txt) (4.4 KB) [combine\_201601\_R225.csh](https://forum.cmascenter.org/uploads/short-url/yEYoC7Agzm17yDjNLRp2HgxODdH.csh) (4.7 KB)  
[checkfilesize.csh](https://forum.cmascenter.org/uploads/short-url/f5YIU1VQSc4u2WOeuf9PeD0IPVy.csh) (627 Bytes)

---

<div class="post-metadata">

**Author:** ![hogrefe.christian](https://avatars.discourse-cdn.com/v4/letter/h/74df32/32.png) [@hogrefe.christian](https://forum.cmascenter.org/u/hogrefe.christian)\
**Post date:** [January 17, 2021, 8:51pm UTC](https://forum.cmascenter.org/t/bad-environment-list-npcol-nprow-in-combine-script/2012/4 "2021-01-17T20:51:51Z")

</div>

Thank you.

The error seems to originate in I/O API modpdata.F90 which, based on the header, is used if you’re using parallel-netCDF in your I/O API build. I do not have experience with using parallel-netCDF, so my suggestion may not help, but you could try adding the following to your ‘combine’ run script:

setenv NPCOL\_NPROW “1 1”  
set NPROCS = 1  
(the latter probably isn’t necessary since it doesn’t affect the environment)

These lines aren’t necessary for a non-parallel-netCDF I/O API build and aren’t part of our run scripts for ‘combine’ and other non-parallelized postprocessing tools, but might be necessary if you’ve compiled the post-processing tools with a parallel-netCDF I/O API build. If this is the root cause, @cjcoats would be a much better person than me to troubleshoot any problems you might continue to encounter with this setup.

---

<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:** [January 17, 2021, 9:07pm UTC](https://forum.cmascenter.org/t/bad-environment-list-npcol-nprow-in-combine-script/2012/5 "2021-01-17T21:07:30Z")

</div>

See [https://cjcoats.github.io/ioapi/BUFFERED.html#pncf](https://cjcoats.github.io/ioapi/BUFFERED.html#pncf):

> I/O API Version 3.2 introduces support for distributed parallel I/O using [PnetCDF](https://trac.mcs.anl.gov/projects/parallel-netcdf) from Argonne National Laboratory, for use in CMAQ-5.1 CCTM and later…  
> **I/O API builds usiing PnetCDF are not link compatible with ordinary builds, and should be kept carefully separate from them.**

**Generally pNetCDF-enable I/O API should be used for the CMAQ CCTM only.** That CMAQ’s _bldmod_ system does not respect this is a bug/defect in the CMAQ build system.

---

<div class="post-metadata">

**Author:** ![ckuo6](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ckuo6](https://forum.cmascenter.org/u/ckuo6)\
**Post date:** [January 18, 2021, 1:44am UTC](https://forum.cmascenter.org/t/bad-environment-list-npcol-nprow-in-combine-script/2012/6 "2021-01-18T01:44:28Z")

</div>

Thanks, @cjcoats

I used Linux2\_x86\_64ifortmpi for CCTM compilation (CCTM\_v532.exe) and used Linux2\_x86\_64ifort for /POST/combine compilation (combine\_v532.exe). It works!
