# Make: \*\*\* \[combine.exe\] Error 2 undefined reference to \`nf\_get\_vara\_text\_

**URL:** <https://forum.cmascenter.org/t/make-combine-exe-error-2-undefined-reference-to-nf-get-vara-text/2122>\
**Category:** Post-processing\
**Tags:** admin\
**Created:** [February 23, 2021, 8:04pm UTC](https://forum.cmascenter.org/t/make-combine-exe-error-2-undefined-reference-to-nf-get-vara-text/2122 "2021-02-23T20:04:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Iqbal](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@Iqbal](https://forum.cmascenter.org/u/Iqbal)\
**Post date:** [February 23, 2021, 8:04pm UTC](https://forum.cmascenter.org/t/make-combine-exe-error-2-undefined-reference-to-nf-get-vara-text/2122/1 "2021-02-23T20:04:35Z")

</div>

Hello @cjcoats@hogrefe.christian

I am trying to build combine.exe from AMETV1.4 (I had successfully built it from AMET V1.2). Here is what I did (attached makefile [Makefile\_combine.txt](https://forum.cmascenter.org/uploads/short-url/cRW3UeW6e1AHUEuHqRKVEt7KG7j.txt) (2.4 KB) :

1. I modified the library and ioapi path as my system.
2. I modified FSTD = -Mextend -O2 -fast -V -Msecond\_underscore
3. I removed -fixed -132 from f- FLAGS

Then when I make it I am getting following error:

file.F:1004: undefined reference to `nf_inq_dimid__' /run/media/root/55A07B0360BDF544/postproc/AMET_v14/tools_src/combine/src/module_file.F:1004: undefined reference to `nf\_inq\_dimid\_\_’  
/run/media/root/55A07B0360BDF544/postproc/AMET\_v14/tools\_src/combine/src/module\_file.F:1007: undefined reference to `nf_inq_dimid__' module_file.o:/run/media/root/55A07B0360BDF544/postproc/AMET_v14/tools_src/combine/src/module_file.F:1007: more undefined references to `nf\_inq\_dimid\_\_’ follow  
module\_file.o: In function `m3files_wrf_desc__': /run/media/root/55A07B0360BDF544/postproc/AMET_v14/tools_src/combine/src/module_file.F:945: undefined reference to `nf\_inq\_varid\_\_’  
/run/media/root/55A07B0360BDF544/postproc/AMET\_v14/tools\_src/combine/src/module\_file.F:1018: undefined reference to `nf_inq_nvars__' /run/media/root/55A07B0360BDF544/postproc/AMET_v14/tools_src/combine/src/module_file.F:1023: undefined reference to `nf\_inq\_var\_\_’  
/run/media/root/55A07B0360BDF544/postproc/AMET\_v14/tools\_src/combine/src/module\_file.F:1054: undefined reference to `nf_get_att_text__' /run/media/root/55A07B0360BDF544/postproc/AMET_v14/tools_src/combine/src/module_file.F:1055: undefined reference to `nf\_get\_att\_text\_\_’  
/run/media/root/55A07B0360BDF544/postproc/AMET\_v14/tools\_src/combine/src/module\_file.F:957: undefined reference to `nf\_get\_vara\_text\_\_’  
make: \*\*\* [combine.exe] Error 2

Note: Please see my Makeinclude.Linux3 file from ioapi ( [Makeinclude.Linux3.txt](https://forum.cmascenter.org/uploads/short-url/tSLSPrOSWxSW28jtujgkSJ2brrW.txt) (1.9 KB) )

Please help

---

<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:** [February 23, 2021, 8:34pm UTC](https://forum.cmascenter.org/t/make-combine-exe-error-2-undefined-reference-to-nf-get-vara-text/2122/2 "2021-02-23T20:34:33Z")

</div>

This may or may not be the cause of the problem, but it seems you have different options for second\_underscore in Makeinclude.Linux3.txt and Makefile\_combine.txt

Makeinclude.Linux3.txt:

`FOPTFLAGS = -O2 -V -Mnosecond_underscore`

Makefile\_combine.txt:

`FSTD = -Mextend -O2 -fast -V -Msecond_underscore`

Try changing the setting in Makefile\_combine.txt to `-Mnosecond_underscore` to match what you did when you built I/O API.

I think this may be the exact same issue [you ran into when compiling airs2m3](https://forum.cmascenter.org/t/airs2m3-error-2-while-compiling-ioapi3-2/2061), and the solution may also be the same.

---

<div class="post-metadata">

**Author:** ![Iqbal](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@Iqbal](https://forum.cmascenter.org/u/Iqbal)\
**Post date:** [February 23, 2021, 11:25pm UTC](https://forum.cmascenter.org/t/make-combine-exe-error-2-undefined-reference-to-nf-get-vara-text/2122/3 "2021-02-23T23:25:44Z")

</div>

Hello @hogrefe.christian

Thank you for the reply. I was able to compile it by using -Mnosecond\_underscore. But I can compile all other tools (sitecmp.exe ; sitecmp\_dailyo3.exe ; bldoverlay.exe) by using -Msecond\_underscore.

After, That I build a database by using /scripts\_db/dbsetup/create\_amet\_user.csh and ran aqExample/aqProject\_post\_only.csh by considering option T for load\_sitex, run\_sitex, and write\_sitex.

But when I tried to run /script\_analysis/aqExample/stats\_plot\_leaflet.csh , I am getting following error ( attached log file and script [run\_stats\_plots\_leaflet.txt](https://forum.cmascenter.org/uploads/short-url/8CjIGNKYH63X4NPbBVHWyfdZjZj.txt) (5.0 KB) [stats\_plots\_leaflet.log.txt](https://forum.cmascenter.org/uploads/short-url/ocURU072qyEPnZg83J6OSHQBWf8.txt) (3.1 KB)

7: In .local(conn, statement, …) :  
Unsigned INTEGER in col 10 imported as numeric  
8: In .local(conn, statement, …) :  
Unsigned INTEGER in col 11 imported as numeric  
9: In .local(conn, statement, …) :  
Unsigned INTEGER in col 12 imported as numeric  
10: In .local(conn, statement, …) :  
Unsigned INTEGER in col 21 imported as numeric  
Execution halted

Please help

---

<div class="post-metadata">

**Author:** ![wyat.appel](https://avatars.discourse-cdn.com/v4/letter/w/3d9bf3/32.png) [@wyat.appel](https://forum.cmascenter.org/u/wyat.appel)\
**Post date:** [February 24, 2021, 8:29pm UTC](https://forum.cmascenter.org/t/make-combine-exe-error-2-undefined-reference-to-nf-get-vara-text/2122/4 "2021-02-24T20:29:52Z")

</div>

Hi,

Your error suggests that the species PM25\_TOT is not in the database. This is likely an error during the earlier AMET processes. Do you have the log file available for the aqProject\_post\_only.csh script? That would reveal any errors.

Wyat

---

<div class="post-metadata">

**Author:** ![Iqbal](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@Iqbal](https://forum.cmascenter.org/u/Iqbal)\
**Post date:** [February 24, 2021, 8:36pm UTC](https://forum.cmascenter.org/t/make-combine-exe-error-2-undefined-reference-to-nf-get-vara-text/2122/5 "2021-02-24T20:36:34Z")

</div>

Hello @wyat.appel

I have tried using this script [aqProject\_post\_only\_julyARDEQ.txt](https://forum.cmascenter.org/uploads/short-url/f6xKcikxbCNrVFNq7AYvH5Ay78V.txt) (7.1 KB) and terminal log file of this run ( some lines of the [terminal.log.txt](https://forum.cmascenter.org/uploads/short-url/tzfk4oq2Xhw1pbAa45eE7UCbjmK.txt) (176.5 KB) ). It produces these files [IMPROVE\_ARDEQ\_JUL\_TRIAL.csv](https://forum.cmascenter.org/uploads/short-url/n9hg2KRNCukVB9UPHSuc5o7Zqgi.csv) (1.2 MB) [sitex\_IMPROVE\_ARDEQ\_JUL\_TRIAL.txt](https://forum.cmascenter.org/uploads/short-url/tyGlMnqcRaiCMxNP2uW8SGYB6fr.txt) (4.4 KB)

Then I tried to run these script [run\_scatterplot.txt](https://forum.cmascenter.org/uploads/short-url/7SpfwQaXExy6IzuYX0jELwAucHS.txt) (5.3 KB) and got this error [scatterplot.log.txt](https://forum.cmascenter.org/uploads/short-url/tk7CfJnyAITnJBRs1oTQcBddJF0.txt) (1.8 KB)

Note: my combine.exe files are [spec\_def.camxv7.elements.txt](https://forum.cmascenter.org/uploads/short-url/A68lxSxe2ebqFvF1dVN6i1t9D2L.txt) (1.1 KB) [ARDEQ\_combine.ADEQ\_AR\_2020.txt](https://forum.cmascenter.org/uploads/short-url/lAJrVs4pi2nX5DmVo76d0OK6Djb.txt) (993 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:** [February 25, 2021, 4:45pm UTC](https://forum.cmascenter.org/t/make-combine-exe-error-2-undefined-reference-to-nf-get-vara-text/2122/6 "2021-02-25T16:45:57Z")

</div>

Like @wyat.appel suggested and your files confirm, your underlying error is that sitecompare cannot find the modeled PM species it is expecting, and the reason for this is that you are working with CAMx PM species. Look at terminal.log.txt - it tells you that sitecompare cannot find the modeled species specified in the sitex\_IMPROVE\_ARDEQ\_JUL\_TRIAL.txt run script, and it also tells you which (CAMx) model PM species you actually have in your files. As a result of not being able to find the expected PM species, all model output written to the sitecompare output csv file is missing, which of course then leads to crashes when you try to use AMET analysis scripts.

To start fixing your issue, please have a look at the general post-processing concepts [described here](https://github.com/USEPA/CMAQ/blob/master/DOCS/Users_Guide/CMAQ_UG_ch08_analysis_tools.md)

You then need to decide at which stage you want to make modifications to the tools used by AMET (combine and sitecompare) to make them work for your data. I cannot give guidance on CAMx species and what they represent, but in general, you have two options to approach this:

- modify the `combine` mechanism-specific SpecDef file ([e.g. this one](https://github.com/USEPA/AMET/blob/master/tools_src/combine/scripts/spec_def_files/SpecDef_Dep_cb6r3_ae7_aq.txt)) referenced by [aqProject\_pre\_and\_post.csh](https://github.com/USEPA/AMET/blob/master/scripts_db/aqExample/aqProject_pre_and_post.csh) so that it estimates the expected CMAQ species (i.e. the species in the first column) from available CAMx species (i.e. the species in the third column). For this, you can focus on the CMAQ species expected for the sitecompare matching script. In AMET, this is controlled by [AMET\_species\_list.input](https://github.com/USEPA/AMET/blob/master/scripts_db/input_files/AQ_species_list.input), i.e. in AMET, this is the file that controls the auto-generation of the sitecompare run scripts which list the model species expected to be available for each network to pair with available observations.

- If you prefer not to modify the SpecDef file that controls which species get written to the `combine` output file, you’ll instead need to modify [AMET\_species\_list.input](https://github.com/USEPA/AMET/blob/master/scripts_db/input_files/AQ_species_list.input) for all networks you’re interested to specify CAMx model species available from your `combine` output file. This will require some knowledge of which CAMx species are comparable to which observational species.

Of course, you can also use a combination of these approaches, e.g. map the CAMx PM species to the CMAQ aero7 species to the extent possible by modifying the SpecDef file, and then also edit [AMET\_species\_list.input](https://github.com/USEPA/AMET/blob/master/scripts_db/input_files/AQ_species_list.input) for all networks you’re interested to remove references to any CMAQ aero7 species you may not be able to estimate from your CAMx PM species.

---

<div class="post-metadata">

**Author:** ![Iqbal](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@Iqbal](https://forum.cmascenter.org/u/Iqbal)\
**Post date:** [February 25, 2021, 7:57pm UTC](https://forum.cmascenter.org/t/make-combine-exe-error-2-undefined-reference-to-nf-get-vara-text/2122/7 "2021-02-25T19:57:37Z")

</div>

Hello @wyat.appel@hogrefe.christian

Thank you so much for the help. I modified spec\_def list and successfully created a scatterplot by using /script\_analysis/aqExample/run\_scatterplot.csh.
