# How to use AMET without mySQL?

**URL:** <https://forum.cmascenter.org/t/how-to-use-amet-without-mysql/889>\
**Category:** AMET\
**Created:** [August 28, 2019, 4:32pm UTC](https://forum.cmascenter.org/t/how-to-use-amet-without-mysql/889 "2019-08-28T16:32:41Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![zyj.jess](https://avatars.discourse-cdn.com/v4/letter/z/8dc957/32.png) [@zyj.jess](https://forum.cmascenter.org/u/zyj.jess)\
**Post date:** [August 28, 2019, 4:32pm UTC](https://forum.cmascenter.org/t/how-to-use-amet-without-mysql/889/1 "2019-08-28T16:32:42Z")

</div>

Dear all;

Since our High Performance Computational Platform does not allow to use mySQL server, I need to analyze the CMAQ outputs without mySQL. I have downloaded the 2014 observational data, so there is no need to obtain observation data from other networks.

Could you share me some thoughts of using AMET R scripts without installing mySQL, if possible?

Thanks very much!

Yijia

---

<div class="post-metadata">

**Author:** ![zyj.jess](https://avatars.discourse-cdn.com/v4/letter/z/8dc957/32.png) [@zyj.jess](https://forum.cmascenter.org/u/zyj.jess)\
**Post date:** [August 29, 2019, 2:12pm UTC](https://forum.cmascenter.org/t/how-to-use-amet-without-mysql/889/2 "2019-08-29T14:12:44Z")

</div>

I download and installed AMET\_v14. What script shall I run to compare observation and model results only using the R analysis in AMET? The issue stuck me is I don’t have mySQL in the system.

Thank you!  
Yijia

---

<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:** [August 29, 2019, 2:34pm UTC](https://forum.cmascenter.org/t/how-to-use-amet-without-mysql/889/3 "2019-08-29T14:34:52Z")

</div>

Hi Yijia,

First, I should say that only the air quality side of AMET currently will function without a database present. So, you won’t be able to use AMET to process and analyze meteorological data with the database.

You can use AMET-AQ without a database present. The AMET User’s Guide explains how to do this. I suggest referring to that guide for more detailed instructions of what I will explain here.

In short, to analyze air quality data without the database, you’ll skip any steps that require a database. That includes initial setup of the AMET database, creating an AMET database user, etc. In the AMET-AQ example run scripts in the scripts\_db directory, you’ll want to set the LOAD\_SITEX flag in those scripts to “F”. This will tell AMET not to load any data into the database. In the analysis scripts in the scripts\_analysis directory, you need to set the AMET\_DB flag to “F”. This tells AMET to read the observed/modeled data directly from the site compare csv files and not the database.

Note that not all AQ analysis scripts will currently work without the database present, but many will. Please report any issues you run into. This is a new feature in AMETv1.4 and I’m looking for feedback.

Thanks and good luck!

Wyat

---

<div class="post-metadata">

**Author:** ![zyj.jess](https://avatars.discourse-cdn.com/v4/letter/z/8dc957/32.png) [@zyj.jess](https://forum.cmascenter.org/u/zyj.jess)\
**Post date:** [August 29, 2019, 2:45pm UTC](https://forum.cmascenter.org/t/how-to-use-amet-without-mysql/889/4 "2019-08-29T14:45:32Z")

</div>

Thank you, Wyat! Your suggestion is very helpful! Appreciate!

Yijia

---

<div class="post-metadata">

**Author:** ![Catalyst2682](https://avatars.discourse-cdn.com/v4/letter/c/a6a055/32.png) [@Catalyst2682](https://forum.cmascenter.org/u/Catalyst2682)\
**Post date:** [November 6, 2019, 12:23pm UTC](https://forum.cmascenter.org/t/how-to-use-amet-without-mysql/889/5 "2019-11-06T12:23:20Z")

</div>

Dear @lizadams, @tlspero, @wong.david-c, @bbaek, @cgnolte, @zyj.jess, @hogrefe.christian, @wyat.appel,

Can AMET be used for model evaluation outside USA? For instance, I am based in China. Can I use it to evaluate my models?

Thanks in anticipation.

Catalyst

---

<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:** [November 6, 2019, 1:34pm UTC](https://forum.cmascenter.org/t/how-to-use-amet-without-mysql/889/6 "2019-11-06T13:34:57Z")

</div>

Hi,

Yes, AMET can be used outside the US. It does not have a geographical limitation. If you plan to use AMET for China, you will however need to obtain AQ observation data as there are currently no AQ data available to provide for China. Meteorological data are available outside the US however.

Wyat

---

<div class="post-metadata">

**Author:** ![Catalyst2682](https://avatars.discourse-cdn.com/v4/letter/c/a6a055/32.png) [@Catalyst2682](https://forum.cmascenter.org/u/Catalyst2682)\
**Post date:** [November 6, 2019, 4:16pm UTC](https://forum.cmascenter.org/t/how-to-use-amet-without-mysql/889/7 "2019-11-06T16:16:28Z")

</div>

Dear @wyat.appel,

Thanks for your prompt response. I’ll give it a trial and get back to you for any assistance regarding its usage.

Kind regards,

Catalyst

---

<div class="post-metadata">

**Author:** ![qluo](https://avatars.discourse-cdn.com/v4/letter/q/90ced4/32.png) [@qluo](https://forum.cmascenter.org/u/qluo)\
**Post date:** [November 18, 2020, 1:20am UTC](https://forum.cmascenter.org/t/how-to-use-amet-without-mysql/889/8 "2020-11-18T01:20:17Z")

</div>

Hi Wyat,

I am also trying to use AMET-AQ without mySQL. Based on your suggestion, I set LOAD\_SITEX  
to T when running aqProject\_post\_only.csh. But I still got errors related to mySQL. Is there anythig else I need to change? Really appreciate your help!

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/1X/2841bfd10ca79e5be92c493fdf7b8da93eb5f98f.png)  
Thanks,  
Qian

---

<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:** [November 18, 2020, 5:59pm UTC](https://forum.cmascenter.org/t/how-to-use-amet-without-mysql/889/9 "2020-11-18T17:59:55Z")

</div>

Hi Qian,

To use AMET-AQ without the database you should actually set LOAD\_SITEX to F, not T. Where was it suggested that LOAD\_SITEX should be set to T to use AMET-AQ without the database? I may need to correct that if that is the case.

Let me know if that helps solve your errors.

Wyat

![~WRD0001.jpg](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/1X/52d5f1c08649212fe6768d2cacdcf8df711810d9.jpeg)

![image001.jpg](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/1X/2485d26919316b1d80aa60f5ca8e2cb5bc0275fe.jpeg)

---

<div class="post-metadata">

**Author:** ![qluo](https://avatars.discourse-cdn.com/v4/letter/q/90ced4/32.png) [@qluo](https://forum.cmascenter.org/u/qluo)\
**Post date:** [November 18, 2020, 6:03pm UTC](https://forum.cmascenter.org/t/how-to-use-amet-without-mysql/889/10 "2020-11-18T18:03:23Z")

</div>

I am sorry. It was my typo. I did set it to F but still got these errors related to MySQL.  
The script I am using is [aqProject\_post\_only.csh](https://forum.cmascenter.org/uploads/short-url/sTSwfT3WqX8zXlmRgbbHn59rmaN.csh) (7.1 KB)

---

<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:** [November 18, 2020, 6:46pm UTC](https://forum.cmascenter.org/t/how-to-use-amet-without-mysql/889/11 "2020-11-18T18:46:21Z")

</div>

Hi Qian,

I agree there is an issue here. It appears this script will attempt to execute some MySQL commands regardless of the setting of the LOAD\_SITEX flag. So, I’ve modified your script slightly (new version attached) to include a new flag AMET\_DB which, when set to F, should eliminate the execution of the MySQL commands. Please try the new script and report back to me with the result.

I’ll admit I have not tested the changes yet, so I apologize if you run into any issues. But we’ll work those out quickly I’m sure. Thanks.

Wyat[aqProject\_post\_only.txt](https://forum.cmascenter.org/uploads/short-url/4LOSLeyCvnVPx4EOB9c0cAl3RrR.txt) (7.7 KB)

---

<div class="post-metadata">

**Author:** ![qluo](https://avatars.discourse-cdn.com/v4/letter/q/90ced4/32.png) [@qluo](https://forum.cmascenter.org/u/qluo)\
**Post date:** [November 18, 2020, 7:13pm UTC](https://forum.cmascenter.org/t/how-to-use-amet-without-mysql/889/12 "2020-11-18T19:13:10Z")

</div>

Thanks, Wyat! However, when I tried to use the new script, I got the error “./aqProject\_post\_only.csh: Command not found.”. Not sure what it means.

---

<div class="post-metadata">

**Author:** ![qluo](https://avatars.discourse-cdn.com/v4/letter/q/90ced4/32.png) [@qluo](https://forum.cmascenter.org/u/qluo)\
**Post date:** [November 18, 2020, 7:28pm UTC](https://forum.cmascenter.org/t/how-to-use-amet-without-mysql/889/13 "2020-11-18T19:28:23Z")

</div>

I also tried to add the “setenv AMET\_DB F” to the old script but it still gave me the same error as before.

---

<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:** [November 18, 2020, 7:38pm UTC](https://forum.cmascenter.org/t/how-to-use-amet-without-mysql/889/14 "2020-11-18T19:38:50Z")

</div>

Try applying the command below to the file I sent. That might fix your issue.

> chmod +x aqProject\_post\_only.csh

---

<div class="post-metadata">

**Author:** ![qluo](https://avatars.discourse-cdn.com/v4/letter/q/90ced4/32.png) [@qluo](https://forum.cmascenter.org/u/qluo)\
**Post date:** [November 18, 2020, 7:40pm UTC](https://forum.cmascenter.org/t/how-to-use-amet-without-mysql/889/15 "2020-11-18T19:40:43Z")

</div>

I changed the permission but it still did not work.

---

<div class="post-metadata">

**Author:** ![qluo](https://avatars.discourse-cdn.com/v4/letter/q/90ced4/32.png) [@qluo](https://forum.cmascenter.org/u/qluo)\
**Post date:** [November 18, 2020, 7:54pm UTC](https://forum.cmascenter.org/t/how-to-use-amet-without-mysql/889/16 "2020-11-18T19:54:02Z")

</div>

I guess I figured it out why it did not work. The file is saved in Windows format. I will convert it to Unix file format and let you know if it works

---

<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:** [November 18, 2020, 8:03pm UTC](https://forum.cmascenter.org/t/how-to-use-amet-without-mysql/889/17 "2020-11-18T20:03:21Z")

</div>

Ah, sorry. That’s my fault. Let me know if you’re not able to get it to work. I’m attaching a version that was created in linux just in case.[aqProject\_post\_only\_new.csh](https://forum.cmascenter.org/uploads/short-url/lYgWKvrESm8hCWMajnpQhRjNWUa.csh) (7.5 KB)

---

<div class="post-metadata">

**Author:** ![qluo](https://avatars.discourse-cdn.com/v4/letter/q/90ced4/32.png) [@qluo](https://forum.cmascenter.org/u/qluo)\
**Post date:** [November 18, 2020, 8:06pm UTC](https://forum.cmascenter.org/t/how-to-use-amet-without-mysql/889/18 "2020-11-18T20:06:17Z")

</div>

Hi Wyat,

I can run the script now but still got some issues. It seems the program is still using something related to MySQL. Should I run amet\_config.R before running aqProject\_post\_only.csh? I am a little bit confused about how to configure AMET to set up the AMET environment as there is no detailed guidance in the Quick Start Guide.  
 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/1X/b911f8d7c2b43589a0ce4f058c700cd7fcb664e9.png)

Thanks,  
Qian

---

<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:** [November 18, 2020, 8:22pm UTC](https://forum.cmascenter.org/t/how-to-use-amet-without-mysql/889/19 "2020-11-18T20:22:52Z")

</div>

I see. I obviously have some work to do to make this more user friendly. However, you could move the line

if ($AMET\_DB == “T”) then

to before the line

## setup metadata tables

Basically just moving it to after the amet login portion of the script. That should get you past your current issue.

Wyat

---

<div class="post-metadata">

**Author:** ![qluo](https://avatars.discourse-cdn.com/v4/letter/q/90ced4/32.png) [@qluo](https://forum.cmascenter.org/u/qluo)\
**Post date:** [November 18, 2020, 9:17pm UTC](https://forum.cmascenter.org/t/how-to-use-amet-without-mysql/889/20 "2020-11-18T21:17:02Z")

</div>

Thanks, Wyat. Moving the command solved this issue. However, new errors occurred. It seems to be related to the netCDF libraries settings but I do not know which file I should check.

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

[Next page](https://forum.cmascenter.org/t/how-to-use-amet-without-mysql/889.md?page=2)
